<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.sensaphone.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tim</id>
		<title>Sensaphone.net - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.sensaphone.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tim"/>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Special:Contributions/Tim"/>
		<updated>2026-04-18T10:16:25Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=161</id>
		<title>Sensaphone.net API/alarmschedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=161"/>
				<updated>2015-09-14T13:06:42Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* POST */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
Alarm Schedule is not an individual API resource. However, the alarmschedule object can be accessed from the [[Sensaphone.net API/device|Device]] resource.&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
The schedule resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule  | Object           | The schedule object.           | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id    | Integer          | ID of the schedule.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges     | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]] | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id       | Integer          | The ID of the time range.      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id        | Integer          | The ID of the call list.       | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist       | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange      | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | ''CHILD PROPERTY''         |   ''  ''        | Alarm Schedule child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new device schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule&lt;br /&gt;
&lt;br /&gt;
*Create a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
''Create new alarm schedule''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete the device schedule from a device (thus enabling the default schedule).&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete an existing alarm schedule''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=160</id>
		<title>Sensaphone.net API/alarmschedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=160"/>
				<updated>2015-09-14T13:06:17Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* POST */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
Alarm Schedule is not an individual API resource. However, the alarmschedule object can be accessed from the [[Sensaphone.net API/device|Device]] resource.&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
The schedule resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule  | Object           | The schedule object.           | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id    | Integer          | ID of the schedule.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges     | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]] | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id       | Integer          | The ID of the time range.      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id        | Integer          | The ID of the call list.       | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist       | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange      | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | ''CHILD PROPERTY''         |   ''  ''        | Alarm Schedule child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new device schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule&lt;br /&gt;
&lt;br /&gt;
*Create a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
''Create new alarm schedule''&lt;br /&gt;
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.&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete the device schedule from a device (thus enabling the default schedule).&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete an existing alarm schedule''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=159</id>
		<title>Sensaphone.net API/alarmschedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=159"/>
				<updated>2015-09-14T13:05:51Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* POST */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
Alarm Schedule is not an individual API resource. However, the alarmschedule object can be accessed from the [[Sensaphone.net API/device|Device]] resource.&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
The schedule resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule  | Object           | The schedule object.           | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id    | Integer          | ID of the schedule.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges     | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]] | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id       | Integer          | The ID of the time range.      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id        | Integer          | The ID of the call list.       | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist       | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange      | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | ''CHILD PROPERTY''         |   ''  ''        | Alarm Schedule child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new device schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule&lt;br /&gt;
&lt;br /&gt;
*Create a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
''Create new alarm schedule''&lt;br /&gt;
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.&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new &amp;quot;time range&amp;quot; to &amp;quot;call list&amp;quot; binding.&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges          | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id            | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id             | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete the device schedule from a device (thus enabling the default schedule).&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete an existing alarm schedule''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=158</id>
		<title>Sensaphone.net API/alarmschedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=158"/>
				<updated>2015-09-14T13:05:19Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* GET */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
Alarm Schedule is not an individual API resource. However, the alarmschedule object can be accessed from the [[Sensaphone.net API/device|Device]] resource.&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
The schedule resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule  | Object           | The schedule object.           | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id    | Integer          | ID of the schedule.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges     | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]] | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id       | Integer          | The ID of the time range.      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id        | Integer          | The ID of the call list.       | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist       | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange      | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | ''CHILD PROPERTY''         |   ''  ''        | Alarm Schedule child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new device schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule&lt;br /&gt;
&lt;br /&gt;
*Create a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create new alarm schedule''&lt;br /&gt;
: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.&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new &amp;quot;time range&amp;quot; to &amp;quot;call list&amp;quot; binding.&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges          | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id            | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id             | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete the device schedule from a device (thus enabling the default schedule).&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete an existing alarm schedule''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=157</id>
		<title>Sensaphone.net API/alarmschedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/alarmschedule&amp;diff=157"/>
				<updated>2015-09-14T13:05:02Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* DELETE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
