function monitoring_services_sensors_info in Monitoring 7
Sensor info list resource.
Return value
array List of all sensors info data.
1 string reference to 'monitoring_services_sensors_info'
- monitoring_services_resources in ./
monitoring.module - Implements hook_services_resources().
File
- ./
monitoring.services.inc, line 35 - Monitoring remote API resource callbacks.
Code
function monitoring_services_sensors_info() {
$response = array();
foreach (monitoring_sensor_manager()
->getSensorInfo() as $sensor_name => $sensor_info) {
$response[$sensor_name] = $sensor_info
->toArray();
$response[$sensor_name]['uri'] = services_resource_uri(array(
'sensor-info',
$sensor_name,
));
}
return $response;
}