Sensaphone.net API/history
From Sensaphone.net
Revision as of 13:18, 29 April 2015 by Tim (Talk | contribs) (Created page with "=Sensaphone.net API= ==Access== History is not its own API. However, the history function can be accessed from multiple different API contexts. ==Specifications== '''...")
Contents
Sensaphone.net API
Access
History is not its own API. However, the history function can be accessed from multiple different API contexts.
Specifications
'Audit Log'
Something interesting about audit logs...
Audit Log Uri Mode
After the prefix of /history/audit_log/ filtering options are added in pairs (non-pair params are ignored), and can be added in any order e.g. /history/audit_log/var_ids/{1234,9876}/changes/{create}
Audit Log Filter Options
Property | Status | Type | Description |
var_ids | Optional | Array of Integer | list of variable ids |
user_ids | Optional | Array of Integer | list of user ids |
changes | Optional | Array of String | list of change types ("create","delete","update") |
start | Optional | Integer | the start time (unix time) |
end | Optional | Integer | the end time (unix time) |
begin_offset | Optional | Integer | the beginning offset of the first record |
record_offset | Optional | Integer | the offset from the beginning |
GET
Audit Log Request Properties
Parent Property | Child Property | Type | Description |
acctid | Integer | Account ID | |
session | String | Session ID | |
request_type | String | "read" | |
history | Object | The History object | |
history | audit_log | Object | Audit Log Filter Options |
Audit Log Response Properties
Parent Property | Child Property | Type | Description |
history | Object | The history object | |
history | audit_log | Array of Objects | The returned log |
audit_log | change | String | The change that occurred |
audit_log | who | String | Who changed it |
audit_log | what | String | What changed |
audit_log | when | String | When it changed |
history | audit_log_filter | Object | Audit Log Filter Options (Only returned in V2) |
- Receive all "Unacknowledged Alarms" changes:
GET https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}
- Receive ...:
GET .../api/v1/{ACCOUNT}/{SESSION}/device/{ID}/history
- Receive ...:
GET .../api/v1/{ACCOUNT}/{SESSION}/device/{ID}/zone/{ID}/history