Alarm Schedule is not an individual API resource. However, the alarmschedule object can be accessed from the [[Sensaphone.net API/device|Device]] resource.&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
The schedule resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule  | Object           | The schedule object.           | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id    | Integer          | ID of the schedule.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges     | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]] | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id       | Integer          | The ID of the time range.      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id        | Integer          | The ID of the call list.       | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist       | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange      | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | ''CHILD PROPERTY''         |   ''  ''        | Alarm Schedule child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new device schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule&lt;br /&gt;
&lt;br /&gt;
*Create a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create new alarm schedule''&lt;br /&gt;
: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.&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new &amp;quot;time range&amp;quot; to &amp;quot;call list&amp;quot; binding.&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges          | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id            | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id             | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property'''|'''Status'''      | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule      | Optional         | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id        | Required         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timeranges         | Optional         | Array of Objects | The mapping of [[Sensaphone.net_API/timerange|time ranges]] to [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| timeranges           | range_id           | Optional         | Integer          | The ID of the time range.&lt;br /&gt;
}}{{TableRowN| timeranges           | list_id            | Optional         | Integer          | The ID of the call list.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | calllist           | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/calllist|call lists]]&lt;br /&gt;
}}{{TableRowN| alarmschedule        | timerange          | Optional         | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete the device schedule from a device (thus enabling the default schedule).&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/device_schedule/{SCHEDULE_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a new zone alarm schedule. &lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/zone/{ZONE_ID}/alarm_zone/alarmschedule/{SCHED_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/device_schedule&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete an existing alarm schedule''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | acctid              | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | session             | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;               | request_type        | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | alarmschedule       | Object           | The schedule object.&lt;br /&gt;
}}{{TableRowN| alarmschedule        | schedule_id         | Integer          | ID of the schedule.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=156</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=156"/>
				<updated>2015-09-09T18:27:15Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* POST */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist              | new_timeranges          | Array           | A special CREATE only property for call_lists under an alarm schedule | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
* Move a tier to a different time&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;minutes&amp;quot; : 25&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1324&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
Actions can only be created in Json Mode&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new tier in the call list.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/minutes/{TIER_ID}/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
*Create an Action&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device/&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;create&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;actions&amp;quot; : [ {&lt;br /&gt;
                          &amp;quot;user&amp;quot; : 12345&lt;br /&gt;
                   } ]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1234&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*Link a Call List to a set of TimeRanges under an Alarm Schedule&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device/&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;create&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
      &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
        &amp;quot;schedule_id&amp;quot;: 5678,&lt;br /&gt;
        &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;list_id&amp;quot;: 90123,&lt;br /&gt;
            &amp;quot;new_timeranges&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;start&amp;quot;: 32166000,&lt;br /&gt;
                &amp;quot;end&amp;quot;: 32191200,&lt;br /&gt;
                &amp;quot;interval&amp;quot;: 2&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id             | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=155</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=155"/>
				<updated>2015-09-09T18:24:45Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist              | new_timeranges          | Array           | A special CREATE only property for call_lists under an alarm schedule | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
* Move a tier to a different time&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;minutes&amp;quot; : 25&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1324&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
Actions can only be created in Json Mode&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new tier in the call list.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/minutes/{TIER_ID}/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
*Create an Action&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device/&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;create&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;actions&amp;quot; : [ {&lt;br /&gt;
                          &amp;quot;user&amp;quot; : 12345&lt;br /&gt;
                   } ]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1234&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id             | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=154</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=154"/>
				<updated>2015-07-23T20:12:55Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | Boolean    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | Boolean    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device              | firmware         | Object    | Firmware object of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| firmware              | firmware_id         | Integer    | The ID of the firmware  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| firmware              | version         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update              | Boolean | Will the Device automatically update to the latest firmware version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_target              | Object | The firmware version the Device will install           | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_available              | Array of Objects | A list of available firmware to install on the Device             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog              | Array of Strings | A list of the changes verses the currently installed version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
*Receive the changlog from a particular firmware version  &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/firmware_changelog/{FIRMWARE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog      | Object    | The changelog is only returned if specified explicitly in the request&lt;br /&gt;
}}{{TableRowN| firmware_changelog          | firmware_id        | Integer    |  The ID of the firmware to get the changelog from&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableRowN| device              | firmware          | Optional        | Object    | Firmware version of Device &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Object | The firmware version the Device will install    &lt;br /&gt;
}}{{TableRowN| device          | firmware_available             | Optional          | Array of Objects | A list of available firmware to install on the Device      &lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog             | Optional          | Array of Strings | A list of the changes verses the currently installed version  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])   &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Integer | The firmware version the Device will install     &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=151</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=151"/>
				<updated>2015-07-02T19:54:28Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* GET */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | Boolean    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | Boolean    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device              | firmware         | Object    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update              | Boolean | Will the Device automatically update to the latest firmware version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_target              | Object | The firmware version the Device will install           | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_available              | Array of Objects | A list of available firmware to install on the Device             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog              | Array of Strings | A list of the changes verses the currently installed version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
*Receive the changlog from a particular firmware version  &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/firmware_changelog/{FIRMWARE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog      | Object    | The changelog is only returned if specified explicitly in the request&lt;br /&gt;
}}{{TableRowN| firmware_changelog          | firmware_id        | Integer    |  The ID of the firmware to get the changelog from&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableRowN| device              | firmware          | Optional        | Object    | Firmware version of Device &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Object | The firmware version the Device will install    &lt;br /&gt;
}}{{TableRowN| device          | firmware_available             | Optional          | Array of Objects | A list of available firmware to install on the Device      &lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog             | Optional          | Array of Strings | A list of the changes verses the currently installed version  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])   &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Integer | The firmware version the Device will install     &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=150</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=150"/>
				<updated>2015-07-02T19:51:23Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* GET */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | Boolean    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | Boolean    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device              | firmware         | Object    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update              | Boolean | Will the Device automatically update to the latest firmware version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_target              | Object | The firmware version the Device will install           | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_available              | Array of Objects | A list of available firmware to install on the Device             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog              | Array of Strings | A list of the changes verses the currently installed version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
*Receive the changlog from a particular firmware version  &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/firmware_changelog/{FIRMWARE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableRowN| device              | firmware          | Optional        | Object    | Firmware version of Device &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Object | The firmware version the Device will install    &lt;br /&gt;
}}{{TableRowN| device          | firmware_available             | Optional          | Array of Objects | A list of available firmware to install on the Device      &lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog             | Optional          | Array of Strings | A list of the changes verses the currently installed version  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])   &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Integer | The firmware version the Device will install     &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=149</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=149"/>
				<updated>2015-07-02T19:48:41Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | Boolean    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | Boolean    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device              | firmware         | Object    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update              | Boolean | Will the Device automatically update to the latest firmware version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_target              | Object | The firmware version the Device will install           | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_available              | Array of Objects | A list of available firmware to install on the Device             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog              | Array of Strings | A list of the changes verses the currently installed version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableRowN| device              | firmware          | Optional        | Object    | Firmware version of Device &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Object | The firmware version the Device will install    &lt;br /&gt;
}}{{TableRowN| device          | firmware_available             | Optional          | Array of Objects | A list of available firmware to install on the Device      &lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog             | Optional          | Array of Strings | A list of the changes verses the currently installed version  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])   &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Integer | The firmware version the Device will install     &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=148</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=148"/>
				<updated>2015-07-02T16:02:43Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | Boolean    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | Boolean    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device              | firmware         | Object    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update              | Boolean | Will the Device automatically update to the latest firmware version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_target              | Object | The firmware version the Device will install           | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device          | firmware_available              | Array of Objects | A list of available firmware to install on the Device             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog              | Array of Strings | A list of the changes verses the currently installed version             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableRowN| device              | firmware          | Optional        | Object    | Firmware version of Device &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Object | The firmware version the Device will install    &lt;br /&gt;
}}{{TableRowN| device          | firmware_available             | Optional          | Array of Objects | A list of available firmware to install on the Device      &lt;br /&gt;
}}{{TableRowN| device          | firmware_changelog             | Optional          | Array of Strings | A list of the changes verses the currently installed version  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])   &lt;br /&gt;
}}{{TableRowN| device          | firmware_auto_update             | Optional          | Boolean | Will the Device automatically update to the latest firmware version &lt;br /&gt;
}}{{TableRowN| device          | firmware_target             | Optional          | Integer | The firmware version the Device will install     &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=147</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=147"/>
				<updated>2015-07-01T20:07:15Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* DELETE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
* Move a tier to a different time&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;minutes&amp;quot; : 25&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1324&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
Actions can only be created in Json Mode&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new tier in the call list.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/minutes/{TIER_ID}/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
*Create an Action&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device/&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;create&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;actions&amp;quot; : [ {&lt;br /&gt;
                          &amp;quot;user&amp;quot; : 12345&lt;br /&gt;
                   } ]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1234&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id             | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=146</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=146"/>
				<updated>2015-07-01T19:57:25Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* POST */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
* Move a tier to a different time&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;minutes&amp;quot; : 25&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1324&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
Actions can only be created in Json Mode&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new tier in the call list.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/minutes/{TIER_ID}/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
*Create an Action&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device/&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;create&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;actions&amp;quot; : [ {&lt;br /&gt;
                          &amp;quot;user&amp;quot; : 12345&lt;br /&gt;
                   } ]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1234&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=145</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=145"/>
				<updated>2015-07-01T19:55:53Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* POST */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
* Move a tier to a different time&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;minutes&amp;quot; : 25&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1324&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new tier in the call list.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/minutes/{TIER_ID}/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=144</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=144"/>
				<updated>2015-07-01T19:54:27Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* PUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
* Move a tier to a different time&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/device&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot; : &amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;: {&lt;br /&gt;
          &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;list_id&amp;quot;: 1234,&lt;br /&gt;
              &amp;quot;tiers&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;tier_id&amp;quot;: 20,&lt;br /&gt;
                  &amp;quot;minutes&amp;quot; : 25&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ],&lt;br /&gt;
          &amp;quot;schedule_id&amp;quot;: 1324&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new user action in the call list. (TBD)&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tier/{TIER_ID}/actions/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=143</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=143"/>
				<updated>2015-07-01T19:52:00Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* PUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
Tiers and Actions can only be updated in Json Mode&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new user action in the call list. (TBD)&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tier/{TIER_ID}/actions/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=142</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=142"/>
				<updated>2015-07-01T19:50:23Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;:  4541 ,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: 6646,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The ID of the user. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The ID of the group. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new user action in the call list. (TBD)&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tier/{TIER_ID}/actions/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | The ID of the contact. 'null' for none.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=141</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/calllist&amp;diff=141"/>
				<updated>2015-07-01T19:45:56Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
A call list is a combination of [[Sensaphone.net API/contactgroup|contactgroups]], [[Sensaphone.net API/user|users]], [[Sensaphone.net API/contact|contacts]] within one or more tiers (or, time waits after alarm delivery initiates). They are always contained in one or more [[Sensaphone.net API/alarmschedule|alarm schedules]]. Named call lists can act as templates to be added to various call lists. An unnamed call list is considered bound to the specific alarm schedule that contains it. If a named call list is used in multiple alarm schedules, than any modification to that call list take effect in every alarm schedule that uses it.&lt;br /&gt;
&lt;br /&gt;
Call Lists give users a quick and easy way to add recurring Alarm Schedules to their devices. If the same Alarm Schedule is desired to be used recurrently, Call Lists provides a means to name and save a template to be used for other devices. This will allow a user to quickly add a Call List template to the Alarm Schedule instead of adding the same Contacts, Destinations, and/or Contact Groups for every device.  The structure of a Call Lists is similar  to that of an Alarm Schedule with the exception that you can name and save a Call List to be used again at a later time. &lt;br /&gt;
&lt;br /&gt;
The call list resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''       | '''Description'''                 | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | calllist       | Array of Objects | The call list object              | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| calllist             | list_id        | Integer          | ID of the call list.              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| calllist             | name           | String           | The name of the call list, or &amp;quot;&amp;quot;  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| calllist             | tiers          | Array            | The tiers contained in this call list. | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| tiers                | tier_id        | Integer          | The tier number (in minutes)      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | seqential      | Boolean          | 'true' if the actions in the tier are processed sequentially. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| tiers                | actions        | Array of Objects | The actions in the call list      | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| actions              | action_id      | Integer          | The ID of the action              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | order          | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| actions              | type           | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | user           | Object           | The ID of the user. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | contact        | Object           | The ID of the contact. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| actions              | group          | Object           | The ID of the group. 'null' for none. | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Tiers are created automatically. One merely needs to access the tier as if it exists, and it will be created if needed.&lt;br /&gt;
&lt;br /&gt;
==Example Requests==&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the named call lists (those that are templates).&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/&lt;br /&gt;
*Retrieve the list of tiers in a specific call list.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers&lt;br /&gt;
*Retrieve the list of actions in a call list's tier.&lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The user data for the action. 'null' for none.&lt;br /&gt;
}}{{TableRowN| user                  | user_id            | Optional   | Integer          | The ID of the user.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The contact data for the action. 'null' for none.&lt;br /&gt;
}}{{TableRowN| contact               | contact_id         | Optional   | Integer          | The ID of the contact.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The group data for the action. 'null' for none.&lt;br /&gt;
}}{{TableRowN| group                 | group_id           | Optional   | Integer          | The ID of the group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve the information for a call list.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;calllist&amp;quot;: [&lt;br /&gt;
     { &amp;quot;list_id&amp;quot;: 7767 }&lt;br /&gt;
   ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;,&lt;br /&gt;
   }&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;calllist&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;list_id&amp;quot;: 7767,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Primary Team&amp;quot;,&lt;br /&gt;
        &amp;quot;tiers&amp;quot;:[ &lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;tier_id&amp;quot;: 3645,&lt;br /&gt;
            &amp;quot;sequential&amp;quot;: false,&lt;br /&gt;
            &amp;quot;actions&amp;quot;:[&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8222,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: { &amp;quot;user_id&amp;quot;: 4541 },&lt;br /&gt;
                &amp;quot;contact&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              },&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;action_id&amp;quot;: 8246,&lt;br /&gt;
                &amp;quot;order&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;contact&amp;quot;,&lt;br /&gt;
                &amp;quot;user&amp;quot;: null,&lt;br /&gt;
                &amp;quot;contact&amp;quot;: { &amp;quot;contact_id&amp;quot;: 6646 },&lt;br /&gt;
                &amp;quot;contactgroup&amp;quot;: null,&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Change the name of the call list. Setting this to anything but the blank string will make the call list a template.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/name/{NAME}&lt;br /&gt;
*Change a tier in the call list to a new time offset.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/tier_id/{NEW_TIER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''calllist''' child properties listed below are required in addition to &amp;quot;list_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | calllist           | Required   | Array of Objects | The parent object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist              | name               | Optional   | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableRowN| calllist              | tiers              | Optional   | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers                 | tier_id            | Optional   | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers                 | seqential          | Optional   | Boolean          | 'true' if the actions in the tier are processed sequentially.&lt;br /&gt;
}}{{TableRowN| tiers                 | actions            | Optional   | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions               | action_id          | Optional   | Integer          | The ID of the action&lt;br /&gt;
}}{{TableRowN| actions               | order              | Optional   | Integer          | The order of delivery if sequential delivery is enabled. Lower numbers go first.&lt;br /&gt;
}}{{TableRowN| actions               | type               | Optional   | String           | One of &amp;quot;user&amp;quot;, &amp;quot;contact&amp;quot;, or &amp;quot;group&amp;quot;.&lt;br /&gt;
}}{{TableRowN| actions               | user               | Optional   | Object           | The user data for the action. 'null' for none.&lt;br /&gt;
}}{{TableRowN| user                  | user_id            | Optional   | Integer          | The ID of the user.&lt;br /&gt;
}}{{TableRowN| actions               | contact            | Optional   | Object           | The contact data for the action. 'null' for none.&lt;br /&gt;
}}{{TableRowN| contact               | contact_id         | Optional   | Integer          | The ID of the contact.&lt;br /&gt;
}}{{TableRowN| actions               | group              | Optional   | Object           | The group data for the action. 'null' for none.&lt;br /&gt;
}}{{TableRowN| group                 | group_id           | Optional   | Integer          | The ID of the group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new call list. The name must be provided.&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/name/{NAME}&lt;br /&gt;
*Create a new user action in the call list. (TBD)&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tier/{TIER_ID}/actions/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create a new call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Create a new action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | If type is &amp;quot;user&amp;quot;, otherwise 'null'. See [[Sensaphone.net API/user|users]].&lt;br /&gt;
}}{{TableRowN| user            | user_id                  | Integer          | The ID of the user.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a call list. Only named call lists can be deleted.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}&lt;br /&gt;
*Delete a tier in the call list.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}&lt;br /&gt;
*Delete a user action in the call list's tier.&lt;br /&gt;
   '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/calllist/{LIST_ID}/tiers/{TIER_ID}/actions/{ACTION_ID}/user/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sesnaphone.net/api/v1/calllist/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Delete a call list.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist              | list_id            | Optional   | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | name                     | String           | The name of the call list, or &amp;quot;&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a tier.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | If type is &amp;quot;user&amp;quot;, otherwise 'null'. See [[Sensaphone.net API/user|users]].&lt;br /&gt;
}}{{TableRowN| user            | user_id                  | Integer          | The ID of the user.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Delete a user action.''&lt;br /&gt;
:{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | calllist                 | Array of Objects | The call list object.&lt;br /&gt;
}}{{TableRowN| calllist        | list_id                  | Integer          | ID of call list&lt;br /&gt;
}}{{TableRowN| calllist        | tiers                    | Array            | The tiers contained in this call list.&lt;br /&gt;
}}{{TableRowN| tiers           | tier_id                  | Integer          | The tier number (in minutes)&lt;br /&gt;
}}{{TableRowN| tiers           | actions                  | Array of Objects | The actions in the call list&lt;br /&gt;
}}{{TableRowN| actions         | user                     | Object           | If type is &amp;quot;user&amp;quot;, otherwise 'null'. See [[Sensaphone.net API/user|users]].&lt;br /&gt;
}}{{TableRowN| user            | user_id                  | Integer          | The ID of the user.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=140</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=140"/>
				<updated>2015-06-29T18:03:07Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Timestamps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Timestamps==&lt;br /&gt;
The history APIs such as the Data Log use Sensaphone encoded timestamps.  This allows the timestamps to be independent of the time zone of the client request, and return results adjusted to the time zone of the device, account, etc.  Seconds, minutes, hours, days, and months are 0-indexed, in other words the range of month values is [0,11].  The year value is 2000-based and limited to 100 years.&lt;br /&gt;
&lt;br /&gt;
In order to create a Sensaphone timestamp given the year, month, day, hours, minutes, and seconds, convert each parameter to its equivalent value in seconds.  For the example, in pseudo-code, a factory method would look as following:&lt;br /&gt;
&lt;br /&gt;
 getSensaphoneTimestamp( year, month, day, hour, minute, second )  {&lt;br /&gt;
  return ((seconds                      % 60)) +&lt;br /&gt;
            ((minutes      * 60)        % 3600) +&lt;br /&gt;
            ((hours        * 3600)      % 86400) +&lt;br /&gt;
            ((day          * 86400)     % 2678400) + &lt;br /&gt;
            ((month        * 2678400)   % 32140800) + &lt;br /&gt;
            ((year % 100   * 32140800))  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all changes for a variable:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{1234}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;audit_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;var_ids&amp;quot; : [1234]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive the last 50 logged datas for a log point&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log/log_points/{1234}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;log_points&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=139</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=139"/>
				<updated>2015-06-29T18:01:20Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Timestamps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Timestamps==&lt;br /&gt;
The history APIs such as the Data Log use Sensaphone encoded timestamps.  This allows the timestamps to be independent of the time zone of the client request, and return results adjusted to the time zone of the device, account, etc.  Seconds, minutes, hours, days, and months are 0-indexed, in other words the range of month values is [0,11].  The year value is 2000-based and limited to 100 years.&lt;br /&gt;
&lt;br /&gt;
In order to create a Sensaphone timestamp given the year, month, day, hours, minutes, and seconds, convert each parameter to its equivalent value in seconds.  For the example, in pseudo-code, a factory method would look as following:&lt;br /&gt;
&lt;br /&gt;
 getSensaphoneTimestamp( year, month, day, hour, minute, second )  {&lt;br /&gt;
  return ((seconds                          % 60)) +&lt;br /&gt;
            ((minutes      * 60)              % 3600) +&lt;br /&gt;
            ((hours          * 3600)          % 86400) +&lt;br /&gt;
            ((day             * 86400)        % 2678400) + &lt;br /&gt;
            ((month         * 2678400)    % 32140800) + &lt;br /&gt;
            ((year % 100 * 32140800))  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all changes for a variable:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{1234}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;audit_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;var_ids&amp;quot; : [1234]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive the last 50 logged datas for a log point&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log/log_points/{1234}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;log_points&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=138</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=138"/>
				<updated>2015-06-29T17:35:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Timestamps==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all changes for a variable:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{1234}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;audit_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;var_ids&amp;quot; : [1234]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive the last 50 logged datas for a log point&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log/log_points/{1234}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;log_points&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=137</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=137"/>
				<updated>2015-06-19T14:18:26Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | Boolean    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | Boolean    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=136</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=136"/>
				<updated>2015-06-19T14:14:59Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | String    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | String    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | reset_to_defaults         | Boolean    |  Reset the device settings to factory defaults    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  Destination device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/coordinates&amp;diff=135</id>
		<title>Sensaphone.net API/coordinates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/coordinates&amp;diff=135"/>
				<updated>2015-06-19T13:01:26Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''coordinates''' object holds latitude and longitude coordinates. It is not an individual (top-level) API resource, but is instead used in conjunction with other resources (e.g. [[Sensaphone.net API/device|devices]]).&lt;br /&gt;
&lt;br /&gt;
The coordinates resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''     | '''Description'''        | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | coordinates    | Object         | The coordinates object.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| coordinates          | coordinates_id | Integer        | ID of the address.       | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| coordinates          | lng              | Floating Point |  Longitude               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| coordinates          | lat              | Floating Point | Latitude                | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| coordinates          | cached              | Boolean | Are coordinates from geocoding cache                | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the coordinate data for a particular device.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/coordinates&lt;br /&gt;
&lt;br /&gt;
*Retrieve the latitude coordinate for a particular device's address.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/coordinates/lat&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device/coordinates&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | ''&amp;lt;parent object(s)&amp;gt;'' | Array of Objects | The parent(s) of the &amp;quot;address&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | coordinates            | Array of Objects | The coordinates object&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | coordinates             | Required     | Array of Objects | Address data&lt;br /&gt;
}}{{TableRowN| coordinates               | coordinates_id          | Required     | Integer          | ID of the address.&lt;br /&gt;
}}{{TableRowN| coordinates               | lng                       | Optional     | Floating Point           | Longitude&lt;br /&gt;
}}{{TableRowN| coordinates               | lat                       | Optional     | Floating Point           | Latitude&lt;br /&gt;
}}{{TableRowN| coordinates               | cached                       | Optional     | Boolean           | Are coordinates from geocoding cache&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive coordinates for a device.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;sessionid&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;:[&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
     &amp;quot;coordinates&amp;quot;: null&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code&amp;quot;: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        &amp;quot;coordinates&amp;quot;:[&lt;br /&gt;
         {&lt;br /&gt;
           &amp;quot;coordinates_id&amp;quot;: 28487,&lt;br /&gt;
           &amp;quot;lat&amp;quot;: 39.868809,&lt;br /&gt;
           &amp;quot;lng&amp;quot;: -75.674508&lt;br /&gt;
         }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the coordinates's latitude coordinate.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/device/{DEVICE_ID}/coordinates/lat/{LATITUDE}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/coordinates&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties'''   | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | ''&amp;lt;parent object(s)&amp;gt;''   | Array of Objects | The parent(s) of the &amp;quot;address&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | coordinates              | Array of Objects | The coordinates object&lt;br /&gt;
}}{{TableRowN| coordinates             | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Coordinate's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''coordinates''' child properties listed below is required (other than &amp;quot;coordinates_id&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | coordinates             | Required     | Array of Objects | Address data&lt;br /&gt;
}}{{TableRowN| coordinates               | coordinates_id          | Required     | Integer          | ID of the address.&lt;br /&gt;
}}{{TableRowN| coordinates               | lng                       | Optional     | Floating Point           | Longitude&lt;br /&gt;
}}{{TableRowN| coordinates               | lat                       | Optional     | Floating Point           | Latitude&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=134</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=134"/>
				<updated>2015-06-18T15:45:15Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all changes for a variable:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{1234}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;audit_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;var_ids&amp;quot; : [1234]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive the last 50 logged datas for a log point&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log/log_points/{1234}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;log_points&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=133</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=133"/>
				<updated>2015-06-18T15:30:40Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all changes for a variable:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{1234}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;audit_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;var_ids&amp;quot; : [1234]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=132</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=132"/>
				<updated>2015-06-18T15:28:59Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Audit Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all changes for a variable:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{1234}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=131</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=131"/>
				<updated>2015-06-18T15:25:57Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* GET */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1234}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=130</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=130"/>
				<updated>2015-06-18T15:25:17Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive last 50 &amp;quot;Alarms Events&amp;quot; for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/device_ids/{1924}/event_types/{alarm}/begin_offset/{0}/record_offset/{50}&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;event_log&amp;quot;: {&lt;br /&gt;
        &amp;quot;event_types&amp;quot; : [&amp;quot;alarm&amp;quot;],&lt;br /&gt;
        &amp;quot;device_ids&amp;quot; : [1234],&lt;br /&gt;
        &amp;quot;begin_offset&amp;quot; : 0,&lt;br /&gt;
        &amp;quot;record_offset&amp;quot; : 50&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=129</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=129"/>
				<updated>2015-06-18T15:00:43Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Data Log Points */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=128</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=128"/>
				<updated>2015-06-18T15:00:15Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Data Log Points */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
*'''URI Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''JSON Mode:'''&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;data_log_points&amp;quot;: {&lt;br /&gt;
        &amp;quot;resource_type&amp;quot; : &amp;quot;device&amp;quot;,&lt;br /&gt;
        &amp;quot;device_id&amp;quot; : 1234&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=127</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=127"/>
				<updated>2015-06-18T14:33:17Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Data Log Points */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  The logable points&lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  The type of logable point&lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  The ID of the resource, e.g. &amp;quot;zone_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  The logable point ID&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=126</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=126"/>
				<updated>2015-06-18T14:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  &lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all data logable points for a device:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/data_log_points/resource_type/{device}/device_id/{1234}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=125</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=125"/>
				<updated>2015-06-17T14:33:14Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Event Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  &lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=124</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=124"/>
				<updated>2015-06-17T14:33:02Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Data Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  &lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
Something interesting about event logs...&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=123</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=123"/>
				<updated>2015-06-17T14:32:48Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Audit Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
Something interesting about data logs...&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  &lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
Something interesting about event logs...&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=120</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/history&amp;diff=120"/>
				<updated>2015-06-02T21:00:44Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access==&lt;br /&gt;
The History API allows access to the Audit Log, the Data Log, and the Event Log&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
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.&lt;br /&gt;
  /history/audit_log/var_ids/{1234,9876}/changes/{create}&lt;br /&gt;
&lt;br /&gt;
==Audit Log==&lt;br /&gt;
Something interesting about audit logs...&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  var_ids                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN| changes               | Optional   | Array of String           | list of change types (&amp;quot;create&amp;quot;,&amp;quot;delete&amp;quot;,&amp;quot;update&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | audit_log                | Object       | Audit Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Audit Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | audit_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| audit_log                 |  change              | String         | The change that occurred&lt;br /&gt;
}}{{TableRowN| audit_log                 |  who              | String         |  Who changed it&lt;br /&gt;
}}{{TableRowN| audit_log                 |  what              | String         | What changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| audit_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | audit_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Unacknowledged Alarms&amp;quot; changes:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/audit_log/var_ids/{217744}&lt;br /&gt;
&lt;br /&gt;
==Data Log==&lt;br /&gt;
Something interesting about data logs...&lt;br /&gt;
&lt;br /&gt;
'''Data Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  log_points                 | Optional   | Array of Integer          | list of variable ids &lt;br /&gt;
}}{{TableRowN|  status               | Optional   | Array of String          | list of AlarmStatus (&amp;quot;normal&amp;quot;, &amp;quot;dependency&amp;quot;, &amp;quot;alarm&amp;quot;)&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log                | Object       | Data Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log                 |  record_id              | String         | The id of the record&lt;br /&gt;
}}{{TableRowN| data_log                 |  value              | String         |  The value of the variable&lt;br /&gt;
}}{{TableRowN| data_log                 |  variable              | String         | The variable id&lt;br /&gt;
}}{{TableRowN| data_log                 |  is_alarm              | String         | Is an alarm&lt;br /&gt;
}}{{TableRowN| data_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| history                  | data_log_filter         | Object       | Audit Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Data Log Points==&lt;br /&gt;
Poll the Data Log Points to get the possible logable points to use for the Data Log&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | data_log_points                | Object       | &lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Data Log Points Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | data_log_points               |  Object         | The returned log&lt;br /&gt;
}}{{TableRowN| data_log_points                | resource_type                | String       | the name of the resource, e.g. &amp;quot;device&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | (id_name)                | Integer       |  The ID of the resource, e.g. &amp;quot;device_id&amp;quot;&lt;br /&gt;
}}{{TableRowN| data_log_points                | log_points                | Array of Objects       |  &lt;br /&gt;
}}{{TableRowN| log_points                        | category                     | String           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | (id_name)                     | Integer           |  &lt;br /&gt;
}}{{TableRowN| log_points                        | log_point                    | Integer           |  &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Event Log==&lt;br /&gt;
Something interesting about event logs...&lt;br /&gt;
&lt;br /&gt;
'''Event Log Filter Options'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''           |'''Status'''     | '''Type'''               | '''Description'''&lt;br /&gt;
}}{{TableRowN|  contact_ids                 | Optional   | Array of Integer          | list of contact ids &lt;br /&gt;
}}{{TableRowN|  device_ids                 | Optional   | Array of Integer          | list of device ids &lt;br /&gt;
}}{{TableRowN|  zone_ids                 | Optional   | Array of Integer          | list of zone ids &lt;br /&gt;
}}{{TableRowN|  user_ids               | Optional   | Array of Integer          | list of user ids&lt;br /&gt;
}}{{TableRowN|  event_types               | Optional   | Array of String          | list of event types&lt;br /&gt;
}}{{TableRowN|  start                     | Optional   | Integer           | the start time (unix time)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (unix time)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  the beginning offset of the first record&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  the offset from the beginning&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
&lt;br /&gt;
'''Event Log Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | acctid                   | Integer        | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | String         | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type         | String       | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | history                  | Object      | The History object&lt;br /&gt;
}}{{TableRowN| history                | event_log                | Object       | Event Log Filter Options&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Event Log Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''| '''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | history                   | Object        | The history object&lt;br /&gt;
}}{{TableRowN| history                 | event_log                | Array of Objects         | The returned log&lt;br /&gt;
}}{{TableRowN| event_log                 |  event              | String         | Which event&lt;br /&gt;
}}{{TableRowN| event_log                 |  when              | String         | When it changed&lt;br /&gt;
}}{{TableRowN| event_log                 |  epoch              | Integer         | The epoch time&lt;br /&gt;
}}{{TableRowN| event_log                 |  type              | String         | The type&lt;br /&gt;
}}{{TableRowN| event_log                 |  source              | Object         | The sources of the event&lt;br /&gt;
}}{{TableRowN| source                 |  &amp;lt;source_name&amp;gt;              | String         | A source&lt;br /&gt;
}}{{TableRowN| history                  | event_log_filter         | Object       | Event Log Filter Options (Only returned in V2)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
*Receive all &amp;quot;Alarms Events&amp;quot;:&lt;br /&gt;
  '''GET''' https://rest.sensaphone.net/api/v1/{ACCOUNT}/{SESSION}/history/event_log/type/{alarm}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=117</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=117"/>
				<updated>2015-06-02T15:27:21Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* PUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | String    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | String    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  The destination's device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the device (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=116</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=116"/>
				<updated>2015-05-29T18:10:31Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | String    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | String    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | Integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  The destination's device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=115</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=115"/>
				<updated>2015-05-29T18:10:02Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | String    | Acknowledge a device offline alarm    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | String    | Acknowledge all device/zone alarms    | '''&amp;amp;#x2713;''' | ''' ''' | ''' ''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | clone         | integer    |  Clone a device's data    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.      &lt;br /&gt;
}}{{TableRowN| device                     | clone      | Optional         | Integer    |  The destination's device_id to clone this device's data to&lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=114</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=114"/>
				<updated>2015-05-28T15:13:09Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | ack_offline_alarm         | String    | Acknowledge a device offline alarm    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device                | acknowledge_all_alarms         | String    | Acknowledge all device/zone alarms    | ''' ''' | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=113</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=113"/>
				<updated>2015-05-28T15:09:14Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=112</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=112"/>
				<updated>2015-05-28T15:08:12Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.   &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=111</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=111"/>
				<updated>2015-05-28T15:07:52Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| account          | feature              | Array of Object | The feature linked to the device (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.   &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=110</id>
		<title>Sensaphone.net API/account</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=110"/>
				<updated>2015-05-28T15:07:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The account resource&lt;br /&gt;
&lt;br /&gt;
The account resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''     | '''Description'''        | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | account    | Object         | The account object.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| account          | name              | String |  The name of the account               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | timezone              | String | The timezone which the account is in                | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | feature              | Array of Object | The feature linked to the account (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the account data &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account&lt;br /&gt;
&lt;br /&gt;
*Retrieve the account name&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account/name&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableRowN| account          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])         &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive the account name and timezone&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;sessionid&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;account&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
          &amp;quot;name&amp;quot; : null,&lt;br /&gt;
          &amp;quot;timezone&amp;quot; : null&lt;br /&gt;
      }&lt;br /&gt;
   ]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code&amp;quot;: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;account&amp;quot;: [&lt;br /&gt;
     {&lt;br /&gt;
        &amp;quot;name&amp;quot;:&amp;quot;John's Account&amp;quot;,&lt;br /&gt;
        &amp;quot;timezone&amp;quot;:&amp;quot;Central Time&amp;quot;&lt;br /&gt;
     }]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the account's name.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/account/{NAME}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties'''   | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableRowN| account             | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Account's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''account''' child properties listed below is required&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=109</id>
		<title>Sensaphone.net API/account</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=109"/>
				<updated>2015-05-28T15:06:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* GET */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The account resource&lt;br /&gt;
&lt;br /&gt;
The account resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''     | '''Description'''        | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | account    | Object         | The account object.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| account          | name              | String |  The name of the account               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | timezone              | String | The timezone which the account is in                | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | feature              | Object | The feature linked to the account (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the account data &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account&lt;br /&gt;
&lt;br /&gt;
*Retrieve the account name&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account/name&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableRowN| account          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])         &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive the account name and timezone&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;sessionid&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;account&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
          &amp;quot;name&amp;quot; : null,&lt;br /&gt;
          &amp;quot;timezone&amp;quot; : null&lt;br /&gt;
      }&lt;br /&gt;
   ]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code&amp;quot;: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;account&amp;quot;: [&lt;br /&gt;
     {&lt;br /&gt;
        &amp;quot;name&amp;quot;:&amp;quot;John's Account&amp;quot;,&lt;br /&gt;
        &amp;quot;timezone&amp;quot;:&amp;quot;Central Time&amp;quot;&lt;br /&gt;
     }]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the account's name.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/account/{NAME}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties'''   | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableRowN| account             | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Account's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''account''' child properties listed below is required&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=108</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/device&amp;diff=108"/>
				<updated>2015-05-28T15:06:35Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* Sensaphone.net API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''device''' resource allows access to the devices that are bound to the account.&lt;br /&gt;
&lt;br /&gt;
The device resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' | '''Property'''  | '''Type''' | '''Description'''              | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | device        | Object     | The device object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| device                    | device_id     | Integer    | ID of the device.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | id    | String     | Unique identifier located on the Device (Serial number, etc.)               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                    | name           | String     | Name of Device        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | description    | String     | Short description of Device | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | timezone    | String     | The timezone the Device is in | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                    | location         | Object    | Contains location information for the device.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | address         | Object    | Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| location              | coordinates         | Object    | GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | firmware         | String    | Firmware version of Device  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | default_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | device_schedule         | Object    | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | zone         | Array of Objects    | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | offline_timeout         | Integer    | The number of minutes a device must be offline before it goes into alarm.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device              | product         | String    | The name of the product type    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | modbus_ports        | Array of Objects    | TBD    | ''' ''' | ''' ''' | ''' ''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | zone_meta        | Array of Objects    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | zone        | Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| zone_meta              | children        | Array of Zone Meta Type    | TBD    | ''' ''' | ''' ''' |  '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_offline_unack        | Boolean    | Whether or not an unacknowledged offline alarm exists.   | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device              | is_online        | Boolean    | Whether or not the device is currently online.    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| device                     | standby_time         | String    | The number of minutes a device will be in standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_mode         | String    | A device's standby mode.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| device                     | standby_status         | String    | A device's standby status     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | battery_status     | String    | A device's battery status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | power_status        | String    | A device's power status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableRowN| device                | connection_status         | String    | A device's connection status    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' ''' &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Zone Meta Type'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''        |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  zone_id                   | Integer          | The Zone ID&lt;br /&gt;
}}{{TableRowN| is_enabled                  | Integer          | Is the zone enabled&lt;br /&gt;
}}{{TableRowN| hide_if_disabled             | Boolean           | Hide the zone if disabled&lt;br /&gt;
}}{{TableRowN| add_name                   | String           | The add name&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive all Device data for all Devices in a user's account&lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
&lt;br /&gt;
*Receive all Device data for a specific Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Receive the alarm status of a Device &lt;br /&gt;
  '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/status&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | product            | Optional   | String           | The name of the product type&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device               | zone_meta      | Optional     | Array ofObjects    | TBD &lt;br /&gt;
}}{{TableRowN| zone_meta              | zone            | Optional    | Zone Meta Type    | TBD     &lt;br /&gt;
}}{{TableRowN| zone_meta              | children            | Optional    | Array of Zone Meta Type    | TBD    &lt;br /&gt;
}}{{TableRowN| device                | is_offline_unack   | Optional   | Boolean          | Whether or not an '''unacknowledged''' offline alarm exists.&lt;br /&gt;
}}{{TableRowN| device                | is_online          | Optional   | Boolean          | Whether or not the device is currently online.&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.   &lt;br /&gt;
}}{{TableRowN| device                | standby_mode | Optional          | String    | A device's standby mode.    &lt;br /&gt;
}}{{TableRowN| device                | standby_status    | Optional       | String    | A device's standby status   &lt;br /&gt;
}}{{TableRowN| device                | battery_status    | Optional       | String    | A device's battery status   &lt;br /&gt;
}}{{TableRowN| device                | power_status    | Optional       | String    | A device's power status   &lt;br /&gt;
}}{{TableRowN| device                | battery_value    | Optional       | String    | A device's battery value   &lt;br /&gt;
}}{{TableRowN| device                | power_value    | Optional       | String    | A device's power value   &lt;br /&gt;
}}{{TableRowN| device                | connection_status    | Optional       | String    | A device's connection status   &lt;br /&gt;
}}{{TableRowN| device          | feature             | Optional       | Array of Objects | The feature linked to the account (See [[Sensaphone.net API/feature]])    &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=====Example JSON=====&lt;br /&gt;
Receive all Device information for a specific Device&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
   &amp;quot;session&amp;quot;:&amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;device&amp;quot;: {&lt;br /&gt;
       &amp;quot;device_id&amp;quot;:1234&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON:'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;:true,&lt;br /&gt;
     &amp;quot;code&amp;quot;:0,&lt;br /&gt;
     &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;: &lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        ...&lt;br /&gt;
      }&lt;br /&gt;
     ]&lt;br /&gt;
   }      &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the '''description''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/description/{DESCRIPTION}&lt;br /&gt;
&lt;br /&gt;
*Edit the '''name''' of a Device &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/name/{DEVICE_NAME} &lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableRowN| device          | '''CHILD PROPERTY'''     | &amp;amp;nbsp;           | Device's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''device''' child properties below are required in addition to &amp;quot;device_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | timezone    | Optional      | String           | The timezone the Device is in &lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableRowN| device                | standby_time     | Optional     | String    | The number of minutes a device will be in standby mode.  &lt;br /&gt;
}}{{TableRowN| device                     | standby_mode      | Optional         | String    | A device's standby mode.   &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''Adding a device'''&lt;br /&gt;
&lt;br /&gt;
The preferred method to add a new Device is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Device with only the '''id''' value (not to be confused with the '''device_id'''), all other values will be left empty until a PUT request is used. With the JSON Mode Request you can add a Device with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Add a new Device &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/id/{DEVICEID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | id                       | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property''' |'''Child Property'''|'''Status'''| '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                | device             | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| device                | device_id          | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device                | id                 | Optional   | Integer          | Unique identifier located on the Device (Serial number, etc.)&lt;br /&gt;
}}{{TableRowN| device                | name               | Optional   | String           | Name of Device&lt;br /&gt;
}}{{TableRowN| device                | description        | Optional   | String           | Short description of Device&lt;br /&gt;
}}{{TableRowN| device                | location           | Optional   | Object           | Contains location information for the device.&lt;br /&gt;
}}{{TableRowN| location              | address            | Optional   | Object           |  Address information for Device (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| location              | coordinates        | Optional   | Object           |  GPS Coordinates information for Device (See [[Sensaphone.net API/coordinates]])&lt;br /&gt;
}}{{TableRowN| device                | firmware           | Optional   | String           | Firmware version of Device&lt;br /&gt;
}}{{TableRowN| device                | default_schedule   | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | device_schedule    | Optional   | Object           | Alarm Schedule data (See [[Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| device                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]])&lt;br /&gt;
}}{{TableRowN| device                | offline_timeout    | Optional   | Integer          | The number of minutes a device must be offline before it goes into alarm.&lt;br /&gt;
}}{{TableRowN| device                | modbus_ports       | Optional   | Array of Objects | TBD&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledging Alarms'''&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Acknowledge All Alarms&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}/acknowledge_all_alarms/{true}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                       | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| device          | ack_offline_alarm          | Boolean          | A write-only property that will acknowledge a device offline alarm&lt;br /&gt;
}}{{TableRowN| device          | acknowledge_all_alarms  | Boolean          | A write-only property that will acknowledge all alarms for a device, including all device alarms and all zone alarms&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;acknowledge_all_alarms&amp;quot; supersedes &amp;quot;ack_offline_alarm&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a Device from an account &lt;br /&gt;
  '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | session                  | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | device                   | Array of Objects | The device object.&lt;br /&gt;
}}{{TableRowN| device          | device_id                | Integer          | ID of the device.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=107</id>
		<title>Sensaphone.net API/account</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=107"/>
				<updated>2015-05-28T15:05:45Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* PUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The account resource&lt;br /&gt;
&lt;br /&gt;
The account resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''     | '''Description'''        | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | account    | Object         | The account object.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| account          | name              | String |  The name of the account               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | timezone              | String | The timezone which the account is in                | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | feature              | Object | The feature linked to the account (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the account data &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account&lt;br /&gt;
&lt;br /&gt;
*Retrieve the account name&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account/name&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableRowN| account          | feature             | Optional       | Object | The feature linked to the account (See [[Sensaphone.net API/feature]])         &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive the account name and timezone&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;sessionid&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;account&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
          &amp;quot;name&amp;quot; : null,&lt;br /&gt;
          &amp;quot;timezone&amp;quot; : null&lt;br /&gt;
      }&lt;br /&gt;
   ]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code&amp;quot;: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;account&amp;quot;: [&lt;br /&gt;
     {&lt;br /&gt;
        &amp;quot;name&amp;quot;:&amp;quot;John's Account&amp;quot;,&lt;br /&gt;
        &amp;quot;timezone&amp;quot;:&amp;quot;Central Time&amp;quot;&lt;br /&gt;
     }]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the account's name.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/account/{NAME}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties'''   | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableRowN| account             | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Account's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''account''' child properties listed below is required&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=106</id>
		<title>Sensaphone.net API/account</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php?title=Sensaphone.net_API/account&amp;diff=106"/>
				<updated>2015-05-28T15:05:17Z</updated>
		
		<summary type="html">&lt;p&gt;Tim: /* PUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The account resource&lt;br /&gt;
&lt;br /&gt;
The account resource has the following properties:&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Property'''|'''Property'''  | '''Type'''     | '''Description'''        | '''Create''' | '''Delete''' | '''Read''' | '''Update'''&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''         | account    | Object         | The account object.  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| account          | name              | String |  The name of the account               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | timezone              | String | The timezone which the account is in                | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| account          | feature              | Object | The feature linked to the account (See [[Sensaphone.net API/feature]])              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all the account data &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account&lt;br /&gt;
&lt;br /&gt;
*Retrieve the account name&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account/name&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableRowN| account          | feature             | Optional       | Object | The feature linked to the account (See [[Sensaphone.net API/feature]])         &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive the account name and timezone&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
   &amp;quot;sessionid&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,&lt;br /&gt;
   &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
   &amp;quot;account&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
          &amp;quot;name&amp;quot; : null,&lt;br /&gt;
          &amp;quot;timezone&amp;quot; : null&lt;br /&gt;
      }&lt;br /&gt;
   ]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*'''Response JSON'''&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;result&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;success&amp;quot;: true,&lt;br /&gt;
     &amp;quot;code&amp;quot;: 0,&lt;br /&gt;
     &amp;quot;message&amp;quot;: &amp;quot;OK&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;response&amp;quot;:&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;account&amp;quot;: [&lt;br /&gt;
     {&lt;br /&gt;
        &amp;quot;name&amp;quot;:&amp;quot;John's Account&amp;quot;,&lt;br /&gt;
        &amp;quot;timezone&amp;quot;:&amp;quot;Central Time&amp;quot;&lt;br /&gt;
     }]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Edit the account's name.&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/account/{NAME}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/account&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties''' | '''Child Properties'''   | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                 | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                | Integer          | Session ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | account            | Array of Objects | The accounts object&lt;br /&gt;
}}{{TableRowN| account             | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Account's child properties to be edited*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''account''' child properties listed below is required&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Parent Properties'''   | '''Child Property'''    | '''Status''' | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                    | ''&amp;lt;parent object(s)&amp;gt;''  | Optional     | Array of Objects | The parent(s) specified in the request.&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''              | account             | Required     | Array of Objects | Account Data&lt;br /&gt;
}}{{TableRowN| account          | name              | Optional      | String | The name of the account &lt;br /&gt;
}}{{TableRowN| account          | timezone              | Optional      | String | The timezone which the account is in  &lt;br /&gt;
}}{{TableRowN| account          | feature             | Optional       | Object | The feature linked to the account              &lt;br /&gt;
}}{{TableRowN| feature          | feature_id          | Required          | Integer | The ID of the feature                    &lt;br /&gt;
}}{{TableRowN| feature          | option          | Optional          | String | The value of the feature     &lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	</feed>