Sensaphone.net API/alarmschedule
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, Contact Group, or Contact-independent Destinations 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
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
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. 
- Create a new "time range" to "call list" binding.
- Parent Property - Child Property - Type - Description - <parent> - alarmschedule - Object - The schedule object. - 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. 
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}
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. 
- Delete an existing "time range" to "call list" binding.
- Parent Property - Child Property - Type - Description - <parent> - alarmschedule - Object - The schedule object. - 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. 
