Sensors including Datastores, Physical Storage, Resource Pools
Sensors including Datastores, Physical Storage, Resource Pools
#340160
Description
With the sensors API, the list of sensor types and sensor details are available for the Control Environments, so that Workloads can be routed appropriately. The details are provided at each defined timeframe of the timeline.
Also see Routing Requests for details on sensor considerations when creating routing requests.
Resource
/sensors
/sensors/<type>
Supported Operations
Table: Sensor Supported Operations
Operation |
HTTP Method |
Input |
Output |
Description |
GET /sensors |
None |
List of sensor types defined by [name, href[[,disk_sensor_link_attribute_id],sensor_link_attribute_id], sorted by name. |
List of sensor types defined by the Control Console. The disk_sensor_link_attribute_id and sensor_link_attribute_id are used to determine the sensor display names for placement, when a Booking or Workload object maps to sensors. For example, see the Workloads' disks element disks. Sort By and Common Operations are not supported. |
Table: Sensor Type Supported Operations
Operation |
HTTP Method |
Input |
Output |
Description |
Get Collection |
GET /sensors/<type> |
None |
Sensors of specified <type> collection of [name, id, href, host_name] |
The list of sensors of specified <type>, in ascending order by name. Common Operations is supported. |
Get Individual |
GET /sensors/<type>/<id> |
None |
Sensors including Datastores, Physical Storage, Resource Pools: Resource Elements |
The details of the specified sensor. |
Table: Sensor Type Resource Elements
Element |
Type |
Filter |
Description |
id, name, href |
string |
F by name |
|
control_environment |
id, name, platform, platform_category, control_type, href, icon |
F by control_environment_id |
The Control Environment where this sensor belongs. |
data |
timeline: metrics [value, name, high_limit, low_limit, full_limit] |
|
Sensor type-specific metrics for each timeframe that has data, as follows: For each short_name of the Timeline Tags: metrics[
] Limits of -1 signify that the limit has not been defined. See example below. |
host_name |
string |
|
The entity ID of the sensor (unique). |
infrastructure_groups |
id, name, href |
F by infrastructure_group_id |
The Infrastructure Groups where this sensor belongs. |
sensor_type |
string |
|
The sensor type, which is "datastore", "phystor" or "resourcepool". |
start_date |
number |
F |
The date this sensor is online in UTC. If the sensor is a booking, then this element is the expected_date of the Booking. Otherwise, for all sensors that are not bookings this date is today as defined by the timeline. When filtering on start_date_from or start_date_to, all sensors coming online that satisfy this filter are returned, including all datastore sensors that are not bookings. When both start_date_from and start_date_to are specified, only the sensors coming online that satisfy this filter are returned. |
Examples
The following example shows you how to get sensor types:

Request:
GET /sensors
Response:
[
{
"name": "Datastores",
"href": "/sensors/datastores",
"disk_sensor_link_attribute_id": "attr_DiskDatastoreLink",
"sensor_link_attribute_id": "VE_LOCATION_DATASTORE"
},
{
"name": "IP Address Pools",
"href": "/sensors/ip_address_pools",
"sensor_link_attribute_id": "attr_AddressPoolLink"
},
{
"name": "Physical Storage",
"href": "/sensors/physical_storage",
"disk_sensor_link_attribute_id": "attr_DiskPhysicalStorageLink",
"sensor_link_attribute_id": "attr_PhysicalStorageLink"
},
{
"name": "Resource Pools",
"href": "/sensors/resource_pools",
"sensor_link_attribute_id": "VE_VMWARE_RESOURCEPOOL"
}
]
Example: Getting a Collection of Datastore Sensors
The following example shows you how to obtain the collection of current datastores:

Request:
GET /sensors/datastores
Response:
[
{
"id": "13b64d47-d641-4c91-918e-357212ce5b22",
"name": "EMC2-Datastore-B",
"href": "/sensors/datastores/13b64d47-d641-4c91-918e-357212ce5b22"
"host_name": "bac5eda7-e4b4-4c79-9e36-4b9d800a6dd2"
},
{
"id": "1d156284-4d11-4565-9fbe-a8458723c932",
"name": "ESXCRB11 Datastore",
"href": "/sensors/datastores/1d156284-4d11-4565-9fbe-a8458723c932"
"host_name": "277b6bc4-c528-478e-91f8-e87929d35eec"
},
// ... *SNIP* ...
]
Example: Getting an Individual Datastore Sensor
The following example shows you how to get an individual datastore sensor:

Request:
GET /sensors/datastores/13b64d47-d641-4c91-918e-357212ce5b22
Response:
{
"id": "13b64d47-d641-4c91-918e-357212ce5b22",
"name": "esx-lun-s121",
"data": {
"90": {
"metrics": [
{
"value": 13,
"name": "Number of VMs",
"high_limit": 75,
"low_limit": -1,
"full_limit": -1
},
{
"value": 614144,
"name": "Capacity (MB)",
"high_limit": -1,
"low_limit": -1,
"full_limit": -1
},
{
"value": 282533.38,
"name": "Total Required Space (MB)",
"high_limit": 100,
"low_limit": 20,
"full_limit": -1
},
{
"value": 246278.88,
"name": "Total Used Space (MB)",
"high_limit": 70,
"low_limit": 20,
"full_limit": 100
},
{
"value": 5,
"name": "Number of Hosts",
"high_limit": -1,
"low_limit": -1,
"full_limit": -1
},
{
"value": 372822.72,
"name": "Total Provisioned Space (MB)",
"high_limit": 300,
"low_limit": 20,
"full_limit": -1
}
]
}
// ... *SNIP* of other timeframes ...
}
"href": "/sensors/datastores/00550cc8-b473-4804-9947-20744f35f164",
"host_name": "bac5eda7-e4b4-4c79-9e36-4b9d800a6dd2",
"control_environment": {
"id": "8db102f8-54ef-4d7c-a31d-df98315e48ce",
"name": "Toronto",
"platform": "VMWARE",
"platform_category": "Internal Virtual",
"control_type": "FULL"
"href": "/control-environments/8db102f8-54ef-4d7c-a31d-df98315e48ce"
"icon": "/control-environments/8db102f8-54ef-4d7c-a31d-df98315e48ce/icon"
},
"sensor_type": "datastore",
"start_date": 1403064000000,
"infrastructure_groups": [
{
"id": "6b153341-95b6-4794-acb3-9a422722bb78",
"name": "Cluster 1",
"href": "/infrastructure-groups/6b153341-95b6-4794-acb3-9a422722bb78"
},
{
"id": "99128443-1936-478e-bfcd-fde9243773de",
"name": "Cluster2",
"href": "/infrastructure-groups/99128443-1936-478e-bfcd-fde9243773de"
}
]
}