Difference between revisions of "Sensaphone.net API/dashboard"

From Sensaphone.net
Jump to: navigation, search
(Created page with "=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...")
 
(Sensaphone.net API)
Line 6: Line 6:
  
 
   http://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard
 
   http://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard
 
==Values==
 
*User's First and Last name
 
*Units Online
 
*Current Alarms
 
*Unacknowledged Alarms
 
*Battery Level
 
  
 
==Example Requests==
 
==Example Requests==

Revision as of 10:54, 30 April 2015

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 PropertyChild PropertyType Description
  acctid Integer Account ID
  session Integer Session ID
  request_type String "read"
  dashboard Object The dashboard object.


JSON Mode Response Properties

Parent PropertyChild PropertyStatus Type Description
  dashboard Required Object The dashboard object.
dashboard name Optional String Name of account holder
dashboard devices_online Optional Integer Number of Devices turned on and online
dashboard unacknowledged_alarms Optional Integer Number of unacknowledged 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 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


Example

This example is requesting the devices_online and name values.

  • Request JSON
{
   "request_type":"read",
   "resource":"dashboard",
   "acctid":987654,
   "uuid":"0123-4567-8901",
   "devices_online": null,
   "device":
     {
       "name":null
     }
}
  • Result JSON
{
   "result":
     { 
      "success":true,
      "code":0,
      "message":"OK:,
     },
    "response": 
     { 
       "devices_online":3,
       "device":
           {
            "name":"Device 1",
            "name":"Device 2",
            "name":"Device 3"
           }
     }
}