Sensaphone.net API/dashboard
From Sensaphone.net
Sensaphone.net API
Receive data to populate Dashboard. The Dashboard is a page that gives the user a quick view of Device and alarm statuses. It is a read only resource.
Example Call
http://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard
Example Requests
GET
URI Mode Request URI's:
- Receive all Dashboard information
GET https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard
- Receive for the number of Devices online
GET https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard/devices_online
- Receive the names of all Devices powered on and online
GET https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard/device/name
JSON Mode Request URI:
POST https://rest.sensaphone.net/api/v1/dashboard
JSON Mode Request Properties
Parent Property | Child Property | Type | Description |
acctid | Integer | Account ID | |
session | String | Session ID | |
request_type | String | "read" | |
dashboard | Object | The dashboard object. |
JSON Mode Response Properties
Parent Property | Child Property | Status | Type | Description |
dashboard | Required | Object | The dashboard object. | |
dashboard | online_count | Optional | Integer | Number of Devices turned on and online |
dashboard | offline_count | Optional | Integer | Number of Devices offline |
dashboard | alarm_count | Optional | Integer | Number of acknowledged alarms |
dashboard | unack_count | Optional | Integer | Number of unacknowledged alarms |
dashboard | total_alarm_count | Optional | Integer | Number of alarms |
dashboard | device | Optional | Array | Array of Devices |
device | device_id | Optional | Integer | ID of Device |
device | id | Optional | Integer | Unique identifier located on the Device (Serial number, etc.) |
device | name | Optional | String | Name of Device |
device | location | Optional | Object | Contains location information for the device. |
location | address | Optional | Object | Address information for Device (See Sensaphone.net API/address) |
location | coordinates | Optional | Object | GPS Coordinates information for Device (See Sensaphone.net API/coordinates) |
device | status | Optional | String | Alarm status of Device("OK" or "Alarm") |
device | is_offline_unack | Optional | Boolean | Whether or not an unacknowledged offline alarm exists. |
device | is_online | Optional | Boolean | Whether or not the device is currently online. |
device | battery_status | Optional | String | A device's battery status |
device | power_status | Optional | String | A device's power status |
device | battery_value | Optional | String | A device's battery value |
device | power_value | Optional | String | A device's power value |
device | connection_status | Optional | String | A device's connection status |
device | zone | Optional | Array of Objects | Device Zone data (See Sensaphone.net API/zone) *Only returns zones with an alarm |
zone | canonical_name | Optional | String | Canonical name of the zone. |
zone | value | Optional | String | The data value for the zone. |
zone | type | Optional | String | The zone type. |
zone | alarm_zone | Optional | Object | Sub-object containing data for alarmable zones. 'null' if unsupported. |
alarm_zone | alarm_status | Optional | Array of ZoneState | The processed status of the zone ( returns 2 ZoneStates) |
alarm_zone | unack_alarms | Optional | Array of ZoneState | Alarm states that are currently unacknowledged |
Example
This example is requesting the devices_online and name values.
- Request JSON
{ "request_type":"read", "resource":"dashboard", "acctid":987654, "session":"0123-4567-8901", "online_count": null, "device": { "name":null } }
- Result JSON
{ "result": { "success":true, "code":0, "message":"OK:, }, "response": { "online_count":3, "device": { "name":"Device 1", "name":"Device 2", "name":"Device 3" } } }