For clustered Data ONTAP (8.3.1) you'll need to invoke the "environment-sensors-get-iter" API and specify a sensor type of "fan". Here is an example using PowerShell:
$fans = Invoke-NcSystemApi '<environment-sensors-get-iter><sensor-type>fan</sensor-type></environment-sensors-get-iter>'
$fans.results.'attributes-list'.'environment-sensors-info' | ?{ $_.'threshold-sensor-state' -ne "normal" }
I can't find an API for 7-mode, so you may have to use SNMP. There is a large number of Nagios examples on their site, which is a mixed bag of SNMP and API based checks and may be a good template to get started with.
Hope that helps!
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.