Difference between revisions of "Sensaphone.net API/alarmschedule"
(→POST) |
(→POST) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
==Specifications== | ==Specifications== | ||
− | Alarm Schedules define when a [[Sensaphone.net API/contact|Contact]], [[Sensaphone.net API/contactgroup|Contact Group | + | Alarm Schedules define when a [[Sensaphone.net API/contact|Contact]], or [[Sensaphone.net API/contactgroup|Contact Group]] will be notified of an alarm; immediately or with a predefined delay. Delays are user inputted integer values defining the number of minutes to wait after an alarm has been triggered to send a notification to a Contact, Contact Group, and/or Destination. Once an alarm is acknowledged it will not continue notifying subsequent delay tiers. |
The schedule resource has the following properties: | The schedule resource has the following properties: | ||
Line 23: | Line 23: | ||
'''JSON Mode Request Properties''' | '''JSON Mode Request Properties''' | ||
− | + | {{TableStart|border_size=1 | |
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type''' | '''Description''' | }}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type''' | '''Description''' | ||
}}{{TableRowN| | acctid | Integer | Account ID | }}{{TableRowN| | acctid | Integer | Account ID | ||
Line 59: | Line 59: | ||
'''JSON Mode Request Properties''' | '''JSON Mode Request Properties''' | ||
− | + | ''Create new alarm schedule'' | |
− | + | ||
− | + | This will create an alarm schedule with an empty call list and the default time range. An empty schedule must exist before its contents can be modified. | |
+ | |||
+ | {{TableStart|border_size=1 | ||
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type''' | '''Description''' | }}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type''' | '''Description''' | ||
}}{{TableRowN| | acctid | Integer | Account ID | }}{{TableRowN| | acctid | Integer | Account ID | ||
Line 69: | Line 71: | ||
}}{{TableEnd}} | }}{{TableEnd}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''JSON Mode Response Properties''' | '''JSON Mode Response Properties''' | ||
Line 95: | Line 88: | ||
*Delete the device schedule from a device (thus enabling the default schedule). | *Delete the device schedule from a device (thus enabling the default schedule). | ||
'''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID} | '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID} | ||
+ | |||
+ | *Delete a new zone alarm schedule. | ||
+ | '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID} | ||
'''JSON Mode Request URI:''' | '''JSON Mode Request URI:''' | ||
Line 108: | Line 104: | ||
}}{{TableRowN| ''<parent>'' | alarmschedule | Object | The schedule object. | }}{{TableRowN| ''<parent>'' | alarmschedule | Object | The schedule object. | ||
}}{{TableRowN| alarmschedule | schedule_id | Integer | ID of the schedule. | }}{{TableRowN| alarmschedule | schedule_id | Integer | ID of the schedule. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}}{{TableEnd}} | }}{{TableEnd}} |
Latest revision as of 08:06, 14 September 2015
Contents
Sensaphone.net API
Access
Alarm Schedule is not an individual API resource. However, the alarmschedule object can be accessed from the Device resource.
Specifications
Alarm Schedules define when a Contact, or Contact Group will be notified of an alarm; immediately or with a predefined delay. Delays are user inputted integer values defining the number of minutes to wait after an alarm has been triggered to send a notification to a Contact, Contact Group, and/or Destination. Once an alarm is acknowledged it will not continue notifying subsequent delay tiers.
The schedule resource has the following properties:
Parent Property | Property | Type | Description | Create | Delete | Read | Update |
<parent> | alarmschedule | Object | The schedule object. | ✓ | ✓ | ✓ | n/a |
alarmschedule | schedule_id | Integer | ID of the schedule. | ✓ | |||
alarmschedule | timeranges | Array of Objects | The mapping of time ranges to call lists | ✓ | ✓ | ✓ | |
timeranges | range_id | Integer | The ID of the time range. | ✓ | |||
timeranges | list_id | Integer | The ID of the call list. | ✓ | |||
alarmschedule | calllist | Array of Objects | The schedule's call lists | ✓ | |||
alarmschedule | timerange | Array of Objects | The schedule's time ranges | ✓ |
GET
JSON Mode Request Properties
Parent Property | Child Property | Type | Description |
acctid | Integer | Account ID | |
session | Integer | Session ID | |
request_type | String | "create" | |
<parent> | alarmschedule | Object | The schedule object. |
alarmschedule | schedule_id | Integer | ID of the schedule. |
alarmschedule | CHILD PROPERTY | Alarm Schedule child properties to be edited* |
JSON Mode Response Properties
Parent Property | Child Property | Status | Type | Description |
<parent> | alarmschedule | Optional | Object | The schedule object. |
alarmschedule | schedule_id | Required | Integer | ID of the schedule. |
alarmschedule | timeranges | Optional | Array of Objects | The mapping of time ranges to call lists |
timeranges | range_id | Optional | Integer | The ID of the time range. |
timeranges | list_id | Optional | Integer | The ID of the call list. |
alarmschedule | calllist | Optional | Array of Objects | The schedule's call lists |
alarmschedule | timerange | Optional | Array of Objects | The schedule's time ranges |
Example JSON
POST
URI Mode Request URI's:
- Create a new device schedule.
POST https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule
- Create a new zone alarm schedule.
POST https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule
JSON Mode Request URI:
POST https://rest.sensaphone.net/api/v1/device/device_schedule
JSON Mode Request Properties Create new alarm schedule
This will create an alarm schedule with an empty call list and the default time range. An empty schedule must exist before its contents can be modified.
Parent Property | Child Property | Type | Description |
acctid | Integer | Account ID | |
session | Integer | Session ID | |
request_type | String | "create" | |
<parent> | alarmschedule | Object | The schedule object. |
JSON Mode Response Properties
Parent Property | Child Property | Status | Type | Description |
<parent> | alarmschedule | Optional | Object | The schedule object. |
alarmschedule | schedule_id | Required | Integer | ID of the schedule. |
alarmschedule | timeranges | Optional | Array of Objects | The mapping of time ranges to call lists |
timeranges | range_id | Optional | Integer | The ID of the time range. |
timeranges | list_id | Optional | Integer | The ID of the call list. |
alarmschedule | calllist | Optional | Array of Objects | The schedule's call lists |
alarmschedule | timerange | Optional | Array of Objects | The schedule's time ranges |
DELETE
URI Mode Request URI's:
- Delete the device schedule from a device (thus enabling the default schedule).
DELETE https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID}
- Delete a new zone alarm schedule.
POST https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID}
JSON Mode Request URI:
POST https://rest.sensaphone.net/api/v1/device/device_schedule
JSON Mode Request Properties
- Delete an existing alarm schedule
Parent Property Child Property Type Description acctid Integer Account ID session Integer Session ID request_type String "create" <parent> alarmschedule Object The schedule object. alarmschedule schedule_id Integer ID of the schedule.