Difference between revisions of "Sensaphone.net API/history"
From Sensaphone.net
(→Sensaphone.net API) |
(→Sensaphone.net API) |
||
Line 45: | Line 45: | ||
}}{{TableRowN| audit_log | what | String | What changed | }}{{TableRowN| audit_log | what | String | What changed | ||
}}{{TableRowN| audit_log | when | String | When it changed | }}{{TableRowN| audit_log | when | String | When it changed | ||
+ | }}{{TableRowN| audit_log | epoch | Integer | The epoch time | ||
}}{{TableRowN| history | audit_log_filter | Object | Audit Log Filter Options (Only returned in V2) | }}{{TableRowN| history | audit_log_filter | Object | Audit Log Filter Options (Only returned in V2) | ||
}}{{TableEnd}} | }}{{TableEnd}} | ||
Line 50: | Line 51: | ||
*Receive all "Unacknowledged Alarms" changes: | *Receive all "Unacknowledged Alarms" changes: | ||
'''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744} | '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744} | ||
+ | |||
+ | ==Event Log== | ||
+ | Something interesting about event logs... | ||
+ | |||
+ | '''Event Log Filter Options''' | ||
+ | {{TableStart|border_size=1 | ||
+ | }}{{TableRowN| '''Property''' |'''Status''' | '''Type''' | '''Description''' | ||
+ | }}{{TableRowN| contact_ids | Optional | Array of Integer | list of contact ids | ||
+ | }}{{TableRowN| device_ids | Optional | Array of Integer | list of device ids | ||
+ | }}{{TableRowN| zone_ids | Optional | Array of Integer | list of zone ids | ||
+ | }}{{TableRowN| user_ids | Optional | Array of Integer | list of user ids | ||
+ | }}{{TableRowN| event_types | Optional | Array of String | list of event types | ||
+ | }}{{TableRowN| start | Optional | Integer | the start time (unix time) | ||
+ | }}{{TableRowN| end | Optional | Integer | the end time (unix time) | ||
+ | }}{{TableRowN| begin_offset | Optional | Integer | the beginning offset of the first record | ||
+ | }}{{TableRowN| record_offset | Optional | Integer | the offset from the beginning | ||
+ | }}{{TableEnd}} | ||
+ | |||
+ | ===GET=== | ||
+ | |||
+ | '''Event Log Request Properties''' | ||
+ | {{TableStart|border_size=1 | ||
+ | }}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type''' | '''Description''' | ||
+ | }}{{TableRowN| | acctid | Integer | Account ID | ||
+ | }}{{TableRowN| | session | String | Session ID | ||
+ | }}{{TableRowN| | request_type | String | "read" | ||
+ | }}{{TableRowN| | history | Object | The History object | ||
+ | }}{{TableRowN| history | event_log | Object | Event Log Filter Options | ||
+ | }}{{TableEnd}} | ||
+ | |||
+ | '''Event Log Response Properties''' | ||
+ | {{TableStart|border_size=1 | ||
+ | }}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type''' | '''Description''' | ||
+ | }}{{TableRowN| | history | Object | The history object | ||
+ | }}{{TableRowN| history | event_log | Array of Objects | The returned log | ||
+ | }}{{TableRowN| event_log | event | String | Which event | ||
+ | }}{{TableRowN| event_log | when | String | When it changed | ||
+ | }}{{TableRowN| event_log | epoch | Integer | The epoch time | ||
+ | }}{{TableRowN| event_log | type | String | The type | ||
+ | }}{{TableRowN| event_log | source | Object | The sources of the event | ||
+ | }}{{TableRowN| source | <source_name> | String | A source | ||
+ | }}{{TableRowN| history | event_log_filter | Object | Event Log Filter Options (Only returned in V2) | ||
+ | }}{{TableEnd}} | ||
+ | |||
+ | *Receive all "Alarms Events": | ||
+ | '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm} |
Revision as of 12:38, 30 April 2015
Contents
Sensaphone.net API
Access
The History API allows access to the Audit Log and the Event Log
Specifications
The URI Mode for the History API is unique because it allows filtering options to be specified in pairs and can be added in any order. Also, the array values are expressed as a common-separated list.
/history/audit_log/var_ids/{1234,9876}/changes/{create}
Audit Log
Something interesting about audit logs...
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 |
audit_log | epoch | Integer | The epoch time |
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}
Event Log
Something interesting about event logs...
Event Log Filter Options
Property | Status | Type | Description |
contact_ids | Optional | Array of Integer | list of contact ids |
device_ids | Optional | Array of Integer | list of device ids |
zone_ids | Optional | Array of Integer | list of zone ids |
user_ids | Optional | Array of Integer | list of user ids |
event_types | Optional | Array of String | list of event types |
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
Event 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 | event_log | Object | Event Log Filter Options |
Event Log Response Properties
Parent Property | Child Property | Type | Description |
history | Object | The history object | |
history | event_log | Array of Objects | The returned log |
event_log | event | String | Which event |
event_log | when | String | When it changed |
event_log | epoch | Integer | The epoch time |
event_log | type | String | The type |
event_log | source | Object | The sources of the event |
source | <source_name> | String | A source |
history | event_log_filter | Object | Event Log Filter Options (Only returned in V2) |
- Receive all "Alarms Events":
GET https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}