<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.sensaphone.net/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>Sensaphone.net - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.sensaphone.net/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Special:NewPages"/>
		<updated>2026-05-04T15:13:19Z</updated>
		<subtitle>From Sensaphone.net</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/FAQ</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/FAQ"/>
				<updated>2020-11-17T02:38:35Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* List Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Where's the API Documentation?==&lt;br /&gt;
[[Sensaphone.net API|REST API docs]]&lt;br /&gt;
&lt;br /&gt;
==How do I make REST calls?==&lt;br /&gt;
'''All REST requests should be made against https://rest.sensaphone.net'''&lt;br /&gt;
&lt;br /&gt;
We recommend the use of a REST client for developing and testing calls to our REST API.  Searching for 'rest client' in your favorite search engine will turn up many suitable results.&lt;br /&gt;
&lt;br /&gt;
==How do I login?==&lt;br /&gt;
===Overview===&lt;br /&gt;
To use the Sensaphone REST API, a login call must first be made.  A successful login request will return an account number and a session token.  These will be used in all subsequent requests.  Two examples of login requests are shown below.  First, the URI-mode version, followed by the JSON-mode version.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
URI-mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
POST https://rest.sensaphone.net/api/v1/login/{myuser@example.com}/{abc123_my_password}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON-mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
POST https://rest.sensaphone.net/api/v1/login&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;create&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;login&amp;quot;,&lt;br /&gt;
  &amp;quot;user_name&amp;quot;: &amp;quot;myuser@example.com&amp;quot;,&lt;br /&gt;
  &amp;quot;password&amp;quot;: &amp;quot;abc123_my_password&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reply===&lt;br /&gt;
The reply to a successful login request will contain a '''result''' object and a '''response''' object.  The '''result''' communicates the overall success of the call.  The '''response''' contains the data in which we are interested: in this case, the account number (acctid), and the session token.  The account number and session token will be used in every subsequent query submitted to the API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;result&amp;quot;: {&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;Success&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;response&amp;quot;: {&lt;br /&gt;
    &amp;quot;acctid&amp;quot;: 21620750,&lt;br /&gt;
    &amp;quot;session&amp;quot;: &amp;quot;1234ffffeeee5678aaaccda609cd8fb5099&amp;quot;,&lt;br /&gt;
    &amp;quot;login_timestamp&amp;quot;: 1605562465,&lt;br /&gt;
    &amp;quot;session_expiration&amp;quot;: 86400,&lt;br /&gt;
    &amp;quot;user_id&amp;quot;: 12345678&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [[Sensaphone.net API/login|Login Resource]]: Additional information about the login resource&lt;br /&gt;
# [[Sensaphone.net API#Overview|URI-mode/JSON-mode]]: Information about URI-mode and JSON-mode&lt;br /&gt;
&lt;br /&gt;
==How do I access log data?==&lt;br /&gt;
===Overview===&lt;br /&gt;
Queries to our logging facilities are one of the most popular uses of the Sensaphone API.  Making a successful log query involves first acquiring multiple pieces of data from the API.  Because of this fact, crafting your first log query will be a multi-step process.  All logs are accessed through the [[Sensaphone.net_API/history|history resource]].  Outlined below you will find a practical example of how to gather the data needed to make a successful query to the history resource.  We will use JSON-mode for each request as we gather the info required to query for datalogs.&lt;br /&gt;
&lt;br /&gt;
If there are multiple log points within a similar time range you wish to access, it is generally more efficient to submit a request which includes all log points in which you are interested and use larger page sizes.  You can then page through the results returned by the API, processing as you go.  This is preferable to smaller, more frequent requests to individual log points using smaller page sizes.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Datalog====&lt;br /&gt;
Every device (e.g. Sentinel, Sentinel Pro, Stratus) associated with an account has input zones to which sensors may be connected.  A device may be configured to log the value of any input zone at specific intervals.  On [https://www.sensaphone.net www.sensaphone.net] (the Website) the user may query a time range of datalog records for a single device.  Users of the REST API can make similar queries against the input zones of one or more devices.&lt;br /&gt;
&lt;br /&gt;
The data required to perform a datalog query are defined as follows:&lt;br /&gt;
; log_points/data_log_points&lt;br /&gt;
: List of one or more globally unique numeric ID's, each representing a &amp;quot;loggable&amp;quot; device zone.&lt;br /&gt;
; begin_offset&lt;br /&gt;
: The offset of the first record to be returned to the caller.  An offset of 0 indicates the beginning of the queried timerange.  Increasing this offset by 50, for example, means we return results beginning with the fiftieth record obtained by the query.  Use this value to &amp;quot;page&amp;quot; through results in descending order, newest to oldest.  Experiment to find an offset value that works well for your application.  Works in tandem with &amp;quot;record_offset&amp;quot;.&lt;br /&gt;
; record_offset&lt;br /&gt;
: Number of results to return per &amp;quot;page&amp;quot;.&lt;br /&gt;
; start&lt;br /&gt;
: The greatest (most recent) [[Sensaphone.net_API/history#Timestamps|Sensaphone-encoded timestamp]] we are interested in, ''non-inclusive''.  Also [[#How do I calculate Sensaphone-encoded timestamps?|see below]] for more details about how this value may be calculated.&lt;br /&gt;
; end&lt;br /&gt;
: The least (oldest) [[Sensaphone.net_API/history#Timestamps|Sensaphone-encoded timestamp]] we are interested in, ''inclusive''.  Also [[#How do I calculate Sensaphone-encoded timestamps?|see below]] for more details about how this value may be calculated.&lt;br /&gt;
&lt;br /&gt;
We will take the following steps to retrieve the information necessary for a query to the datalog facility:&lt;br /&gt;
# Get a list of devices associated with an account&lt;br /&gt;
# Get a list of '''log_points''' from a device&lt;br /&gt;
# Calculate Sensaphone-encoded '''start''' and '''end''' timestamps&lt;br /&gt;
# Query for datalog records&lt;br /&gt;
# Page through the results&lt;br /&gt;
&lt;br /&gt;
For the remainder of this example, let's assume the following:&lt;br /&gt;
  acctid = 12345678  # account_id&lt;br /&gt;
  session = 1234aaa5678bbbb8765cccc4321dddd  # session token&lt;br /&gt;
&lt;br /&gt;
=====List Devices=====&lt;br /&gt;
First let's list all devices associated with our account and choose one from the results.  To do this we will make a call to the Dashboard resource, requesting the name and device_id of each device on our account.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
POST https://rest.sensaphone.net/api/v1/{12345678}/{1234aaa5678bbbb8765cccc4321dddd}/dashboard&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;dashboard&amp;quot;,&lt;br /&gt;
  &amp;quot;dashboard&amp;quot;: {&lt;br /&gt;
    &amp;quot;device&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: null,&lt;br /&gt;
        &amp;quot;name&amp;quot;: null&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The array of device data can be found in the '''response''' object in the server's reply.  For the remainder of this example let's assume we have acquired the following device_id:&lt;br /&gt;
  device_id = 9191&lt;br /&gt;
&lt;br /&gt;
=====List Log Points=====&lt;br /&gt;
With a device_id of 9191 in hand, we may now query for log_points associated with that device.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
POST https://rest.sensaphone.net/api/v1/{12345678}/{1234aaa5678bbbb8765cccc4321dddd}/history/data_log_points&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;history&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;: 9191&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server's reply will contain data for each loggable zone, including input zones and output zones.  The log_point value of each zone is unique across all devices.  Therefore a log_point value of 78208181 will refer to one, and only one, zone.  Extract log_point values for all zones to be queried.&lt;br /&gt;
&lt;br /&gt;
Assume we have decided to pull datalog records for the following log points:&lt;br /&gt;
  15144093&lt;br /&gt;
  15145683&lt;br /&gt;
  15148853&lt;br /&gt;
&lt;br /&gt;
=====Calculate start and end timestamps=====&lt;br /&gt;
Calculate the '''start''' and '''end''' timestamps [[#How do I calculate Sensaphone-encoded timestamps?|as outlined here]].  The range of records returned will fall in the range ''(start, end]'', meaning records will be considered a match if the date of the record equals '''end''' all the way up to, but not including, '''start'''.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;border-left: 4px solid #f90; background-color: #fff8e6; width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;amp;#9888; Warning: &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; are reversed from convention.'''&lt;br /&gt;
&lt;br /&gt;
In the datalog API, &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; is the '''most recent''' (newest) timestamp in your range,&lt;br /&gt;
and &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; is the '''oldest''' timestamp. Records are returned in descending order, newest first.&lt;br /&gt;
The query range is '''exclusive''' of &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; and '''inclusive''' of &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt;,&lt;br /&gt;
expressed as the interval &amp;lt;code&amp;gt;(start, end]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Let's assume we wish to query the following two dates:&lt;br /&gt;
  start = November 18, 2020 12:30pm --&amp;gt; sensaphone_time(2020, 10, 17, 12, 30, 00) --&amp;gt; 671113800&lt;br /&gt;
  end   = November 01, 2020 12:00am --&amp;gt; sensaphone_time(2020, 10, 00, 00, 00, 00) --&amp;gt; 669600000&lt;br /&gt;
&lt;br /&gt;
=====Make the request=====&lt;br /&gt;
Now that we have all the necessary data we can put it together and make our datalog request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
POST https://rest.sensaphone.net/api/v1/{12345678}/{1234aaa5678bbbb8765cccc4321dddd}/history/data_log&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;history&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;: {&lt;br /&gt;
    &amp;quot;data_log&amp;quot;: {&lt;br /&gt;
      &amp;quot;log_points&amp;quot;: [ 15144093, 15145683, 15148853 ],&lt;br /&gt;
      &amp;quot;start&amp;quot;: 671113800,&lt;br /&gt;
      &amp;quot;end&amp;quot;: 669600000,&lt;br /&gt;
      &amp;quot;begin_offset&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;record_offset&amp;quot;: 1000&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming records exist for those log_points during that time range, 1000 of them will be returned.  Why 1000?  Recall that record_offset determines the maximum number of records to be returned per request.&lt;br /&gt;
&lt;br /&gt;
=====Paging through results=====&lt;br /&gt;
If there are more records to be reviewed, we can page through our results by making another call.  This time we will increment the '''begin_offset''' by the number of records per page ('''record_offset''').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; highlight=10&amp;gt;&lt;br /&gt;
POST https://rest.sensaphone.net/api/v1/{12345678}/{1234aaa5678bbbb8765cccc4321dddd}/history/data_log&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;history&amp;quot;,&lt;br /&gt;
  &amp;quot;history&amp;quot;: {&lt;br /&gt;
    &amp;quot;data_log&amp;quot;: {&lt;br /&gt;
      &amp;quot;log_points&amp;quot;: [ 15144093, 15145683, 15148853 ],&lt;br /&gt;
      &amp;quot;start&amp;quot;: 671113800,&lt;br /&gt;
      &amp;quot;end&amp;quot;: 669600000,&lt;br /&gt;
      &amp;quot;begin_offset&amp;quot;: 1000,&lt;br /&gt;
      &amp;quot;record_offset&amp;quot;: 1000&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Queries against zones of multiple devices=====&lt;br /&gt;
Recall that zone ID's are unique across '''all''' devices.  If you wish to query for datalog records on zones across multiple devices, simply acquire the log points for the zones of the devices you wish to view and make your query as we have shown above.  The only difference here is that the log points used in the request represent zones across more than one device.&lt;br /&gt;
&lt;br /&gt;
===Tips for Effective Datalog Requests===&lt;br /&gt;
# When datalog values for multiple log points are required, an efficient request will include several log points of interest over a given time range with a larger page size (record_offset).  This provides more context to the API, allowing it to prefetch records as you page through your results.  Avoid making flurries of requests for individual log points and/or using small page sizes where a larger more comprehensive request can be made.&lt;br /&gt;
# Adjust your page size (record_offset) to your use case.  If performing bulk processing then prefer larger page sizes.  Smaller page sizes may be preferable if you are displaying results for users to read.&lt;br /&gt;
# Acquire datalog values from multiple devices in the same query if the desired time ranges are compatible.&lt;br /&gt;
# Datalog values are not 'live' data.  Polling the API repeatedly for recent datalog values will not cause them to appear faster.  Datalog records are periodically uploaded to our servers in batches by each device at a set interval.  The exact time at which these uploads take place is negotiated between the device and server.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [[Sensaphone.net API/history|History]]: Documentation for the history resource.&lt;br /&gt;
* [[Sensaphone.net API/device|Device]]: Documentation for the device resource.&lt;br /&gt;
* [[Sensaphone.net API/history#Timestamps|Sensaphone Timestamps]]: Documentation for Sensaphone-encoded timestamps.&lt;br /&gt;
* [[Sensaphone.net API/history#Data Log Points|Data Log Points]]: Documentation for the data_log_points resource.&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Modulo_operation Modulo (mod) operation]: Information about the modulo operation.&lt;br /&gt;
&lt;br /&gt;
==How do I calculate Sensaphone-encoded timestamps?==&lt;br /&gt;
===Overview===&lt;br /&gt;
Internally, the Sensaphone API uses a custom date encoding.  The only time a user of the REST API must worry about these encoded timestamps is when making requests against the [[Sensaphone.net API/history|history]] resource.&lt;br /&gt;
&lt;br /&gt;
The most important thing to keep in mind when converting to Sensaphone timestamps:  &amp;lt;strong&amp;gt;All data passed into the algorithm is base-0&amp;lt;/strong&amp;gt;.  This means that the first day of the month is not 1, but 0.  Likewise January is not 1, but 0.  Due to the fact that we count our minutes and seconds from 0, you will not notice a difference when passing these values into the algorithm.  The same goes for the year. Where this base-0 concept will have the most noticeable impact will be ''hour of the day'', ''day of the month'', and ''month of the year''.&lt;br /&gt;
&lt;br /&gt;
Observe:&lt;br /&gt;
* 0 - 59 seconds per minute&lt;br /&gt;
* 0 - 59 minutes per hour&lt;br /&gt;
* 0 - 23 hours per day (0 = 12am, 1, 2, ..., 23 = 11pm)&lt;br /&gt;
* 0 - 30 are 31-day months&lt;br /&gt;
* 0 - 29 are 30-day months&lt;br /&gt;
* 0 - 27 most Februaries&lt;br /&gt;
* 0 - 28 leap-year Februaries&lt;br /&gt;
* 0 - 11 months per year&lt;br /&gt;
* 2000 - ... the year&lt;br /&gt;
&lt;br /&gt;
The algorithm in pseudocode:&lt;br /&gt;
  timestamp &amp;lt;-- (seconds mod 60) +                  // 0 - 59&lt;br /&gt;
                ((minutes * 60) mod 3600) +         // 0 - 59&lt;br /&gt;
                ((hours * 3600) mod 86400) +        // 0 - 23&lt;br /&gt;
                ((day * 86400) mod 2678400) +       // 0 - 31&lt;br /&gt;
                ((month * 2678400) mod 32140800) +  // 0 - 11&lt;br /&gt;
                ((year mod 100) * 32140800)         // 2000 - ...&lt;br /&gt;
&lt;br /&gt;
===Implementations===&lt;br /&gt;
Provided below are some helpful functions to convert date and time into Sensaphone time stamps.&lt;br /&gt;
&lt;br /&gt;
==== Bash ====&lt;br /&gt;
&lt;br /&gt;
This implementation accepts a natural language date string and uses the&lt;br /&gt;
&amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; program to parse it, handling base-0 conversion internally.&lt;br /&gt;
Both GNU &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; (Linux) and BSD &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; (macOS) are supported.&lt;br /&gt;
This snippet is useful if you are using cURL to make your REST calls from the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sensaphone_time() {&lt;br /&gt;
    local date_string=&amp;quot;$1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # Parse date string to Unix timestamp&lt;br /&gt;
    # GNU date (Linux) accepts free-form strings via -d&lt;br /&gt;
    # BSD date (macOS) requires ISO 8601 format: &amp;quot;YYYY-MM-DD HH:MM:SS&amp;quot;&lt;br /&gt;
    if date --version &amp;amp;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1; then&lt;br /&gt;
        local unix_time=$(date -d &amp;quot;$date_string&amp;quot; +%s)&lt;br /&gt;
    else&lt;br /&gt;
        local unix_time=$(date -j -f &amp;quot;%Y-%m-%d %H:%M:%S&amp;quot; &amp;quot;$date_string&amp;quot; +%s)&lt;br /&gt;
    fi&lt;br /&gt;
&lt;br /&gt;
    # Decompose Unix timestamp into components (day and month adjusted to base-0)&lt;br /&gt;
    local second=$(date -d &amp;quot;@$unix_time&amp;quot; +%-S 2&amp;gt;/dev/null || date -r &amp;quot;$unix_time&amp;quot; +%-S)&lt;br /&gt;
    local minute=$(date -d &amp;quot;@$unix_time&amp;quot; +%-M 2&amp;gt;/dev/null || date -r &amp;quot;$unix_time&amp;quot; +%-M)&lt;br /&gt;
    local hour=$(date -d &amp;quot;@$unix_time&amp;quot; +%-H 2&amp;gt;/dev/null || date -r &amp;quot;$unix_time&amp;quot; +%-H)&lt;br /&gt;
    local day=$(( $(date -d &amp;quot;@$unix_time&amp;quot; +%-d 2&amp;gt;/dev/null || date -r &amp;quot;$unix_time&amp;quot; +%-d) - 1 ))&lt;br /&gt;
    local month=$(( $(date -d &amp;quot;@$unix_time&amp;quot; +%-m 2&amp;gt;/dev/null || date -r &amp;quot;$unix_time&amp;quot; +%-m) - 1 ))&lt;br /&gt;
    local year=$(date -d &amp;quot;@$unix_time&amp;quot; +%Y 2&amp;gt;/dev/null || date -r &amp;quot;$unix_time&amp;quot; +%Y)&lt;br /&gt;
&lt;br /&gt;
    local sensaphone_timestamp=$(( (second            % 60) +&lt;br /&gt;
                                   ((minute      * 60) % 3600) +&lt;br /&gt;
                                   ((hour        * 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;
    echo $sensaphone_timestamp&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# GNU date (Linux) - accepts natural language strings&lt;br /&gt;
sensaphone_time &amp;quot;November 18 2020 12:30:00&amp;quot;   # --&amp;gt; 671113800&lt;br /&gt;
sensaphone_time &amp;quot;2020-11-18 12:30:00&amp;quot;         # --&amp;gt; 671113800&lt;br /&gt;
&lt;br /&gt;
# BSD date (macOS) - requires ISO 8601 format&lt;br /&gt;
sensaphone_time &amp;quot;2020-11-18 12:30:00&amp;quot;         # --&amp;gt; 671113800&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Zsh ====&lt;br /&gt;
This implementation uses the &amp;lt;code&amp;gt;zsh/datetime&amp;lt;/code&amp;gt; module's &amp;lt;code&amp;gt;strptime&amp;lt;/code&amp;gt;&lt;br /&gt;
and &amp;lt;code&amp;gt;strftime&amp;lt;/code&amp;gt; builtins to parse and decompose dates without invoking&lt;br /&gt;
an external &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; program. It accepts ISO 8601 format date strings&lt;br /&gt;
and handles base-0 conversion internally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sensaphone_time() {&lt;br /&gt;
    local date_string=&amp;quot;$1&amp;quot;&lt;br /&gt;
    local unix_time&lt;br /&gt;
&lt;br /&gt;
    # Load zsh datetime module for strptime and strftime builtins&lt;br /&gt;
    zmodload zsh/datetime&lt;br /&gt;
&lt;br /&gt;
    # Parse date string to Unix timestamp using the strptime builtin.&lt;br /&gt;
    # Accepts ISO 8601 format: &amp;quot;YYYY-MM-DD HH:MM:SS&amp;quot;&lt;br /&gt;
    strptime -s unix_time &amp;quot;%Y-%m-%d %H:%M:%S&amp;quot; &amp;quot;$date_string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # Decompose Unix timestamp into named components using strftime -s.&lt;br /&gt;
    # strftime zero-pads values (e.g. &amp;quot;08&amp;quot;), so we use (( x + 0 )) to&lt;br /&gt;
    # strip leading zeros before arithmetic to avoid octal interpretation.&lt;br /&gt;
    # Day and month are adjusted to base-0 as required by the API.&lt;br /&gt;
    local -A t&lt;br /&gt;
    strftime -s t[second] &amp;quot;%S&amp;quot; $unix_time&lt;br /&gt;
    strftime -s t[minute] &amp;quot;%M&amp;quot; $unix_time&lt;br /&gt;
    strftime -s t[hour]   &amp;quot;%H&amp;quot; $unix_time&lt;br /&gt;
    strftime -s t[day]    &amp;quot;%d&amp;quot; $unix_time&lt;br /&gt;
    strftime -s t[month]  &amp;quot;%m&amp;quot; $unix_time&lt;br /&gt;
    strftime -s t[year]   &amp;quot;%Y&amp;quot; $unix_time&lt;br /&gt;
&lt;br /&gt;
    local second=$(( t[second] + 0 ))&lt;br /&gt;
    local minute=$(( t[minute] + 0 ))&lt;br /&gt;
    local hour=$(( t[hour]   + 0 ))&lt;br /&gt;
    local day=$(( t[day]     + 0 - 1 ))&lt;br /&gt;
    local month=$(( t[month] + 0 - 1 ))&lt;br /&gt;
    local year=$(( t[year]   + 0 ))&lt;br /&gt;
&lt;br /&gt;
    echo $(( (second            % 60) +&lt;br /&gt;
             ((minute      * 60) % 3600) +&lt;br /&gt;
             ((hour        * 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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# Accepts ISO 8601 format date strings&lt;br /&gt;
sensaphone_time &amp;quot;2020-11-18 12:30:00&amp;quot;  # --&amp;gt; 671113800&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;border-left: 4px solid #f90; background-color: #fff8e6; width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;amp;#9888; Note: &amp;lt;code&amp;gt;zsh/datetime&amp;lt;/code&amp;gt; and timezone behavior'''&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;zsh/datetime&amp;lt;/code&amp;gt; module is included in all standard zsh&lt;br /&gt;
distributions and does not require separate installation. As with the other&lt;br /&gt;
implementations on this page, dates are interpreted in local time. To use UTC,&lt;br /&gt;
set &amp;lt;code&amp;gt;TZ=UTC&amp;lt;/code&amp;gt; before calling the function, or export it in your&lt;br /&gt;
environment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Python====&lt;br /&gt;
&lt;br /&gt;
This implementation accepts a standard &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; object.&lt;br /&gt;
Note that Python's &amp;lt;code&amp;gt;datetime.day&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datetime.month&amp;lt;/code&amp;gt;&lt;br /&gt;
are both 1-indexed, so both are adjusted to base-0 internally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
from datetime import datetime&lt;br /&gt;
&lt;br /&gt;
def sensaphone_time(dt):&lt;br /&gt;
    return (dt.second     % 60) + \&lt;br /&gt;
        ( (dt.minute      * 60) % 3600) + \&lt;br /&gt;
        ( (dt.hour        * 3600) % 86400) + \&lt;br /&gt;
        (((dt.day - 1)    * 86400) % 2678400) + \&lt;br /&gt;
        (((dt.month - 1)  * 2678400) % 32140800) + \&lt;br /&gt;
        ( (dt.year % 100) * 32140800)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
# November 18, 2020 12:30pm (local time)&lt;br /&gt;
dt = datetime(2020, 11, 18, 12, 30, 0)&lt;br /&gt;
print(sensaphone_time(dt))  # --&amp;gt; 671113800&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== PHP ====&lt;br /&gt;
&lt;br /&gt;
This implementation accepts a standard &amp;lt;code&amp;gt;DateTime&amp;lt;/code&amp;gt; object.&lt;br /&gt;
PHP's &amp;lt;code&amp;gt;DateTime&amp;lt;/code&amp;gt; uses 1-indexed days and months, so both&lt;br /&gt;
are adjusted to base-0 internally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
function sensaphone_time(DateTime $dt): int {&lt;br /&gt;
    $second = (int)$dt-&amp;gt;format('s');&lt;br /&gt;
    $minute = (int)$dt-&amp;gt;format('i');&lt;br /&gt;
    $hour   = (int)$dt-&amp;gt;format('G');&lt;br /&gt;
    $day    = (int)$dt-&amp;gt;format('j') - 1;&lt;br /&gt;
    $month  = (int)$dt-&amp;gt;format('n') - 1;&lt;br /&gt;
    $year   = (int)$dt-&amp;gt;format('Y');&lt;br /&gt;
&lt;br /&gt;
    return ($second    % 60) +&lt;br /&gt;
        (($minute      * 60) % 3600) +&lt;br /&gt;
        (($hour        * 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;
?&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// November 18, 2020 12:30pm (local time)&lt;br /&gt;
$dt = new DateTime('2020-11-18 12:30:00');&lt;br /&gt;
echo sensaphone_time($dt);  // --&amp;gt; 671113800&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====JavaScript====&lt;br /&gt;
&lt;br /&gt;
This implementation accepts a standard JavaScript &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt; object,&lt;br /&gt;
handling the base-0 conversion for day-of-month internally. It is compatible&lt;br /&gt;
with both browser environments and Node.js.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
function sensaphoneTime(date) {&lt;br /&gt;
    return (  date.getSeconds()              % 60) +&lt;br /&gt;
           ( (date.getMinutes()         * 60) % 3600) +&lt;br /&gt;
           ( (date.getHours()           * 3600) % 86400) +&lt;br /&gt;
           (((date.getDate() - 1)       * 86400) % 2678400) +  // Note: We must subtract 1!&lt;br /&gt;
           ( (date.getMonth()           * 2678400) % 32140800) +&lt;br /&gt;
           ( (date.getFullYear() % 100) * 32140800);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; line&amp;gt;&lt;br /&gt;
// November 18, 2020 12:30pm (local time)&lt;br /&gt;
const date = new Date(2020, 10, 18, 12, 30, 0);&lt;br /&gt;
sensaphoneTime(date); // --&amp;gt; 671113800&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [[Sensaphone.net API/history#Timestamps|Sensaphone-encoded timestamps]]:  More info regarding timestamp encoding&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Modulo_operation Modulo (mod) operation]: Information about the modulo operation.&lt;/div&gt;</summary>
		<author><name>Mwood</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/feature</id>
		<title>Sensaphone.net API/feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/feature"/>
				<updated>2015-05-28T13:58:40Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The feature resource&lt;br /&gt;
&lt;br /&gt;
The feature 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;''           | feature              | Array of Object | The feature linked to the account/device               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| feature          | feature_id              | Integer | The ID of the feature              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  ''' '''&lt;br /&gt;
}}{{TableRowN| feature          | resource              | String | The resource of the feature              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  ''' '''&lt;br /&gt;
}}{{TableRowN| feature          | description              | String | The description of the feature              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  ''' '''&lt;br /&gt;
}}{{TableRowN| feature          | resource_id              | Integer | The ID of the resource              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  ''' '''&lt;br /&gt;
}}{{TableRowN| feature          | parent_ids              | Array of Integers | The IDs of the parent features              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  ''' '''&lt;br /&gt;
}}{{TableRowN| feature          | option              | String | The value of the feature              | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' |  '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| feature          | is_hidden              | Boolean |  Is the feature hidden             | ''' ''' | ''' ''' | '''&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 features &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account/feature&lt;br /&gt;
&lt;br /&gt;
*Retrieve all the device features&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/feature&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/feature&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                | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | feature            | Array of Objects | The features 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;''           | feature             | Required       | Object | The feature linked to the account/device              &lt;br /&gt;
}}{{TableRowN| feature          | feature_id          | Required          | Integer | The ID of the feature            &lt;br /&gt;
}}{{TableRowN| feature          | resource            | Optional        | String | The resource of the feature            &lt;br /&gt;
}}{{TableRowN| feature          | description         | Optional           | String | The description of the feature            &lt;br /&gt;
}}{{TableRowN| feature          | resource_id        | Optional            | Integer | The ID of the resource            &lt;br /&gt;
}}{{TableRowN| feature          | parent_ids          | Optional          | Array of Integers | The IDs of the parent features           &lt;br /&gt;
}}{{TableRowN| feature          | option          | Optional          | String | The value of the feature             &lt;br /&gt;
}}{{TableRowN| feature          | is_hidden          | Optional          | Boolean |  Is the feature hidden            &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive all the account features' option&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;option&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;feature&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;feature_id&amp;quot; : 1234,&lt;br /&gt;
                &amp;quot;option&amp;quot; : &amp;quot;Premium&amp;quot;&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 an account feature&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/account/feature/option/{NEW_OPTION}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/account/feature&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/device/feature&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                | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type           | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''            | feature            | Array of Objects | The feature object&lt;br /&gt;
}}{{TableRowN| feature             | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Feature's 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 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;''       | feature             | Optional       | Object | The feature linked to the account/device              &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>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/contact</id>
		<title>Sensaphone.net API/contact</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/contact"/>
				<updated>2015-04-29T19:26:06Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
The Destination object contains the information needed for alarm notifications to a [[Sensaphone.net API/user|'''User''']], [[Sensaphone.net API/calllist|'''Call Lists''']], and/or [[Sensaphone.net API/alarmschedule|'''Alarm Schedule''']]. &lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
*A contact is its own API resource. It represents a single destination for alarm delivery. The resource will be used for creating, adding, and editing both user dependent and independent contacts in Call List or Alarm Schedule.  In addition, a contact object can be accessed from other API resources such as [[Sensaphone.net API/user|'''User''']] and [[Sensaphone.net API/contactgroup|'''Contact Group''']].&lt;br /&gt;
&lt;br /&gt;
The contact 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;''         | contact        | Object     | The contact object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| contact              | contact_id     | Integer    | ID of the contact.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| contact              | destination    | String     | The destination.               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| contact              | type           | String     | The destination's type.        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| contact              | description    | String     | The destination's description. | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| contact              | enable         | Boolean    | If the contact is enabled.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| contact              | schedule       | Object     | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])  | ''' ''' | ''' ''' | '''&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 information for all of a user's contacts.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact&lt;br /&gt;
*Retrieve the description of a specific user's contact.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/{CONTACT_ID}/description&lt;br /&gt;
*Retrieve all of the contact IDs for a particular user's contacts.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/contact_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/user/alarm_user/contact&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                  | String           | Session Token&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;contact&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | contact                  | Array of Objects | The contact 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;          | ''&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;''    | contact                 | Required     | Array of Objects | The contact object&lt;br /&gt;
}}{{TableRowN| contact         | contact_id              | Optional     | Integer          | ID for contact&lt;br /&gt;
}}{{TableRowN| contact         | type                    | Optional     | String           | Phone, SMS or Email (Use a V2 [[Sensaphone.net_API/contact#GET|read command]] to retrieve the valid values)&lt;br /&gt;
}}{{TableRowN| contact         | destination             | Optional     | String           | Phone number, Email address, etc. of contact's destination&lt;br /&gt;
}}{{TableRowN| contact         | description             | Optional     | String           | Short description describing the destination ex: &amp;quot;Work Phone&amp;quot; &lt;br /&gt;
}}{{TableRowN| contact         | schedule                | Optional     | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| contact         | enable                  | Optional     | Boolean          | If the contact is enabled.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve all the contact information for a particular user.&lt;br /&gt;
*'''Request JSON'''&lt;br /&gt;
&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;user&amp;quot;: [ {                  &amp;amp;#8592; &amp;quot;user&amp;quot; is a parent object&lt;br /&gt;
        &amp;quot;user_id&amp;quot;:395,&lt;br /&gt;
        &amp;quot;alarm_user&amp;quot; : {&lt;br /&gt;
          &amp;quot;contact&amp;quot;: null          &amp;amp;#8592; On a &amp;quot;read&amp;quot;, a null property can be used to retrieve all instances of that property.&lt;br /&gt;
         }&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;user&amp;quot;:[&lt;br /&gt;
       {&lt;br /&gt;
         &amp;quot;alarm_user&amp;quot;: {&lt;br /&gt;
           &amp;quot;user_id&amp;quot;:395,&lt;br /&gt;
           &amp;quot;contact&amp;quot;:[&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;contact_id&amp;quot;:0001,&lt;br /&gt;
               &amp;quot;type&amp;quot;:&amp;quot;Phone&amp;quot;,&lt;br /&gt;
               &amp;quot;destination&amp;quot;:&amp;quot;555 555 5555&amp;quot;,&lt;br /&gt;
               &amp;quot;description&amp;quot;: &amp;quot;Work Phone&amp;quot;,&lt;br /&gt;
               &amp;quot;enable&amp;quot;: true,&lt;br /&gt;
               &amp;quot;schedule&amp;quot;:{&lt;br /&gt;
                 &amp;quot;schedule_id&amp;quot;: 345567,&lt;br /&gt;
                 ...                         &amp;amp;#8592; See [[Sensaphone.net API/schedule|here]] for schedule object specification&lt;br /&gt;
               }&lt;br /&gt;
             },&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;contact_id&amp;quot;:0002,&lt;br /&gt;
               &amp;quot;type&amp;quot;:&amp;quot;SMS&amp;quot;,&lt;br /&gt;
               &amp;quot;destination&amp;quot;:&amp;quot;555 555 5555&amp;quot;,&lt;br /&gt;
               &amp;quot;description&amp;quot;: &amp;quot;Cell Phone&amp;quot;&lt;br /&gt;
               &amp;quot;enable&amp;quot;: true,&lt;br /&gt;
               &amp;quot;schedule&amp;quot;:{&lt;br /&gt;
                 &amp;quot;schedule_id&amp;quot;: 412571,&lt;br /&gt;
                 ...&lt;br /&gt;
               }&lt;br /&gt;
             },&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;contact_id&amp;quot;:0003,&lt;br /&gt;
               &amp;quot;type&amp;quot;:&amp;quot;Email&amp;quot;,&lt;br /&gt;
               &amp;quot;destination&amp;quot;:&amp;quot;johndoe@sensaphone.net&amp;quot;,&lt;br /&gt;
               &amp;quot;description&amp;quot;: &amp;quot;Work Email&amp;quot;&lt;br /&gt;
               &amp;quot;enable&amp;quot;: true,&lt;br /&gt;
               &amp;quot;schedule&amp;quot;:{&lt;br /&gt;
                 &amp;quot;schedule_id&amp;quot;: 567437,&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;
&lt;br /&gt;
===PUT===&lt;br /&gt;
'''URI Mode Request URI's'''&lt;br /&gt;
*Edit the '''description''' of a contact&lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/{CONTACT_ID}/description/{DESCRIPTION}&lt;br /&gt;
*Edit the '''destination''' of a contact&lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/{CONTACT_ID}/destination/{DESTINATION}&lt;br /&gt;
*Edit the contact's destination '''type'''&lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/{CONTACT_ID}/type/{TYPE}&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/user/alarm_user/contact&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&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;contact&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | contact                  | Array of Objects | The contact object&lt;br /&gt;
}}{{TableRowN| contact         | contact_id               | Integer          | ID for contact&lt;br /&gt;
}}{{TableRowN| contact         | '''''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 '''contact''' child properties listed below are required in addition to &amp;quot;contact_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;          | ''&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;''    | contact                 | Required     | Array of Objects | The contact object&lt;br /&gt;
}}{{TableRowN| contact         | contact_id              | Optional     | Integer          | ID for contact&lt;br /&gt;
}}{{TableRowN| contact         | type                    | Optional     | String           | Phone, SMS or Email (Use a V2 [[Sensaphone.net_API/contact#GET|read command]] to retrieve the valid values)&lt;br /&gt;
}}{{TableRowN| contact         | destination             | Optional     | String           | Phone number, Email address, etc. of contact's destination&lt;br /&gt;
}}{{TableRowN| contact         | description             | Optional     | String           | Short description describing the destination ex: &amp;quot;Work Phone&amp;quot; &lt;br /&gt;
}}{{TableRowN| contact         | schedule                | Optional     | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| contact         | enable                  | Optional     | Boolean          | If the contact is enabled.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
POST will only be used for creating a new contact. The destination (phone number or email address) is required and the type automatically determined. If using the URI Mode Request the user can subsequently use PUT to edit the other sub-properties and/or change the type. Alternatively, this can be done in one step with the JSON Mode Request. &lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Create a new user dependent contact.&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/destination/{DESTINATION}&lt;br /&gt;
*Create a new user independent contact.&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contact/destination/{DESTINATION}&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/user/alarm_user/contact&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&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;contact&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | contact                  | Array of Objects | The contact object&lt;br /&gt;
}}{{TableRowN| contact         | destination              | String           | Phone number or Email address of Destination&lt;br /&gt;
}}{{TableRowN| contact         | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Additional child properties to be set *&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''contact''' child properties listed below ''may'' be specified in addition to &amp;quot;contact_id&amp;quot; and &amp;quot;destination&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;          | ''&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;''    | contact                 | Required     | Array of Objects | The contact object&lt;br /&gt;
}}{{TableRowN| contact         | contact_id              | Optional     | Integer          | ID for contact&lt;br /&gt;
}}{{TableRowN| contact         | type                    | Optional     | String           | Phone, SMS or Email (Use a V2 [[Sensaphone.net_API/contact#GET|read command]] to retrieve the valid values)&lt;br /&gt;
}}{{TableRowN| contact         | destination             | Optional     | String           | Phone number, Email address, etc. of contact's destination&lt;br /&gt;
}}{{TableRowN| contact         | description             | Optional     | String           | Short description describing the destination ex: &amp;quot;Work Phone&amp;quot; &lt;br /&gt;
}}{{TableRowN| contact         | schedule                | Optional     | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| contact         | enable                  | Optional     | Boolean          | If the contact is enabled.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Delete a contact. To delete a contact, the ID of the contact to be deleted must be provided.&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/alarm_user/contact/{CONTACT_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/user/alarm_user/contact&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&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;contact&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | contact                  | Array of Objects | The contact object&lt;br /&gt;
}}{{TableRowN| contact         | contact_id               | Integer          | ID for contact&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/user</id>
		<title>Sensaphone.net API/user</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/user"/>
				<updated>2015-04-29T19:24:08Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The '''user''' resource allows access to information relating to two classes of persons: those who will have access to the website and API and those who will be notified in the event of an alarms. A user may be in one, both, or neither class. &lt;br /&gt;
&lt;br /&gt;
The user 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;''         | user        | Object     | The user object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| user                    | user_id     | Integer    | ID of the user.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| user                    | name    | String     | Name of user.               | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| user                    | enable           | Boolean     | If the user is enabled.        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| user                    | alarm_user_mode           | String     | The alarm user mode        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| user                    | site_user_level           | String     | The site user access level        | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| user                    | is_site_user    | Boolean     | If the user has site access (website or API) | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| user                    | site_user         | Object    | sub-object contains data for where is_site_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| site_user              | devices         | Array of String    | List of devices (device_guid) accessible by this user.     | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| site_user              | groups         | Array of Integer    | group IDs of the groups accessible by this user.     | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| site_user              | username         | String    | The username to access the website or API     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| site_user              | access_level         | String    | The current access level for website or API access.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| site_user              | address         | Object    | (See [[Sensaphone.net API/address|Sensaphone.net API/address]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| user                     | is_alarm_user         | Boolean    | If the user is enabled for alarm delivery.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| user                     | alarm_user         | Object    | sub-object contains data for where is_alarm_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| alarm_user              | schedule         | Object    | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| alarm_user              | contact        | Array of Object    | (See [[Sensaphone.net API/contact|Sensaphone.net API/contact]])     | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Request Mode URI's:'''&lt;br /&gt;
*Retrieve all user data for all users in the account.&lt;br /&gt;
    '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{''ACCTID''}/{''SESSIONID''}/user&lt;br /&gt;
*Retrieve all user data for a specific user. &lt;br /&gt;
     '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{''ACCTID''}/{''SESSIONID''}/user/{''USER_ID''}&lt;br /&gt;
*Retrieve the name of a specific user.&lt;br /&gt;
     '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{''ACCTID''}/{''SESSIONID''}/user/{''USER_ID''}/name&lt;br /&gt;
'''JSON Request Mode URI:'''&lt;br /&gt;
     '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/user&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                  | String           | Session Token&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;user&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | user                     | Array of Objects | The user 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;          | ''&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;''    | user                    | Required     | Array of Objects | The user object&lt;br /&gt;
}}{{TableRowN| user            | user_id                 | Optional     | Integer          | ID of user&lt;br /&gt;
}}{{TableRowN| user            | name                    | Optional     | String           | Name of user&lt;br /&gt;
}}{{TableRowN| user            | enable                  | Optional     | Boolean          | If the user is enabled.&lt;br /&gt;
}}{{TableRowN| user            | alarm_user_mode   | Optional     | String          | The alarm user mode.&lt;br /&gt;
}}{{TableRowN| user                    | site_user_level        | Optional      | String     | The site user access level     &lt;br /&gt;
}}{{TableRowN| user            | is_site_user            | Optional     | Boolean          | If the user has site access (website or API)&lt;br /&gt;
}}{{TableRowN| user            | site_user               | Optional     | Object           | sub-object contains data for where is_site_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.&lt;br /&gt;
}}{{TableRowN| site_user       | devices                 | Optional     | Array of String  | List of devices (device_guid) accessible by this user.&lt;br /&gt;
}}{{TableRowN| site_user       | groups                  | Optional     | Array of Integer | group IDs of the groups accessible by this user.&lt;br /&gt;
}}{{TableRowN| site_user       | username                | Optional     | String           | The username to access the website or API&lt;br /&gt;
}}{{TableRowN| site_user       | access_level            | Optional     | String           | The current access level for website or API access.&lt;br /&gt;
}}{{TableRowN| site_user       | address                 | Optional     | Object           | (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| user            | is_alarm_user           | Optional     | Boolean          | If the user is enabled for alarm delivery.&lt;br /&gt;
}}{{TableRowN| user            | alarm_user              | Optional     | Object           | sub-object contains data for where is_alarm_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.&lt;br /&gt;
}}{{TableRowN| alarm_user      | schedule                | Optional     | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| alarm_user      | contact                 | Optional     | Array of Objects | (See [[Sensaphone.net API/contact|Sensaphone.net API/contact]])&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive all User information&lt;br /&gt;
* '''Request JSON:'''&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;resource&amp;quot;:&amp;quot;user&amp;quot;,&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;user&amp;quot;: null                 &amp;amp;#8592; On a &amp;quot;read&amp;quot;, a null property can be used to retrieve all instances of that property.&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;user&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
       &amp;quot;user_id&amp;quot;: 1010&lt;br /&gt;
       &amp;quot;name&amp;quot;: &amp;quot;John Doe&amp;quot;,&lt;br /&gt;
       &amp;quot;enable&amp;quot;: true,&lt;br /&gt;
       &amp;quot;is_site_user&amp;quot;: true,&lt;br /&gt;
       &amp;quot;site_user&amp;quot;: {&lt;br /&gt;
         &amp;quot;devices&amp;quot;: [&lt;br /&gt;
           &amp;quot;00-11-22-33-44-55&amp;quot;,&lt;br /&gt;
           &amp;quot;AA-BB-CC-DD-EE-FF&amp;quot;&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;groups&amp;quot;: [&lt;br /&gt;
           12345,&lt;br /&gt;
           85693&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;username&amp;quot;: &amp;quot;jdoe@example.net&amp;quot;,&lt;br /&gt;
         &amp;quot;access_level&amp;quot;: &amp;quot;Admin&amp;quot;,&lt;br /&gt;
         &amp;quot;address&amp;quot;:{&lt;br /&gt;
           ...                       &amp;amp;#8592; See [[Sensaphone.net API/address|here]] for address object specification       &lt;br /&gt;
         }&lt;br /&gt;
       },&lt;br /&gt;
       &amp;quot;is_alarm_user&amp;quot;: true,&lt;br /&gt;
       &amp;quot;alarm_user&amp;quot;: {&lt;br /&gt;
         &amp;quot;schedule&amp;quot;:{&lt;br /&gt;
           ...                       &amp;amp;#8592; See [[Sensaphone.net API/schedule|here]] for schedule object specification&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;contact&amp;quot;:[&lt;br /&gt;
           {&lt;br /&gt;
             &amp;quot;contact_id&amp;quot;: 1201,&lt;br /&gt;
             ...                     &amp;amp;#8592; See [[Sensaphone.net API/contact|here]] for contact object specification&lt;br /&gt;
           },&lt;br /&gt;
           {&lt;br /&gt;
             &amp;quot;contact_id&amp;quot;: 1202,&lt;br /&gt;
             ...&lt;br /&gt;
           },&lt;br /&gt;
           {&lt;br /&gt;
             &amp;quot;contact_id&amp;quot;: 1203,&lt;br /&gt;
             ...&lt;br /&gt;
           }&lt;br /&gt;
         ]&lt;br /&gt;
       }&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
       &amp;quot;user_id&amp;quot;: 1023&lt;br /&gt;
       ...                           &amp;amp;#8592; More than one user is returned because a &amp;quot;null&amp;quot; user was requested.&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 a user's '''name''' value &lt;br /&gt;
    '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/name/{NAME}&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/user&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&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;user&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | user                     | Array of Objects | The user object&lt;br /&gt;
}}{{TableRowN| user            | user_id                  | Integer          | ID for user&lt;br /&gt;
}}{{TableRowN| user            | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | User'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 '''user''' child properties listed below are required in addition to &amp;quot;user_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;          | ''&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;''    | user                    | Required     | Array of Objects | The user object&lt;br /&gt;
}}{{TableRowN| user            | user_id                 | Optional     | Integer          | ID of user&lt;br /&gt;
}}{{TableRowN| user            | name                    | Optional     | String           | Name of user&lt;br /&gt;
}}{{TableRowN| user            | enable                  | Optional     | Boolean          | If the user is enabled.&lt;br /&gt;
}}{{TableRowN| user            | alarm_user_mode   | Optional     | String          | The alarm user mode.&lt;br /&gt;
}}{{TableRowN| user                    | site_user_level      | Optional        | String     | The site user access level       &lt;br /&gt;
}}{{TableRowN| user            | is_site_user            | Optional     | Boolean          | If the user has site access (website or API)&lt;br /&gt;
}}{{TableRowN| user            | site_user               | Optional     | Object           | sub-object contains data for where is_site_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.&lt;br /&gt;
}}{{TableRowN| site_user       | devices                 | Optional     | Array of String  | List of devices (device_guid) accessible by this user.&lt;br /&gt;
}}{{TableRowN| site_user       | groups                  | Optional     | Array of Integer | group IDs of the groups accessible by this user.&lt;br /&gt;
}}{{TableRowN| site_user       | username                | Optional     | String           | The username to access the website or API&lt;br /&gt;
}}{{TableRowN| site_user       | password                | Optional     | String           | The password to access the website or API&lt;br /&gt;
}}{{TableRowN| site_user       | access_level            | Optional     | String           | The current access level for website or API access.&lt;br /&gt;
}}{{TableRowN| site_user       | address                 | Optional     | Object           | (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| user            | is_alarm_user           | Optional     | Boolean          | If the user is enabled for alarm delivery.&lt;br /&gt;
}}{{TableRowN| user            | alarm_user              | Optional     | Object           | sub-object contains data for where is_alarm_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.&lt;br /&gt;
}}{{TableRowN| alarm_user      | schedule                | Optional     | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| alarm_user      | contact                 | Optional     | Array of Objects | (See [[Sensaphone.net API/contact|Sensaphone.net API/contact]])&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
The preferred method to create a new User is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a User with only the '''name''' value, all other values will be left empty until a PUT request is used. With the JSON Mode Request you can create a User with all values defined in one step. &lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Create a new User &lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/name/{NAME}&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/user&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&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;user&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | user                     | Array of Objects | The user object&lt;br /&gt;
}}{{TableRowN| user            | name                     | String           | Name of user&lt;br /&gt;
}}{{TableRowN| user            | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Additional child properties to be set*&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;One or more '''user''' child properties listed below ''may'' be specified in addition to &amp;quot;user_id&amp;quot; and &amp;quot;name&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;          | ''&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;''    | user                    | Required     | Array of Objects | The user object&lt;br /&gt;
}}{{TableRowN| user            | user_id                 | Optional     | Integer          | ID of user&lt;br /&gt;
}}{{TableRowN| user            | name                    | Optional     | String           | Name of user&lt;br /&gt;
}}{{TableRowN| user            | enable                  | Optional     | Boolean          | If the user is enabled.&lt;br /&gt;
}}{{TableRowN| user            | alarm_user_mode   | Optional     | String          | The alarm user mode.&lt;br /&gt;
}}{{TableRowN| user            | is_site_user            | Optional     | Boolean          | If the user has site access (website or API)&lt;br /&gt;
}}{{TableRowN| user            | site_user               | Optional     | Object           | sub-object contains data for where is_site_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.&lt;br /&gt;
}}{{TableRowN| site_user       | devices                 | Optional     | Array of String  | List of devices (device_guid) accessible by this user.&lt;br /&gt;
}}{{TableRowN| site_user       | groups                  | Optional     | Array of Integer | group IDs of the groups accessible by this user.&lt;br /&gt;
}}{{TableRowN| site_user       | username                | Optional     | String           | The username to access the website or API&lt;br /&gt;
}}{{TableRowN| site_user       | password                | Optional     | String           | The password to access the website or API&lt;br /&gt;
}}{{TableRowN| site_user       | access_level            | Optional     | String           | The current access level for website or API access.&lt;br /&gt;
}}{{TableRowN| site_user       | address                 | Optional     | Object           | (See [[Sensaphone.net API/address|Sensaphone.net API/address]])&lt;br /&gt;
}}{{TableRowN| user            | is_alarm_user           | Optional     | Boolean          | If the user is enabled for alarm delivery.&lt;br /&gt;
}}{{TableRowN| user            | alarm_user              | Optional     | Object           | sub-object contains data for where is_alarm_user is 'true'. Is still accessed using the &amp;quot;user&amp;quot; resource.&lt;br /&gt;
}}{{TableRowN| alarm_user      | schedule                | Optional     | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| alarm_user      | contact                 | Optional     | Array of Objects | (See [[Sensaphone.net API/contact|Sensaphone.net API/contact]])&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a User&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_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/user&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&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;user&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | user                     | Array of Objects | The user object&lt;br /&gt;
}}{{TableRowN| user            | user_id                  | Integer          | ID for user&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/contactgroup</id>
		<title>Sensaphone.net API/contactgroup</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/contactgroup"/>
				<updated>2015-04-29T19:23:39Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
The contactgroup object contains groupings of '''[[Sensaphone.net API/contact|contacts]]''' and '''[[Sensaphone.net API/user|users]]''' (and thus the contacts that they contain).&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
contactgroups are both top level resources (accessed directly) and are contained as part of the alarm delivery targets contained in [[Sensaphone.net API/alarmschedule|alarm schedules]]. All groups can be manipulated directly by their ID, regardless of whether or not they are contained in other resources. &lt;br /&gt;
&lt;br /&gt;
For example, say a contactgroup is part of an alarm schedule. If you &amp;quot;delete&amp;quot; the contactgroup as part of the alarm schedule (&amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/alarmschedule/.../contactgroup/), this would only remove it from the schedule. If you &amp;quot;delete&amp;quot; the contactgroup directly, it will remove all instances of it from every resource it is used in.&lt;br /&gt;
&lt;br /&gt;
The contact group 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;''         | contactgroup        | Object     | The contactgroup object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| contactgroup                    | group_id     | Integer    | ID of the contact group.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| contactgroup                    | name   | String     | The name of this group.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| contactgroup                    | contacts           |  Array of Objects     | The list of contacts in this group.        | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| contacts                    | contact_id    | Integer     | The contact_id of a [[Sensaphone.net API/contact|contact]] that is a member of this group. | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| contactgroup                    | users         | Array of Objects    | The list of groups in this group.  | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| users              | user_id         | Integer    | The user_id of a [[Sensaphone.net API/user|user]] that is a member of this group. | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Response URI's:'''&lt;br /&gt;
*Receive all Contact Group information &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup&lt;br /&gt;
&lt;br /&gt;
*Receive all Contact IDs in a given Contact Group &lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}/contacts/&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response URI:'''&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/contactgroup&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | contactgroup             | Array of Objects | The contactgroup 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;                | contactgroup       | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| contactgroup          | group_id           | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| contactgroup          | name               | Optional   | String           | The name of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup          | contacts           | Optional   | Array of Objects | The list of contacts in this group.&lt;br /&gt;
}}{{TableRowN| contacts              | contact_id         | Optional   | Integer          | The contact_id of a [[Sensaphone.net API/contact|contact]] that is a member of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup          | users              | Optional   | Array of Objects | The list of users in this group.&lt;br /&gt;
}}{{TableRowN| users                 | user_id            | Optional   | Integer          | The user_id of a [[Sensaphone.net API/user|user]] that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive all Contact Group information&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;contactgroup&amp;quot;: null&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;contactgroup&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;group_id&amp;quot;: 6575,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Night Crew&amp;quot;,&lt;br /&gt;
        &amp;quot;users&amp;quot;:&lt;br /&gt;
        [ &lt;br /&gt;
          { &amp;quot;user_id&amp;quot;: 1234 },&lt;br /&gt;
          { &amp;quot;user_id&amp;quot;: 1235 }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;contacts&amp;quot;:&lt;br /&gt;
        [&lt;br /&gt;
          { &amp;quot;contact_id&amp;quot;: 8575 },&lt;br /&gt;
          { &amp;quot;contact_id&amp;quot;: 8404 }&lt;br /&gt;
        ]&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;group_id&amp;quot;: 6596,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Day Crew&amp;quot;,&lt;br /&gt;
        &amp;quot;users&amp;quot;:&lt;br /&gt;
        [ &lt;br /&gt;
          { &amp;quot;user_id&amp;quot;: 1433 },&lt;br /&gt;
          { &amp;quot;user_id&amp;quot;: 1531 }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;contacts&amp;quot;:&lt;br /&gt;
        [&lt;br /&gt;
          { &amp;quot;contact_id&amp;quot;: 7523 },&lt;br /&gt;
          { &amp;quot;contact_id&amp;quot;: 6811 }&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;
The '''PUT''' request for the contact group resource is used to edit the group:&lt;br /&gt;
* Change the name&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Response URI:''' &lt;br /&gt;
*Edit a the group name &lt;br /&gt;
  '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}/name/{GROUP_NAME}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response URI:'''&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/contactgroup&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | contactgroup             | Array of Objects | The contactgroup object.&lt;br /&gt;
}}{{TableRowN| contactgroup    | group_id                 | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| contactgroup    | '''''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 '''contactgroup''' child properties listed below are required in addition to &amp;quot;group_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;                  | contactgroup       | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| contactgroup            | group_id           | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| contactgroup            | name               | Optional   | String           | The name of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup            | contacts           | Optional   | Array of Objects | The list of contacts in this group.&lt;br /&gt;
}}{{TableRowN| contacts                | contact_id         | Optional   | Integer          | The contact_id of a [[Sensaphone.net API/contact|contact]] that is a member of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup            | users              | Optional   | Array of Objects | The list of users in this group.&lt;br /&gt;
}}{{TableRowN| users                   | user_id            | Optional   | Integer          | The user_id of a [[Sensaphone.net API/user|user]] that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
The preferred method to create a new Contact Group is to use the JSON Mode Request. If the URI Mode Request is used you will be adding a Contact Group with only the '''group_name''' value, all other values will be left empty until separate POST requests are used. With the JSON Mode Request you can create a Contact Group with all values defined in one step.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Response URI's:'''&lt;br /&gt;
*Create a new Contact Group &lt;br /&gt;
:'''Note:''' A '''group_name''' is required when creating a new Contact Group.&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/name/{GROUP_NAME}&lt;br /&gt;
&lt;br /&gt;
*Add an existing user to a Contact Group&lt;br /&gt;
:'''Note:''' The '''user_id''' used should be the one received in a [[Sensaphone.net API/user|user]] resource GET response. &lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}/users/user_id/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
*Add an existing contact to Contact Group&lt;br /&gt;
:'''Note:''' The '''contact_id''' used should be the one received in a [[Sensaphone.net API/contact|contact]] resource GET response. &lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}/contacts/contact_id/{CONTACT_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/{ACCTID}/{SESSIONID}/contactgroup&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create new contact group''&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 Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | contactgroup             | Array of Objects | The contactgroup object.&lt;br /&gt;
}}{{TableRowN| contactgroup    | name                     | String           | The name of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
: ''Add user or contact''&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 Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | contactgroup             | Array of Objects | The contactgroup object.&lt;br /&gt;
}}{{TableRowN| contactgroup    | group_id                 | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| contactgroup    | contacts                 | Array of Objects | The list of contacts in this group.&lt;br /&gt;
}}{{TableRowN| contacts        | contact_id               | Integer          | The contact_id of a [[Sensaphone.net API/contact|contact]] that is a member of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup    | users                    | Array of Objects | The list of users in this group.&lt;br /&gt;
}}{{TableRowN| users           | user_id                  | Integer          | The user_id of a [[Sensaphone.net API/user|user]] that is a member of this group.&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;                  | contactgroup       | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| contactgroup            | group_id           | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| contactgroup            | name               | Optional   | String           | The name of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup            | contacts           | Optional   | Array of Objects | The list of contacts in this group.&lt;br /&gt;
}}{{TableRowN| contacts                | contact_id         | Optional   | Integer          | The contact_id of a [[Sensaphone.net API/contact|contact]] that is a member of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup            | users              | Optional   | Array of Objects | The list of users in this group.&lt;br /&gt;
}}{{TableRowN| users                   | user_id            | Optional   | Integer          | The user_id of a [[Sensaphone.net API/user|user]] that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a Contact Group&lt;br /&gt;
   '''DELETE'''  &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a user from a Contact Group&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}/users/user_id/{USER_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a contact from a Contact Group&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/contactgroup/{GROUP_ID}/contacts/contact_id/{CONTACT_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/contactgroup&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | devicegroup              | Array of Objects | The devicegroup object.&lt;br /&gt;
}}{{TableRowN| contactgroup    | group_id                 | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| contactgroup    | contacts                 | Array of Objects | The list of contacts in this group.&lt;br /&gt;
}}{{TableRowN| contacts        | contact_id               | Integer          | The contact_id of a [[Sensaphone.net API/contact|contact]] that is a member of this group.&lt;br /&gt;
}}{{TableRowN| contactgroup    | users                    | Array of Objects | The list of users in this group.&lt;br /&gt;
}}{{TableRowN| users           | user_id                  | Integer          | The user_id of a [[Sensaphone.net API/user|user]] that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/timerange</id>
		<title>Sensaphone.net API/timerange</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/timerange"/>
				<updated>2015-04-29T19:22:58Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&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;''         | timerange      | Array of Objects | The schedule's time ranges        | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| timerange            | range_id       | Integer          | ID of the time range.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| timerange            | start          | String           | The start time                    | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| timerange            | end            | String           | The end time                      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| timerange            | interval       | Integer (Bitmap) | Time interval options (see table) | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
The interval is a bitmap containing the following options. &amp;quot;Bit 1&amp;quot; is the low-order bit in the '''interval''' unsigned integer. The default value &amp;quot;Sunday + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday&amp;quot;, matches every day that matches the &amp;quot;start&amp;quot; and &amp;quot;end&amp;quot;.&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Bit Position''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| 1                  | Timestamp: Sunday&lt;br /&gt;
}}{{TableRowN| 2                  | Timestamp: Monday&lt;br /&gt;
}}{{TableRowN| 3                  | Timestamp: Tuesday&lt;br /&gt;
}}{{TableRowN| 4                  | Timestamp: Wednesday&lt;br /&gt;
}}{{TableRowN| 5                  | Timestamp: Thursday&lt;br /&gt;
}}{{TableRowN| 6                  | Timestamp: Friday&lt;br /&gt;
}}{{TableRowN| 7                  | Timestamp: Saturday&lt;br /&gt;
}}{{TableRowN| 8                  | Datetime: Is a holiday&lt;br /&gt;
}}{{TableRowN| 9                  | Datetime: Interpret &amp;quot;start&amp;quot; and &amp;quot;end&amp;quot; as a datetime not a timestamp.&lt;br /&gt;
}}{{TableRowN| 10                 | Datetime: Repeat: Daily&lt;br /&gt;
}}{{TableRowN| 11                 | Datetime: Repeat: Weekly&lt;br /&gt;
}}{{TableRowN| 12                 | Datetime: Repeat: Yearly (Day Number)&lt;br /&gt;
}}{{TableRowN| 13                 | Datetime: Repeat: Yearly (Day of Week)&lt;br /&gt;
}}{{TableRowN| 14                 | Invert selection. The timerange represents a time NOT selected.&lt;br /&gt;
}}{{TableRowN| 15                 | Reserved&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all information for all of a schedule's timeranges.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/contact/{CONTACT_ID}/schedule/{SCHEDULE_ID}/timerange&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/user/contact/schedule/timerange&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                  | String           | Session Token&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;timerange&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | timerange                | Array of Objects | The timerange 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;          | ''&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;''    | timerange               | Required         | Array of Objects | The timerange object&lt;br /&gt;
}}{{TableRowN| timerange       | range_id                | Optional         | Integer          | ID for timerange&lt;br /&gt;
}}{{TableRowN| timerange       | start                   | Optional         | String           | The start time&lt;br /&gt;
}}{{TableRowN| timerange       | end                     | Optional         | String           | The end time&lt;br /&gt;
}}{{TableRowN| timerange       | interval                | Optional         | Integer (Bitmap) | Time interval options (see table)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve time range information.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON'''&lt;br /&gt;
&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
     &amp;quot;uuid&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;default_schedule&amp;quot;:[&lt;br /&gt;
         {&lt;br /&gt;
           &amp;quot;schedule_id&amp;quot;:28487,&lt;br /&gt;
           &amp;quot;timerange&amp;quot;: null&lt;br /&gt;
         }&lt;br /&gt;
        ]&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;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;
         {&lt;br /&gt;
           &amp;quot;schedule_id&amp;quot;:28487,&lt;br /&gt;
           &amp;quot;timerange&amp;quot;:[&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;range_id&amp;quot;: 58381&lt;br /&gt;
               &amp;quot;start&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;end&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;interval&amp;quot;: 127&lt;br /&gt;
             },&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;range_id&amp;quot;: 51587&lt;br /&gt;
               &amp;quot;start&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;end&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;interval&amp;quot;: 7&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;
*Edit the '''interval''' of a time range&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}/default_schedule/{SCHEDULE_ID}/timerange/{RANGE_ID}/interval/{INTERVAL}&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/default_schedule/timerange&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&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;timerange&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | timerange                | Array of Objects | The timerange object&lt;br /&gt;
}}{{TableRowN| timerange       | range_id                 | Integer          | ID for time range&lt;br /&gt;
}}{{TableRowN| timerange       | '''''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 '''timerange''' child properties listed below are required in addition to &amp;quot;range_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;          | ''&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;''    | timerange               | Required         | Array of Objects | The timerange object&lt;br /&gt;
}}{{TableRowN| timerange       | range_id                | Optional         | Integer          | ID for timerange&lt;br /&gt;
}}{{TableRowN| timerange       | start                   | Optional         | String           | The start time&lt;br /&gt;
}}{{TableRowN| timerange       | end                     | Optional         | String           | The end time&lt;br /&gt;
}}{{TableRowN| timerange       | interval                | Optional         | Integer (Bitmap) | Time interval options (see table)&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 time range with default values.&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}/default_schedule/{SCHEDULE_ID}/timerange&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/default_schedule/timerange&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&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;timerange&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | timerange                | Array of Objects | The timerange object&lt;br /&gt;
}}{{TableRowN| timerange       | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Child properties to be set *&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; One or more '''timerange''' child properties below ''may'' be specified in addition to &amp;quot;range_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;          | ''&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;''    | timerange               | Required         | Array of Objects | The timerange object&lt;br /&gt;
}}{{TableRowN| timerange       | range_id                | Optional         | Integer          | ID for timerange&lt;br /&gt;
}}{{TableRowN| timerange       | start                   | Optional         | String           | The start time&lt;br /&gt;
}}{{TableRowN| timerange       | end                     | Optional         | String           | The end time&lt;br /&gt;
}}{{TableRowN| timerange       | interval                | Optional         | Integer (Bitmap) | Time interval options (see table)&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's'''&lt;br /&gt;
*Create a new time range with default values.&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}/default_schedule/{SCHEDULE_ID}/timerange/{RANGE_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/default_schedule/timerange&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&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;timerange&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | timerange                | Array of Objects | The timerange object&lt;br /&gt;
}}{{TableRowN| timerange       | range_id                 | Integer          | ID for time range&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/schedule</id>
		<title>Sensaphone.net API/schedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/schedule"/>
				<updated>2015-04-29T19:22:32Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&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;''         | schedule       | Object           | The schedule object.           | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| schedule             | schedule_id    | Integer          | ID of the schedule.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| schedule             | timerange      | Array of Objects | The schedule's [[Sensaphone.net_API/timerange|time ranges]]&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Retrieve all information for a schedule.&lt;br /&gt;
   '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/contact/{CONTACT_ID}/schedule&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/user/contact/schedule&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                  | String           | Session Token&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;schedule&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | schedule                 | Array of Objects | The schedule 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;          | ''&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;''    | schedule                | Required         | Array of Objects | The schedule object&lt;br /&gt;
}}{{TableRowN| schedule        | schedule_id             | Optional         | Integer          | ID for schedule&lt;br /&gt;
}}{{TableRowN| schedule        | timerange               | Optional         | Array of Objects | (See [[Sensaphone.net API/timerange|Sensaphone.net API/timerange]])&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Retrieve schedule information.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON'''&lt;br /&gt;
&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;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        &amp;quot;default_schedule&amp;quot;:[&lt;br /&gt;
         {&lt;br /&gt;
           &amp;quot;schedule_id&amp;quot;:28487&lt;br /&gt;
         }&lt;br /&gt;
        ]&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;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;
         {&lt;br /&gt;
           &amp;quot;schedule_id&amp;quot;:28487,&lt;br /&gt;
           &amp;quot;timerange&amp;quot;:[&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;range_id&amp;quot;: 58381&lt;br /&gt;
               &amp;quot;start&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;end&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;interval&amp;quot;: 127&lt;br /&gt;
             },&lt;br /&gt;
             {&lt;br /&gt;
               &amp;quot;range_id&amp;quot;: 51587&lt;br /&gt;
               &amp;quot;start&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;end&amp;quot;: &amp;quot;..TBD..&amp;quot;,&lt;br /&gt;
               &amp;quot;interval&amp;quot;: 7&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;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Create a new (default) schedule.&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/contact/{CONTACT_ID}/schedule&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/user/contact/schedule&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                  | String           | Session Token&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;schedule&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | schedule                 | Array of Objects | The schedule object&lt;br /&gt;
}}{{TableRowN| schedule        | timerange                | Array of Objects | Optional (See [[Sensaphone.net API/timerange|Sensaphone.net API/timerange]])&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;          | ''&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;''    | schedule                | Required         | Array of Objects | The schedule object&lt;br /&gt;
}}{{TableRowN| schedule        | schedule_id             | Optional         | Integer          | ID for schedule&lt;br /&gt;
}}{{TableRowN| schedule        | timerange               | Optional         | Array of Objects | (See [[Sensaphone.net API/timerange|Sensaphone.net API/timerange]])&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete an existing schedule. This may make it go away or reset it to default values, depending on the context.&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{USER_ID}/contact/{CONTACT_ID}/schedule/{SCHEDULE_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/user/contact/schedule&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                  | String           | Session Token&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;schedule&amp;quot; resource, if any. See the [[Sensaphone.net_API#List|'''list''']].&lt;br /&gt;
}}{{TableRowN| ''&amp;lt;parent&amp;gt;''    | schedule                 | Array of Objects | The schedule object&lt;br /&gt;
}}{{TableRowN| schedule        | schedule_id              | Integer          | The 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/Sensaphone.net_API/alarmschedule</id>
		<title>Sensaphone.net API/alarmschedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/alarmschedule"/>
				<updated>2015-04-29T19:21:47Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&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             | String           | Session Token&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             | String           | Session Token&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             | String           | Session Token&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/Sensaphone.net_API/calllist</id>
		<title>Sensaphone.net API/calllist</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/calllist"/>
				<updated>2015-04-29T19:20:06Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update  Session data type.&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                  | String           | Session Token&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                  | String           | Session Token&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                  | String           | Session Token&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                  | String           | Session Token&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                  | String           | Session Token&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                  | String           | Session Token&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                  | String           | Session Token&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/Sensaphone.net_API/zone</id>
		<title>Sensaphone.net API/zone</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/zone"/>
				<updated>2015-04-29T19:16:25Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
Different zones types may have different configurable properties than others. For example, a '''''2.8k Thermistor F''''' type Zone will have '''''calibration''''', '''''alarm low''''', and '''''alarm high''''' but a '''''Normally Open''''' type zone will not. If a request is made for a property not belonging to a zone type an error will be issued. Below is a chart showing the relations. A property is only available if the type metadata (The '''type_list''' property) has the checked options enabled. Whether or not the above properties correspond with a particular zone type is defined in the meta data for the zone types '''(included in v2 but not v1 of the API)'''. In addition, a property may be disabled at the global scale if it is 'null', regardless of this table. For example, the zone type's meta indicates that it is &amp;quot;External&amp;quot; but the &amp;quot;wireless_zone&amp;quot; field is 'null' on a &amp;quot;read&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Type Dependent Properties'''&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN|'''Property'''|'''Digital'''|'''Analog'''|'''Internal'''|'''External'''|'''Generic'''|'''Input'''|'''Output'''|'''IP Alarm'''|'''Alarmable'''|'''Table Ranged'''|'''Loggable'''|'''Alarm Low'''|'''Alarm High'''&lt;br /&gt;
}}{{TableRowN| wireless_zone|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''&lt;br /&gt;
}}{{TableRowN| pulse_zone|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''&lt;br /&gt;
}}{{TableRowN| runtime_zone|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''&lt;br /&gt;
}}{{TableRowN| output_zone|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''&lt;br /&gt;
}}{{TableRowN| alarm_zone|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''&lt;br /&gt;
}}{{TableRowN| table_zone|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''&lt;br /&gt;
}}{{TableRowN| loggable_zone|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''&lt;br /&gt;
}}{{TableRowN| alarm_low|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''&lt;br /&gt;
}}{{TableRowN| alarm_high|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| modbus_zone|''' '''|''' '''|''' '''|''' '''|'''&amp;amp;#x2713;'''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''|''' '''&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===Zone States===&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Zone State'''|'''Value'''   &lt;br /&gt;
}}{{TableRowN| None           | 0                         &lt;br /&gt;
}}{{TableRowN| Alarm          | 1                         &lt;br /&gt;
}}{{TableRowN| OK               | 2                      &lt;br /&gt;
}}{{TableRowN| Pending          | 3                        &lt;br /&gt;
}}{{TableRowN| Open           | 4                        &lt;br /&gt;
}}{{TableRowN| Closed             | 5                     &lt;br /&gt;
}}{{TableRowN| Cycle             | 6                   &lt;br /&gt;
}}{{TableRowN| Low             | 7                 &lt;br /&gt;
}}{{TableRowN| High             | 8                   &lt;br /&gt;
}}{{TableRowN| Off             | 9               &lt;br /&gt;
}}{{TableRowN| On             | 10                   &lt;br /&gt;
}}{{TableRowN| Return To Normal             | 11                  &lt;br /&gt;
}}{{TableRowN| Route Down             | 12                    &lt;br /&gt;
}}{{TableRowN| Trouble             | 13                    &lt;br /&gt;
}}{{TableRowN| Not Responding             | 14               &lt;br /&gt;
}}{{TableRowN| Dependency Failure             | 15                    &lt;br /&gt;
}}{{TableRowN| Battery             | 16                     &lt;br /&gt;
}}{{TableRowN| Acknowledged             | 17                   &lt;br /&gt;
}}{{TableRowN| Unacknowledged             | 18                   &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''Output Mode Type''' {{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Child Property''' |'''Type'''        | '''Description'''&lt;br /&gt;
}}{{TableRowN|  name                   | String          | Name&lt;br /&gt;
}}{{TableRowN|  action                  | String          | Action&lt;br /&gt;
}}{{TableRowN|  zone_list             | Array of Objects           | List of zones&lt;br /&gt;
}}{{TableRowN| type_list                   | Array of Objects | List of Zone type&lt;br /&gt;
}}{{TableRowN|  trigger                    | String | Trigger&lt;br /&gt;
}}{{TableRowN|  compare_on                    | String | Compare On&lt;br /&gt;
}}{{TableRowN|  compare_off                    | String | Compare Off&lt;br /&gt;
}}{{TableRowN|  limit_on                    | Float | Limit On&lt;br /&gt;
}}{{TableRowN|  limit_off                    | Float | Limit Off&lt;br /&gt;
}}{{TableRowN|  zone_on                    | String | Zone On&lt;br /&gt;
}}{{TableRowN|  zone_off                    | String | Zone Off&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=== GET ===&lt;br /&gt;
&lt;br /&gt;
An error will be issued if attempting to receive a Zone property that does not correspond to the Zone type.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
&lt;br /&gt;
*Retrieve all information for every one of a device's zones. &lt;br /&gt;
&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}/zone&lt;br /&gt;
&lt;br /&gt;
*Retrieve all information for a single zone. &lt;br /&gt;
&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}/zone/{ZONE_ID}&lt;br /&gt;
&lt;br /&gt;
*Retrieve the a specific zone's type. &lt;br /&gt;
&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}/zone/{ZONE_ID}/type&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
&lt;br /&gt;
   '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/device/zone&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties''' {{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 Token&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 parent device of the &amp;quot;zone&amp;quot; resource. See [[Sensaphone.net_API/device|device]].&lt;br /&gt;
}}{{TableRowN| device          | zone                     | Array of Objects | The zone object&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Response Properties''' {{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                | zone               | Required   | Array of Objects | The zone object.&lt;br /&gt;
}}{{TableRowN| zone                  | zone_id          | Required   | Integer          | ID of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | index_id           | Optional   | Integer         | Zone ordering.&lt;br /&gt;
}}{{TableRowN| zone                  | name               | Optional   | String           | Name of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | canonical_name        | Optional   | String  | Canonical name of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | type               | Optional   | String           | The zone type. (Use a V2 [[Sensaphone.net_API/zone#GET|read command]] to retrieve the valid values)&lt;br /&gt;
}}{{TableRowN| type                  | type_list          | Optional   | Array of Objects | The zone type metadata.&lt;br /&gt;
}}{{TableRowN| type_list             | name               | Optional   | Boolean          | Zone Type Metadata: Name corresponds to the ranged values for the zone type.&lt;br /&gt;
}}{{TableRowN| type_list             | is_digital         | Optional   | Boolean          | Zone Type Metadata: Digital&lt;br /&gt;
}}{{TableRowN| type_list             | is_analog          | Optional   | Boolean          | Zone Type Metadata: Analog&lt;br /&gt;
}}{{TableRowN| type_list             | is_internal        | Optional   | Boolean          | Zone Type Metadata: Internal&lt;br /&gt;
}}{{TableRowN| type_list             | is_external        | Optional   | Boolean          | Zone Type Metadata: External&lt;br /&gt;
}}{{TableRowN| type_list             | is_generic         | Optional   | Boolean          | Zone Type Metadata: Generic&lt;br /&gt;
}}{{TableRowN| type_list             | is_input           | Optional   | Boolean          | Zone Type Metadata: Input&lt;br /&gt;
}}{{TableRowN| type_list             | is_output          | Optional   | Boolean          | Zone Type Metadata: Output&lt;br /&gt;
}}{{TableRowN| type_list             | is_ipalarm         | Optional   | Boolean          | Zone Type Metadata: IP Alarm&lt;br /&gt;
}}{{TableRowN| type_list             | is_alarmable       | Optional   | Boolean          | Zone Type Metadata: Alarmable&lt;br /&gt;
}}{{TableRowN| type_list             | is_tablerange      | Optional   | Boolean          | Zone Type Metadata: Table Ranged&lt;br /&gt;
}}{{TableRowN| type_list             | is_loggable        | Optional   | Boolean          | Zone Type Metadata: Loggable&lt;br /&gt;
}}{{TableRowN| type_list             | is_alarm_low       | Optional   | Boolean          | Zone Type Metadata: Alarm Low&lt;br /&gt;
}}{{TableRowN| type_list             | is_alarm_high      | Optional   | Boolean          | Zone Type Metadata: Alarm High&lt;br /&gt;
}}{{TableRowN| type_list             | units_list      | Optional   | Array of Ranges          | Zone Type Metadata: Possible Units&lt;br /&gt;
}}{{TableRowN| zone                  | enable             | Optional   | Boolean          | Whether or not the zone is enabled.&lt;br /&gt;
}}{{TableRowN| zone                  | value              | Optional   | String           | The data value for the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | units              | Optional   | String           | The custom units for the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | schedule           | Optional   | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| zone                  | alarm_zone         | Optional   | Object           | Sub-object containing data for alarmable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_rtn          | Optional   | Boolean or null  | Whether or not a return-to-normal alarm is enabled. 'null' if the feature is not supported.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_hold         | Optional   | Integer          | The alarm hold (or clear delay) time.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_enable       | Optional   | Boolean          | Whether or not alarming is enabled for this zone.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | rec_time           | Optional   | Integer          | The alarm recognition time.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | reset_time         | Optional   | Integer          | The alarm reset time.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_low         | Optional   | Floating Point          | The alarm low limit.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_high         | Optional   | Floating Point          | The alarm high limit.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_condition         | Optional   | Array of ZoneState          |  The highest priority ZoneState that has been reached&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_status         | Optional   | Array of ZoneState          |   The processed status of the zone ( returns 2 ZoneStates)&lt;br /&gt;
}}{{TableRowN| alarm_zone            | current_status         | Optional   | Array of ZoneState          |  The real-time status of the zone input (returns 1 ZoneState)&lt;br /&gt;
}}{{TableRowN| alarm_zone            | unack_alarms         | Optional   | Array of ZoneState          |  Alarm states that are currently unacknowledged &lt;br /&gt;
}}{{TableRowN| alarm_zone                  | alarmschedule           | Optional   | Object           | (See [[Sensaphone.net API/alarmschedule |Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| zone                  | analog_zone        | Optional   | Object           | Sub-object containing data for analog zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| analog_zone           | minimum            | Optional   | Floating Point   | The minimum &amp;quot;value&amp;quot; seen.&lt;br /&gt;
}}{{TableRowN| analog_zone           | maximum            | Optional   | Floating Point   | The maximum &amp;quot;value&amp;quot; seen.&lt;br /&gt;
}}{{TableRowN| analog_zone           | calibration        | Optional   | Floating Point   | The calibration factor applied to the &amp;quot;value&amp;quot;.&lt;br /&gt;
}}{{TableRowN| zone                  | table_zone         | Optional   | Object           | Sub-object containing data for table-based zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| table_zone            | table_low                | Optional   | Floating Point   | The low table range for the zone. Used for 4-20mA sensors.&lt;br /&gt;
}}{{TableRowN| table_zone            | table_high               | Optional   | Floating Point   | The high table range for the zone. Used for 4-20mA sensors.&lt;br /&gt;
}}{{TableRowN| zone                  | log_zone           | Optional   | Object           | Sub-object containing data for loggable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| log_zone              | report_mode        | Optional   | String           | The reporting option.&lt;br /&gt;
}}{{TableRowN| log_zone              | alarm_interval     | Optional   | Integer          | The datalogging interval for when in alarm.&lt;br /&gt;
}}{{TableRowN| log_zone              | normal_interval    | Optional   | Integer          | The datalogging interval for when not in alarm.&lt;br /&gt;
}}{{TableRowN| log_zone              | enable             | Optional   | Boolean          | Whether or not datalogging is enabled.&lt;br /&gt;
}}{{TableRowN| zone                  | pulse_zone         | Optional   | Object           | Sub-object containing data for pulse count capable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| pulse_zone            | enable             | Optional   | Boolean          | Whether or not pulse counting is enabled for this zone.&lt;br /&gt;
}}{{TableRowN| pulse_zone            | multiply           | Optional   | Integer          | The multiplication factor to apply to each pulse.&lt;br /&gt;
}}{{TableRowN| pulse_zone            | count              | Optional   | Integer          | The number of pulses seen (after multiply has been applied)&lt;br /&gt;
}}{{TableRowN| zone                  | runtime_zone       | Optional   | Object           | Sub-object containing data for runtime capable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| runtime_zone          | enable             | Optional   | Boolean          | Whether or not runtime is enabled for this zone.&lt;br /&gt;
}}{{TableRowN| runtime_zone          | runtime            | Optional   | String           | The run time elapsed.&lt;br /&gt;
}}{{TableRowN| zone                  | modbus_zone        | Optional   | Object           | Sub-object containing data for modbus zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| modbus_zone           | media_port         | Optional   | String           | The modbus media port&lt;br /&gt;
}}{{TableRowN| modbus_zone           | slave_id           | Optional   | Integer          | The modbus slave ID&lt;br /&gt;
}}{{TableRowN| modbus_zone           | command            | Optional   | String           | The modbus command&lt;br /&gt;
}}{{TableRowN| modbus_zone           | address            | Optional   | Integer          | The modbus address&lt;br /&gt;
}}{{TableRowN| modbus_zone           | byte_order         | Optional   | String           | The modbus byte order&lt;br /&gt;
}}{{TableRowN| modbus_zone           | register_order     | Optional   | String           | The modbus register order&lt;br /&gt;
}}{{TableRowN| modbus_zone           | register_size      | Optional   | String           | The modbus register size&lt;br /&gt;
}}{{TableRowN| modbus_zone           | format             | Optional   | String           | The modbus format&lt;br /&gt;
}}{{TableRowN| modbus_zone           | sign               | Optional   | String           | The modbus sign&lt;br /&gt;
}}{{TableRowN| modbus_zone           | scaling_offset     | Optional   | Integer          | The modbus scaling offset&lt;br /&gt;
}}{{TableRowN| modbus_zone           | scaling_factor     | Optional   | Integer          | The modbus scaling factor&lt;br /&gt;
}}{{TableRowN| modbus_zone           | scaling_mode       | Optional   | String           | The modbus scaling mode&lt;br /&gt;
}}{{TableRowN| zone                  | output_zone        | Optional   | Object           | Sub-object containing data for output zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| output_zone           | mode               | Optional   | Output Mode Type           | The output mode&lt;br /&gt;
}}{{TableRowN| output_zone           | mode_list          | Optional   | Array of  Output Mode Type           | The list of output modes&lt;br /&gt;
}}{{TableRowN| output_zone           | set_point_on       | Optional   | Floating Point   | The output set point for the &amp;quot;on&amp;quot; state.&lt;br /&gt;
}}{{TableRowN| output_zone           | set_point_off      | Optional   | Floating Point   | The output set point for the &amp;quot;off&amp;quot; state.&lt;br /&gt;
}}{{TableRowN| zone                  | wireless_zone      | Optional   | Object           | Sub-object containing data for wireless zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| wireless_zone         | sampling_rate      | Optional   | Integer          | The sampling rate for the sensor&lt;br /&gt;
}}{{TableRowN| wireless_zone         | serial_number      | Optional   | Integer          | The serial number for the wireless sensor.&lt;br /&gt;
}}{{TableRowN| wireless_zone         | battery_level      | Optional   | String           | The wireless sensor's battery level.&lt;br /&gt;
}}{{TableRowN| wireless_zone         | power_level        | Optional   | String           | The wireless sensor's power level.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==== Example JSON ====&lt;br /&gt;
&lt;br /&gt;
Receive the status for a specific Zone.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON''' &lt;br /&gt;
&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;acctid&amp;quot;: 987654,&lt;br /&gt;
    &amp;quot;uuid&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;zone&amp;quot;:[&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;zone_id&amp;quot;:28487,&lt;br /&gt;
          &amp;quot;status&amp;quot;: &amp;quot;null&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
       ]&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;
       &amp;quot;zone&amp;quot;:[&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;zone_id&amp;quot;: 28487,&lt;br /&gt;
          &amp;quot;status&amp;quot;: &amp;quot;OK&amp;quot;&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 a Zone name &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}/zone/{ZONE_ID}/name/{ZONE_NAME}&lt;br /&gt;
*Edit a Zone's recognition time value &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}/zone/{ZONE_ID}/alarm_zone/rec_time/{REC_TIME}&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/zone&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                  | String           | Session Token&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 parent device of the &amp;quot;zone&amp;quot; resource. See [[Sensaphone.net_API/device|device]].&lt;br /&gt;
}}{{TableRowN| device          | zone                     | Array of Objects | The zone object.&lt;br /&gt;
}}{{TableRowN| zone            | zone_id                  | Integer          | ID of the zone.&lt;br /&gt;
}}{{TableRowN| zone            | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Zone'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 '''zone''' child properties listed below are required in addition to &amp;quot;zone_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                | zone               | Required   | Array of Objects | The zone object.&lt;br /&gt;
}}{{TableRowN| zone                  | zone_id          | Required   | Integer          | ID of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | index_id           | Optional   | Integer          | Zone ordering.&lt;br /&gt;
}}{{TableRowN| zone                  | name               | Optional   | String           | Name of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | type               | Optional   | String           | The zone type. (Use a V2 [[Sensaphone.net_API/zone#GET|read command]] to retrieve the valid values)&lt;br /&gt;
}}{{TableRowN| zone                  | enable             | Optional   | Boolean          | Whether or not the zone is enabled.&lt;br /&gt;
}}{{TableRowN| zone                  | value              | Optional   | String           | The data value for the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | units              | Optional   | String           | The custom units for the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | schedule           | Optional   | Object           | (See [[Sensaphone.net API/schedule|Sensaphone.net API/schedule]])&lt;br /&gt;
}}{{TableRowN| zone                  | alarm_zone         | Optional   | Object           | Sub-object containing data for alarmable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_rtn          | Optional   | Boolean or null  | Whether or not a return-to-normal alarm is enabled. 'null' if the feature is not supported.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_hold         | Optional   | Integer          | The alarm hold (or clear delay) time.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_enable       | Optional   | Boolean          | Whether or not alarming is enabled for this zone.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | rec_time           | Optional   | Integer          | The alarm recognition time.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | reset_time         | Optional   | Integer          | The alarm reset time.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_low         | Optional   | Floating Point          | The alarm low limit.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_high         | Optional   | Floating Point          | The alarm high limit.&lt;br /&gt;
}}{{TableRowN| alarm_zone                  | alarmschedule           | Optional   | Object           | (See [[Sensaphone.net API/alarmschedule |Sensaphone.net API/alarmschedule]])&lt;br /&gt;
}}{{TableRowN| zone                  | analog_zone        | Optional   | Object           | Sub-object containing data for analog zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| analog_zone           | minimum          | Optional   | Boolean          | Clear the minimum value.&lt;br /&gt;
}}{{TableRowN| analog_zone           | maximum          | Optional   | Boolean          | Clear the maximum value.&lt;br /&gt;
}}{{TableRowN| analog_zone           | calibration        | Optional   | Floating Point   | The calibration factor applied to the &amp;quot;value&amp;quot;.&lt;br /&gt;
}}{{TableRowN| zone                  | table_zone         | Optional   | Object           | Sub-object containing data for table-based zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| table_zone            | table_low                | Optional   | Floating Point   | The low table range for the zone. Used for 4-20mA sensors.&lt;br /&gt;
}}{{TableRowN| table_zone            | table_high               | Optional   | Floating Point   | The high table range for the zone. Used for 4-20mA sensors.&lt;br /&gt;
}}{{TableRowN| zone                  | log_zone           | Optional   | Object           | Sub-object containing data for loggable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| log_zone              | report_mode        | Optional   | String           | The reporting option.&lt;br /&gt;
}}{{TableRowN| log_zone              | alarm_interval     | Optional   | Integer          | The datalogging interval for when in alarm.&lt;br /&gt;
}}{{TableRowN| log_zone              | normal_interval    | Optional   | Integer          | The datalogging interval for when not in alarm.&lt;br /&gt;
}}{{TableRowN| log_zone              | enable             | Optional   | Boolean          | Whether or not datalogging is enabled.&lt;br /&gt;
}}{{TableRowN| zone                  | pulse_zone         | Optional   | Object           | Sub-object containing data for pulse count capable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| pulse_zone            | enable             | Optional   | Boolean          | Whether or not pulse counting is enabled for this zone.&lt;br /&gt;
}}{{TableRowN| pulse_zone            | multiply           | Optional   | Integer          | The multiplication factor to apply to each pulse.&lt;br /&gt;
}}{{TableRowN| pulse_zone            | count              | Optional   | Integer          | The number of pulses seen (after multiply has been applied)&lt;br /&gt;
}}{{TableRowN| zone                  | runtime_zone       | Optional   | Object           | Sub-object containing data for runtime capable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| runtime_zone          | enable             | Optional   | Boolean          | Whether or not runtime is enabled for this zone.&lt;br /&gt;
}}{{TableRowN| runtime_zone          | runtime            | Optional   | String           | The run time elapsed.&lt;br /&gt;
}}{{TableRowN| zone                  | modbus_zone        | Optional   | Object           | Sub-object containing data for modbus zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| modbus_zone           | media_port         | Optional   | String           | The modbus media port&lt;br /&gt;
}}{{TableRowN| modbus_zone           | slave_id           | Optional   | Integer          | The modbus slave ID&lt;br /&gt;
}}{{TableRowN| modbus_zone           | command            | Optional   | String           | The modbus command&lt;br /&gt;
}}{{TableRowN| modbus_zone           | address            | Optional   | Integer          | The modbus address&lt;br /&gt;
}}{{TableRowN| modbus_zone           | byte_order         | Optional   | String           | The modbus byte order&lt;br /&gt;
}}{{TableRowN| modbus_zone           | register_order     | Optional   | String           | The modbus register order&lt;br /&gt;
}}{{TableRowN| modbus_zone           | register_size      | Optional   | String           | The modbus register size&lt;br /&gt;
}}{{TableRowN| modbus_zone           | format             | Optional   | String           | The modbus format&lt;br /&gt;
}}{{TableRowN| modbus_zone           | sign               | Optional   | String           | The modbus sign&lt;br /&gt;
}}{{TableRowN| modbus_zone           | scaling_offset     | Optional   | Integer          | The modbus scaling offset&lt;br /&gt;
}}{{TableRowN| modbus_zone           | scaling_factor     | Optional   | Integer          | The modbus scaling factor&lt;br /&gt;
}}{{TableRowN| modbus_zone           | scaling_mode       | Optional   | String           | The modbus scaling mode&lt;br /&gt;
}}{{TableRowN| zone                  | output_zone        | Optional   | Object           | Sub-object containing data for output zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| output_zone           | mode               | Optional   | String           | The output mode&lt;br /&gt;
}}{{TableRowN| output_zone           | mode_list          | Optional   | String           | The list of output modes&lt;br /&gt;
}}{{TableRowN| output_zone           | set_point_on       | Optional   | Floating Point   | The output set point for the &amp;quot;on&amp;quot; state.&lt;br /&gt;
}}{{TableRowN| output_zone           | set_point_off      | Optional   | Floating Point   | The output set point for the &amp;quot;off&amp;quot; state.&lt;br /&gt;
}}{{TableRowN| output_zone           | value      | Optional   | Floating Point   | *Write Only* set the value of the output zone&lt;br /&gt;
}}{{TableRowN| zone                  | wireless_zone      | Optional   | Object           | Sub-object containing data for wireless zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| wireless_zone         | sampling_rate      | Optional   | Integer          | The sampling rate for the sensor&lt;br /&gt;
}}{{TableRowN| wireless_zone         | serial_number      | Optional   | Integer          | The serial number for the wireless sensor.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Acknowledge All Zone 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}/zone/{ZONE_ID}/alarm_zone/acknowledge_all_alarms/{true}&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/zone&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                  | String           | Session Token&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 parent device of the &amp;quot;zone&amp;quot; resource. See [[Sensaphone.net_API/device|device]].&lt;br /&gt;
}}{{TableRowN| device          | zone                     | Array of Objects | The zone object.&lt;br /&gt;
}}{{TableRowN| zone            | zone_id                  | Integer          | ID of the zone.&lt;br /&gt;
}}{{TableRowN| zone            | alarm_zone | Object           |  Sub-object containing data for alarmable zones&lt;br /&gt;
}}{{TableRowN| alarm_zone            | acknowledge_alarms | Array of Zone State           |  A write-only property to acknowledge specific alarms&lt;br /&gt;
}}{{TableRowN| alarm_zone            | acknowledge_all_alarms | Boolean           |  A write-only property to acknowledge all alarms for a zone&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;acknowledge_alarms&amp;quot;, if it is present in the request json other properties will be ignored&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Result 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                | zone               | Required   | Array of Objects | The zone object.&lt;br /&gt;
}}{{TableRowN| zone                  | zone_id          | Required   | Integer          | ID of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | alarm_zone         | Required   | Object           | Sub-object containing data for alarmable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | acknowledge_alarms          | Optional   | Array of Zone State  |  A write-only property to acknowledge specific alarms&lt;br /&gt;
}}{{TableRowN| alarm_zone            | acknowledge_all_alarms         | Optional   | Boolean          | A write-only property to acknowledge all alarms for a zone&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
=== Example JSON ===&lt;br /&gt;
&lt;br /&gt;
Acknowledge an alarm for a Zone&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON''' &lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;: &amp;quot;create&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;device&amp;quot;,&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;device&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
      &amp;quot;zone&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;zone_id&amp;quot;: 7,&lt;br /&gt;
          &amp;quot;alarm_zone&amp;quot;: {&lt;br /&gt;
            &amp;quot;acknowledge_alarms&amp;quot;: [&lt;br /&gt;
              11,&lt;br /&gt;
              4&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;
*'''Response JSON''' &lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;result&amp;quot;: {&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;
    &amp;quot;properties&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;zone&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;alarm_zone&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;acknowledge_alarms&amp;quot;: 11,&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;
                  &amp;quot;success&amp;quot;: true&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                  &amp;quot;acknowledge_alarms&amp;quot;: 4,&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;
                  &amp;quot;success&amp;quot;: true&lt;br /&gt;
                }&lt;br /&gt;
              ],&lt;br /&gt;
              &amp;quot;zone_id&amp;quot;: 7&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      ]&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/Sensaphone.net_API/coordinates</id>
		<title>Sensaphone.net API/coordinates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/coordinates"/>
				<updated>2015-04-29T19:14:49Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&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                | String           | Session Token&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                  | String           | Session Token&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/Sensaphone.net_API/address</id>
		<title>Sensaphone.net API/address</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/address"/>
				<updated>2015-04-29T19:13:17Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */  Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
==Specifications==&lt;br /&gt;
The Address object holds street address information. It is not an individual (top-level) API resource, but is instead used in conjunction with other resources in a number of contexts including [[Sensaphone.net API/device|devices]] and [[Sensaphone.net API/user|users]]. It may be used as its own entity (e.g. users) or as part of a location (e.g. devices). The &amp;quot;address&amp;quot; resource cannot be created or deleted. Because the address ID is fixed and predetermined, it is not required to access the resource, although it may be optionally specified.&lt;br /&gt;
&lt;br /&gt;
The address 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;''         | address        | Object     | The address object.           | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| address              | address_id     | Integer    | ID of the address.            | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| address              | address_line_1 | String     | First line of street address  | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| address              | address_line_2 | String     | Second line of street address | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| address              | city           | String     | City                          | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| address              | state          | String     | State                         | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| address              | zip            | String    | Zip Code                      | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| address              | country        | String     | Country                       | ''' ''' | ''' ''' | '''&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 address 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}/address&lt;br /&gt;
&lt;br /&gt;
*Retrieve the city 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}/address/city&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/address&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                | String           | Session Token&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;''            | address                | Array of Objects | The address 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;''              | address                 | Required     | Array of Objects | Address data&lt;br /&gt;
}}{{TableRowN| address                   | address_id              | Required     | Integer          | ID of the address.&lt;br /&gt;
}}{{TableRowN| address                   | address_line_1          | Optional     | String           | First line of street address&lt;br /&gt;
}}{{TableRowN| address                   | address_line_2          | Optional     | String           | Second line of street address &lt;br /&gt;
}}{{TableRowN| address                   | city                    | Optional     | String           | City&lt;br /&gt;
}}{{TableRowN| address                   | state                   | Optional     | String           | State&lt;br /&gt;
}}{{TableRowN| address                   | zip                     | Optional     | String          | Zip code&lt;br /&gt;
}}{{TableRowN| address                   | country                 | Optional     | String           | Country of address&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive city value of an Address&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;address&amp;quot;: [&lt;br /&gt;
       {&lt;br /&gt;
         &amp;quot;city&amp;quot;: null&lt;br /&gt;
       }&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;device&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        &amp;quot;address&amp;quot;: [&lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;address_id&amp;quot;: 13553&lt;br /&gt;
            &amp;quot;city&amp;quot;: &amp;quot;Kennett Square&amp;quot;&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 address's '''state'''&lt;br /&gt;
   '''PUT''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/device/{DEVICE_ID}/address/state/{STATE}&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://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 Properties''' | '''Child Properties'''   | '''Type'''       | '''Description'''&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | acctid                   | Integer          | Account ID&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | session                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;                  | request_type             | String           | &amp;quot;update&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;''            | address                  | Array of Objects | The address object&lt;br /&gt;
}}{{TableRowN| address                 | '''''CHILD PROPERTY''''' | &amp;amp;nbsp;           | Address'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 '''address''' child properties listed below is required (other than &amp;quot;address_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;''              | address                 | Required     | Array of Objects | Address data&lt;br /&gt;
}}{{TableRowN| address                   | address_id              | Required     | Integer          | ID of the address.&lt;br /&gt;
}}{{TableRowN| address                   | address_line_1          | Optional     | String           | First line of street address&lt;br /&gt;
}}{{TableRowN| address                   | address_line_2          | Optional     | String           | Second line of street address &lt;br /&gt;
}}{{TableRowN| address                   | city                    | Optional     | String           | City&lt;br /&gt;
}}{{TableRowN| address                   | state                   | Optional     | String           | State&lt;br /&gt;
}}{{TableRowN| address                   | zip                     | Optional     | String          | Zip code&lt;br /&gt;
}}{{TableRowN| address                   | country                 | Optional     | String           | Country of address&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/devicegroup</id>
		<title>Sensaphone.net API/devicegroup</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/devicegroup"/>
				<updated>2015-04-29T19:12:01Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
Sensaphone.net includes a feature to group individual devices together. The DeviceGroup API allows a user to view and edit grouping information. &lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
&lt;br /&gt;
The device group 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;''         | devicegroup        | Object     | The devicegroup object.            | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;''' | '''n/a'''&lt;br /&gt;
}}{{TableRowN| devicegroup                    | group_id     | Integer    | ID of the device group.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| devicegroup                    | name   | String     | The name of this group.             | ''' ''' | ''' ''' | '''&amp;amp;#x2713;''' | '''&amp;amp;#x2713;'''&lt;br /&gt;
}}{{TableRowN| devicegroup                    | devices           |  Array of Objects     | The list of devices in this group.        | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| devices                    | device_id    | Integer     | The device_id of a device that is a member of this group. | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| devicegroup                    | groups         | Array of Objects    | The list of groups in this group.  | '''&amp;amp;#x2713;''' | ''' ''' | '''&amp;amp;#x2713;''' | ''' '''&lt;br /&gt;
}}{{TableRowN| groups              | group_id         | Integer    | The group_id of a group that is a member of this group. | '''&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;
*Receive all Device Group information &lt;br /&gt;
 '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup&lt;br /&gt;
&lt;br /&gt;
*Receive all Device Group names &lt;br /&gt;
 '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/name&lt;br /&gt;
&lt;br /&gt;
*Receive all Device ID's in a Device Group&lt;br /&gt;
 '''GET''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}/devices/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/devicegroup&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;read&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | devicegroup              | Array of Objects | The devicegroup 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;                | devicegroup        | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| devicegroup           | group_id           | Optional   | Integer          | ID of Device Group&lt;br /&gt;
}}{{TableRowN| devicegroup           | name               | Optional   | String           | The name of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup           | devices            | Optional   | Array of Objects | The list of devices in this group.&lt;br /&gt;
}}{{TableRowN| devices               | device_id          | Optional   | Integer          | The device_id of a device that is a member of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup           | groups             | Optional   | Array of Objects | The list of groups in this group.&lt;br /&gt;
}}{{TableRowN| groups                | group_id           | Optional   | Integer          | The group_id of a group that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Receive all Device Group information&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;devicegroup&amp;quot;: null&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;devicegroup&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;group_id&amp;quot;: 6575,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;South Barns&amp;quot;,&lt;br /&gt;
        &amp;quot;devices&amp;quot;:&lt;br /&gt;
        [ &lt;br /&gt;
          { &amp;quot;device_id&amp;quot;: 1234 },&lt;br /&gt;
          { &amp;quot;device_id&amp;quot;: 1235 }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;groups&amp;quot;:&lt;br /&gt;
        [&lt;br /&gt;
          { &amp;quot;group_id&amp;quot;: 8575 },&lt;br /&gt;
          { &amp;quot;group_id&amp;quot;: 8404 }&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;
The '''PUT''' request for the device group resource is used to edit the group:&lt;br /&gt;
*Change the name&lt;br /&gt;
*Add or remove devices (JSON mode only)&lt;br /&gt;
*Add or remove groups (JSON mode only)&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Edit a Device Group '''name''' &lt;br /&gt;
   '''PUT''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}/name/{GROUP_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/devicegroup&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;update&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | devicegroup              | Array of Objects | The devicegroup object.&lt;br /&gt;
}}{{TableRowN| devicegroup     | group_id                 | Integer          | ID of the device group.&lt;br /&gt;
}}{{TableRowN| devicegroup     | group_name               | String           | New name of a Device Group&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;                | devicegroup        | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| devicegroup           | group_id           | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| devicegroup           | name               | Optional   | String           | The name of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup           | devices            | Optional   | Array of Objects | The list of devices in this group.&lt;br /&gt;
}}{{TableRowN| devices               | device_id          | Optional   | Integer          | The device_id of a device that is a member of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup           | groups             | Optional   | Array of Objects | The list of groups in this group.&lt;br /&gt;
}}{{TableRowN| groups                | group_id           | Optional   | Integer          | The group_id of a group that is a member of this 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 empty Device Group (A '''group_name''' value is required when creating a new Device Group) &lt;br /&gt;
  '''POST'''  &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/name/{GROUP_NAME}&lt;br /&gt;
&lt;br /&gt;
*Add a device to a device group&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}/devices/device_id/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Add a group to a device group&lt;br /&gt;
  '''POST''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}/groups/group_id/{GROUP_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.sensaphon.net/api/v1/devicegroups&lt;br /&gt;
&lt;br /&gt;
'''JSON Mode Request Properties'''&lt;br /&gt;
:''Create new device group''&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 Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | devicegroup              | Array of Objects | The devicegroup object.&lt;br /&gt;
}}{{TableRowN| devicegroup     | name                     | String           | New name of a Device Group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
:''Add device and/or group''&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 Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;create&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | devicegroup              | Array of Objects | The devicegroup object.&lt;br /&gt;
}}{{TableRowN| devicegroup     | group_id                 | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| devicegroup     | devices                  | Array of Objects | Used to add devices to the group.&lt;br /&gt;
}}{{TableRowN| devices         | device_id                | Integer          | The device_id of a [[Sensaphone.net API/device|device]] to add to this group.&lt;br /&gt;
}}{{TableRowN| devicegroup     | groups                   | Array of Object  | Used to add groups to the group.&lt;br /&gt;
}}{{TableRowN| groups          | group_id                 | Integer          | The group_id of a group to add to this group.&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;                | devicegroup        | Required   | Array of Objects | The parent device object.&lt;br /&gt;
}}{{TableRowN| devicegroup           | group_id           | Optional   | Integer          | ID of Device&lt;br /&gt;
}}{{TableRowN| devicegroup           | name               | Optional   | String           | The name of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup           | devices            | Optional   | Array of Objects | The list of devices in this group.&lt;br /&gt;
}}{{TableRowN| devices               | device_id          | Optional   | Integer          | The device_id of a device that is a member of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup           | groups             | Optional   | Array of Objects | The list of groups in this group.&lt;br /&gt;
}}{{TableRowN| groups                | group_id           | Optional   | Integer          | The group_id of a group that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Delete a device group&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a device from a device group&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}/devices/device_id/{DEVICE_ID}&lt;br /&gt;
&lt;br /&gt;
*Delete a group from a device group&lt;br /&gt;
   '''DELETE''' &amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/devicegroup/{GROUP_ID}/groups/group_id/{GROUP_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/devicegroup&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                  | String           | Session Token&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | request_type             | String           | &amp;quot;delete&amp;quot;&lt;br /&gt;
}}{{TableRowN| &amp;amp;nbsp;          | devicegroup              | Array of Objects | The devicegroup object.&lt;br /&gt;
}}{{TableRowN| devicegroup     | group_id                 | Integer          | ID of the device group.&lt;br /&gt;
}}{{TableRowN| devicegroup     | devices                  | Array of Objects | Used to remove devices from the group. (Optional)&lt;br /&gt;
}}{{TableRowN| devices         | device_id                | Integer          | The device_id of a device that is a member of this group.&lt;br /&gt;
}}{{TableRowN| devicegroup     | groups                   | Array of Object  | Used to remove groups from the group. (Optional)&lt;br /&gt;
}}{{TableRowN| groups          | group_id                 | Integer          | The group_id of a group that is a member of this group.&lt;br /&gt;
}}{{TableEnd}}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/device</id>
		<title>Sensaphone.net API/device</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/device"/>
				<updated>2015-04-29T19:11:01Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Specifications */ Change 'clone' description wording&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                 | Destination device to which settings will be cloned; must also provide source device using 'device_id' | ''' '''        | ''' '''        | ''' '''        | '''&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;
}}{{TableRowN| device                | firmware_latest        | Object                  | Latest production firmware released for device                                                         | ''' '''        | ''' '''        | '''&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             | String           | Session Token&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   | String                   | 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 of Objects         | 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                  | String           | Session Token&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          | device_id of device to which data has been cloned&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             | String           | Session Token&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                  | String           | 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   | String           | 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                 | String           | Session Token&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             | String           | Session Token&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/Sensaphone.net_API/account</id>
		<title>Sensaphone.net API/account</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/account"/>
				<updated>2015-04-29T19:10:02Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&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                | String           | Session Token&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                  | String           | Session Token&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/Sensaphone.net_API/history</id>
		<title>Sensaphone.net API/history</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/history"/>
				<updated>2015-04-29T18:18:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* 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;
==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, hours, minutes, seconds )  {&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 (Sensaphone timestamp)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (Sensaphone timestamp)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  page through results by incrementing this number by multiples of 'record_offset'&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  number of records returned per query; or 'page' size&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 (Sensaphone timestamp)&lt;br /&gt;
}}{{TableRowN| end                      | Optional        | Integer                  | the end time (Sensaphone timestamp)&lt;br /&gt;
}}{{TableRowN|  begin_offset            | Optional        | Integer                  | page through results by incrementing this number by multiples of 'record_offset'&lt;br /&gt;
}}{{TableRowN|  record_offset           | Optional        | Integer                  | number of records returned per query; or 'page' size&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;
&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 (Sensaphone timestamp)&lt;br /&gt;
}}{{TableRowN| end                      | Optional   | Integer           | the end time (Sensaphone timestamp)&lt;br /&gt;
}}{{TableRowN|  begin_offset         | Optional   | Integer           |  page through results by incrementing this number by multiples of 'record_offset'&lt;br /&gt;
}}{{TableRowN|  record_offset        | Optional   | Integer           |  number of records returned per query; or 'page' size&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/Sensaphone.net_API/dashboard</id>
		<title>Sensaphone.net API/dashboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/dashboard"/>
				<updated>2015-04-29T18:17:55Z</updated>
		
		<summary type="html">&lt;p&gt;Derek: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
Receive data to populate Dashboard. The Dashboard is a page that gives the user a quick view of Device and alarm statuses. It is a read only resource.&lt;br /&gt;
&lt;br /&gt;
==Example Call==&lt;br /&gt;
&lt;br /&gt;
   http://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard&lt;br /&gt;
&lt;br /&gt;
==Example Requests==&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:''' &lt;br /&gt;
*Receive all Dashboard information &lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard&lt;br /&gt;
&lt;br /&gt;
*Receive for the number of Devices online &lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard/devices_online&lt;br /&gt;
&lt;br /&gt;
*Receive the names of all Devices powered on and online &lt;br /&gt;
   '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{UUID}/dashboard/device/name&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST''' https://rest.sensaphone.net/api/v1/dashboard &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                  | 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;          | dashboard                   | Object | The dashboard object.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;br&amp;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;                | dashboard             | Required   | Object | The dashboard object.&lt;br /&gt;
}}{{TableRowN| dashboard           | online_count                  | Optional    | Integer    | Number of Devices turned on and online&lt;br /&gt;
}}{{TableRowN| dashboard           | offline_count                  | Optional    | Integer    | Number of Devices offline&lt;br /&gt;
}}{{TableRowN| dashboard           |  alarm_count   | Optional    | Integer    | Number of acknowledged alarms&lt;br /&gt;
}}{{TableRowN| dashboard           |  unack_count   | Optional    | Integer    | Number of unacknowledged alarms&lt;br /&gt;
}}{{TableRowN| dashboard           |  total_alarm_count   | Optional    | Integer    | Number of alarms&lt;br /&gt;
}}{{TableRowN| dashboard           |  device                              | Optional     | Array      | Array of Devices&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                | 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                | status        | Optional   | String           | Alarm status of Device(&amp;quot;OK&amp;quot; or &amp;quot;Alarm&amp;quot;)&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                | 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                | zone               | Optional   | Array of Objects | Device Zone data (See [[Sensaphone.net API/zone|Sensaphone.net API/zone]]) *Only returns zones with an alarm&lt;br /&gt;
}}{{TableRowN| zone                  | canonical_name        | Optional   | String  | Canonical name of the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | value              | Optional   | String           | The data value for the zone.&lt;br /&gt;
}}{{TableRowN| zone                  | type               | Optional   | String           | The zone type.&lt;br /&gt;
}}{{TableRowN| zone                  | alarm_zone         | Optional   | Object           | Sub-object containing data for alarmable zones. 'null' if unsupported.&lt;br /&gt;
}}{{TableRowN| alarm_zone            | alarm_status         | Optional   | Array of ZoneState          |   The processed status of the zone ( returns 2 ZoneStates)&lt;br /&gt;
}}{{TableRowN| alarm_zone            | unack_alarms         | Optional   | Array of ZoneState          |  Alarm states that are currently unacknowledged &lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
This example is requesting the '''devices_online''' and '''name''' values.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON''' &lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;request_type&amp;quot;: &amp;quot;read&amp;quot;,&lt;br /&gt;
    &amp;quot;resource&amp;quot;: &amp;quot;dashboard&amp;quot;,&lt;br /&gt;
    &amp;quot;acctid&amp;quot;: 12345678,&lt;br /&gt;
    &amp;quot;session&amp;quot;: &amp;quot;123a-456b-789c&amp;quot;,&lt;br /&gt;
    &amp;quot;dashboard&amp;quot;: {&lt;br /&gt;
        &amp;quot;online_count&amp;quot;: null,&lt;br /&gt;
        &amp;quot;device&amp;quot;: [{&lt;br /&gt;
            &amp;quot;name&amp;quot;: null&lt;br /&gt;
        }]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
*'''Result JSON'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;response&amp;quot;: {&lt;br /&gt;
        &amp;quot;dashboard&amp;quot;: {&lt;br /&gt;
            &amp;quot;device&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;device_id&amp;quot;: 9876,&lt;br /&gt;
                    &amp;quot;name&amp;quot;: &amp;quot;A device&amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;device_id&amp;quot;: 5432,&lt;br /&gt;
                    &amp;quot;name&amp;quot;: &amp;quot;Another device&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;online_count&amp;quot;: 2&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;result&amp;quot;: {&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;
        &amp;quot;success&amp;quot;: true&lt;br /&gt;
    }&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API/login</id>
		<title>Sensaphone.net API/login</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API/login"/>
				<updated>2015-04-29T18:16:25Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Sensaphone.net API */ Update Session data type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=[[Sensaphone.net API]]=&lt;br /&gt;
&lt;br /&gt;
The Login API will be used to log in to the Sensaphone.net system. When a user logs in with their username and password they will be assigned a session UUID. The session UUID will have a corresponding time stamp and a timed expiration for their session. The session UUID and statically assigned Account ID will be used as the primary identifier instead of including a username and password in subsequent URI requests. &lt;br /&gt;
&lt;br /&gt;
==Example Call==&lt;br /&gt;
    https://rest.sensaphone.net/api/v1/login/{USERNAME}/{PASSWORD}&lt;br /&gt;
&lt;br /&gt;
==Values==&lt;br /&gt;
*Username&lt;br /&gt;
*Password&lt;br /&gt;
*Session UUID&lt;br /&gt;
*Session Time stamp&lt;br /&gt;
*Session Expiration&lt;br /&gt;
&lt;br /&gt;
==Example Requests==&lt;br /&gt;
===GET===&lt;br /&gt;
'''URI Mode Request URI's:'''&lt;br /&gt;
*Receive Login information &lt;br /&gt;
    '''GET'''  https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSION}/login&lt;br /&gt;
*Receive a Login timestamp for a session &lt;br /&gt;
    '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSION}/login/login_timestamp&lt;br /&gt;
*Receive the number of seconds until a session expires &lt;br /&gt;
    '''GET''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSION}/login/session_expiration &lt;br /&gt;
&lt;br /&gt;
'''JSON MODE Request URI:'''&lt;br /&gt;
*Receive Login information &lt;br /&gt;
    '''POST'''  https://rest.sensaphone.net/api/v1/login&lt;br /&gt;
&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Request Property'''  | '''Status''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| acctid                       | Required     | Integer    | Static ID of user&lt;br /&gt;
}}{{TableRowN| session                         | Required     | String    | Session ID of user&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Response Property'''          | '''Included''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| login_timestamp                 | Optional     | String     | Time stamp of last log in&lt;br /&gt;
}}{{TableRowN| session_expiration              | Optional     | Integer    | Seconds until log in expiration&lt;br /&gt;
}}{{TableRowN| user_id              | Optional     | Integer    | ID of the logged in user&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
====Example JSON====&lt;br /&gt;
Log in with a username and password using JSON mode.&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;request_type&amp;quot;:&amp;quot;create&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;: &amp;quot;login&amp;quot;,&lt;br /&gt;
  &amp;quot;user_name&amp;quot;: &amp;quot;myusername&amp;quot;,&lt;br /&gt;
  &amp;quot;password&amp;quot;: &amp;quot;pass123&amp;quot;&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;
   &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;Success&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;response&amp;quot;: {&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;login_timestamp&amp;quot;: 1499459402,&lt;br /&gt;
   &amp;quot;session_expiration&amp;quot;: 86400,&lt;br /&gt;
   &amp;quot;user_id&amp;quot;: 00000001&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Receive Login information for a given session UUID.&lt;br /&gt;
&lt;br /&gt;
*'''Request JSON:'''&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;request_type:&amp;quot;read&amp;quot;,&lt;br /&gt;
  &amp;quot;resource&amp;quot;:&amp;quot;login&amp;quot;,&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;login&amp;quot;:null&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: 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;login_timestamp&amp;quot;:&amp;quot;2014-12-31 23:59:59&amp;quot;,&lt;br /&gt;
      &amp;quot;session_expiration&amp;quot;:60&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
===PUT===&lt;br /&gt;
PUT will be used only to update a Login session.&lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Request to update a Login session &lt;br /&gt;
   '''PUT'''  https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSION}/login&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
   '''POST'''  https://rest.sensaphone.net/api/v1/login&lt;br /&gt;
&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Request Property'''  | '''Status''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| acctid                  | Required     | Integer    | Static ID of user&lt;br /&gt;
}}{{TableRowN| session                 | Required     | String     | Session ID of user&lt;br /&gt;
}}{{TableRowN| user_name               | Optional     | String     | Username&lt;br /&gt;
}}{{TableRowN| password                | Optional     | String     | Password for username&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Response Property''' | '''Included'''  | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| acctid                  | Conditionally*  | Integer    | Static ID of user&lt;br /&gt;
}}{{TableRowN| session                 | Conditionally*  | String     | Session ID of user&lt;br /&gt;
}}{{TableRowN| login_timestamp         | Always          | Integer    | Time stamp of renewed session&lt;br /&gt;
}}{{TableRowN| session_expiration      | Always          | Integer    | Time until new log in session expiration&lt;br /&gt;
}}{{TableRowN| user_id                 | Always          | Integer    | ID of the logged in user&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; There may be an instance where the system needs to create a new Session ID and/or Account ID. In which case, it will be outputted in the PUT response.&lt;br /&gt;
&lt;br /&gt;
===POST===&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Request for creating a new login session &lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/login/{USERNAME}/{PASSWORD}&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/login&lt;br /&gt;
&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Request Property'''  | '''Status''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| user_name               | Required     | String     | Username&lt;br /&gt;
}}{{TableRowN| password                | Required     | String     | Password for username&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Response Property''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| acctid                  | Integer    | Static ID of user&lt;br /&gt;
}}{{TableRowN| session                 | String     | Session ID of user&lt;br /&gt;
}}{{TableRowN| login_timestamp         | Integer    | Time stamp of renewed session&lt;br /&gt;
}}{{TableRowN| session_expiration      | Integer    | Time until new log in expiration&lt;br /&gt;
}}{{TableRowN| user_id                 | Integer    | ID of the logged in user&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===DELETE===&lt;br /&gt;
Deleting a login session is the equivalent to logging out. &lt;br /&gt;
&lt;br /&gt;
'''URI Mode Request URI:'''&lt;br /&gt;
*Request to log out of a session &lt;br /&gt;
  '''DELETE''' https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSION}/login&lt;br /&gt;
'''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/login&lt;br /&gt;
&lt;br /&gt;
{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Request Property'''  | '''Status''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| acctid                  | Required     | Integer    | Static ID of user&lt;br /&gt;
}}{{TableRowN| session                 | Required     | String     | Session ID of user&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
In the future the login process will support OAuth for advanced access and authentication.&lt;br /&gt;
&lt;br /&gt;
==Password Reset==&lt;br /&gt;
To reset a pass for a particular email, use the following request:&lt;br /&gt;
&lt;br /&gt;
  '''POST''' https://rest.sensaphone.net/api/v1/login/reset_password/{email_address}&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Sensaphone.net_API</id>
		<title>Sensaphone.net API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Sensaphone.net_API"/>
				<updated>2015-04-29T18:04:35Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
The Sensaphone.net API will be used as a resource for proprietary products (such as mobile applications) and 3rd party clients. It uses a [[wikipedia:REST|REST]] architecture over HTTPS using JSON as the data format. HTTP is not supported. The service can be accessed in one of two modes: URI mode and JSON mode.&lt;br /&gt;
&lt;br /&gt;
In '''''URI mode''''', the following HTTPS methods are used to access the REST resources as [[wikipedia:CRUD|CRUD]].&lt;br /&gt;
::{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Method''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| POST         | '''C'''reate&lt;br /&gt;
}}{{TableRowN| GET          | '''R'''ead&lt;br /&gt;
}}{{TableRowN| PUT          | '''U'''pdate&lt;br /&gt;
}}{{TableRowN| DELETE       | '''D'''elete&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
All parameters are specified in the URI and JSON is only used in the response.&lt;br /&gt;
&lt;br /&gt;
In '''''JSON Mode''''', only the POST method is used to Create, Read, Update, and Delete fields. A &amp;quot;request_type&amp;quot;(create,read,update,delete) JSON property is used to distinguish which method to execute.&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
:'''Resource''': A resource is a primary source of data. Examples: device, zone.&lt;br /&gt;
:'''Property''': A property is a discrete source of data within a resource (e.g. Device's name). A property may also be a resource (e.g. Device's zone).&lt;br /&gt;
:'''ID''': Resources have properties that uniquely identify them. For example, a device has a &amp;quot;device_id&amp;quot;, a zone has a &amp;quot;zone_id&amp;quot;. These identifying properties are optional or required (See [[#URI Syntax|URI Syntax]]) when accessing (read). They are required when modifying (update or delete) a specific existing resource. When creating they are required except for the resource being created. For a create, the newly created ID will typically be returned in the JSON result.&lt;br /&gt;
&lt;br /&gt;
==URI Syntax==&lt;br /&gt;
The URIs are descriptive representations of what the client will receive as a response and will follow one of the formats:&lt;br /&gt;
&lt;br /&gt;
  /api/v1&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ACCTID''}/{''SESSIONID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;/'''login'''/&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''USERNAME''}/{''PASSWORD''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;&lt;br /&gt;
  /api/v1&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ACCTID''}/{''SESSIONID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/'''Resource'''&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]]&amp;lt;/span&amp;gt;...&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/'''Resource'''&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]]&amp;lt;/span&amp;gt;/'''Property'''&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''VALUE''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]]&amp;lt;/span&amp;gt;&lt;br /&gt;
  /api/v1&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ACCTID''}/{''SESSIONID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/'''Resource'''&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]]&amp;lt;/span&amp;gt;...&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/'''Resource'''&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]]&amp;lt;/span&amp;gt;/'''Resource'''&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;/{''ID''}&amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: &amp;quot;v1&amp;quot; can be replaced with &amp;quot;v2&amp;quot;,&amp;quot;v3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Resource&amp;quot; is the the name of the resource to be accessed (e.g. &amp;quot;device&amp;quot;). The &amp;quot;Property&amp;quot; used will be context dependent and is documented for each resource. Values are placed inside &amp;lt;nowiki&amp;gt;{}&amp;lt;/nowiki&amp;gt; brackets. The brackets are used in the URI submitted. &lt;br /&gt;
&lt;br /&gt;
In [[#Overview|URI Mode]], the Resource ID (e.g. &amp;quot;/''{ID}''&amp;quot;) must be included unless it is the rightmost resource in the URI. In [[#Overview|JSON mode]], the ID is still required, but may be included in the submitted JSON instead.&lt;br /&gt;
&lt;br /&gt;
Fields in &amp;lt;span style=&amp;quot;color:#A00000&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;[]&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt; brackets are optional on the URI, however, if they are required in the resource documentation, then they must be included '''either''' in the URI or in the JSON, but not both. The brackets themselves are not included in the URI submitted. Consider the following API call to retrieve the device name for device ID 1234:&lt;br /&gt;
 '''URI Mode Request URI:'''&lt;br /&gt;
  '''GET''' ''https://rest.sensaphone.net/api/v1/{987654}/{0123-4567-8901}/device/{1234}/name''&lt;br /&gt;
The ACCTID, SESSIONID, ID, and &amp;quot;name&amp;quot; fields may be excluded from the URI, but must then be included in the request JSON:&lt;br /&gt;
 '''Request Description:'''&lt;br /&gt;
  Retrieve the &amp;quot;name&amp;quot; property from device &amp;quot;1234&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 '''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' ''https://rest.sensaphone.net/api/v1/device''&lt;br /&gt;
 &lt;br /&gt;
 '''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type:&amp;quot;read&amp;quot;,&lt;br /&gt;
    &amp;quot;resource&amp;quot;:&amp;quot;device&amp;quot;,&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;device&amp;quot;: [&lt;br /&gt;
      { &lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        &amp;quot;name&amp;quot; : null&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will provide a response of the name of the device whose ID is &amp;quot;1234&amp;quot; for the account with ID 987654 using the Account ID of 987654 and Session ID of &amp;quot;0123-4567-8901&amp;quot;:&lt;br /&gt;
 '''Response JSON:'''&lt;br /&gt;
  ...&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;name&amp;quot; : &amp;quot;My Device&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
The URI method is intended to allow quick access to single pieces of data, but using the JSON method is more complete and allows retrieval of multiple pieces of data at once.&lt;br /&gt;
 &lt;br /&gt;
===Additional Examples===&lt;br /&gt;
====POST====&lt;br /&gt;
 '''Request Description:'''&lt;br /&gt;
  Create a new alarm schedule for the device with ID 1234 and its zone with ID 112233.&lt;br /&gt;
 &lt;br /&gt;
 '''URI Mode Request URI:'''&lt;br /&gt;
  '''POST''' ''https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{1234}/zone/{112233}/alarmschedule&lt;br /&gt;
&lt;br /&gt;
====GET====&lt;br /&gt;
 '''Request Description:'''&lt;br /&gt;
  Retrieve the name of the zone with ID 112233 of the device with ID 1234.&lt;br /&gt;
 &lt;br /&gt;
 '''URI Mode Request URI:'''&lt;br /&gt;
  '''GET''' ''https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{1234}/zone/{112233}/name&lt;br /&gt;
&lt;br /&gt;
====PUT====&lt;br /&gt;
 '''Request Description:'''&lt;br /&gt;
  Change the name of the User with the ID 6778 to &amp;quot;John Doe&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
 '''URI Mode Request URI:'''&lt;br /&gt;
  '''PUT''' ''https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{6778}/name/{John&amp;amp;nbsp;Doe}''&lt;br /&gt;
&lt;br /&gt;
====DELETE====&lt;br /&gt;
 '''Request Description:'''&lt;br /&gt;
  Delete the User with the ID 6778.&lt;br /&gt;
 &lt;br /&gt;
 '''URI Mode Request URI:'''&lt;br /&gt;
  '''DELETE''' ''https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/user/{6778}''&lt;br /&gt;
&lt;br /&gt;
==JSON Format==&lt;br /&gt;
===Requests===&lt;br /&gt;
All requests using the JSON mode will only use the POST method with a &amp;quot;request_type&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
All requests include one outer JSON object unless no request data is specified. Requests are made according the specific requirements of the resource being accessed. With the exception of the login page, a session ID must be included with all API requests. When using the [[#URI Syntax]] JSON mode, the following will be included:&lt;br /&gt;
  {                                          &amp;amp;#8592; All values must be within this outer JSON object.&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;,                   &amp;amp;#8592; One of &amp;quot;read&amp;quot;, &amp;quot;update&amp;quot;, &amp;quot;create&amp;quot;, &amp;quot;delete&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
A resource is accessed as either a JSON array of objects or a JSON object. A resource's properties are listed in comma separated values in the JSON object for that resource. All JSON value types may be used. Resources within resources are accessed as JSON objects within objects (or Array of objects). The JSON type of a property is specified by the requirements for each resource. &lt;br /&gt;
&lt;br /&gt;
When performing a '''Read''' on a resource, all properties will be returned if '''only''' the resource ID is specified. If one or more non-identifying properties are specified, only those properties will be returned. The data values for those ''specific'' properties should be 'null'. &lt;br /&gt;
&lt;br /&gt;
When performing a '''Delete''', specified non-identifying properties to be deleted should have their data values set to 'null', just like in a '''Read'''.&lt;br /&gt;
&lt;br /&gt;
When performing a '''Update''' or '''Create''', specified non-identifying properties to be set must have their data values set to valid types, '''not''' 'null'.&lt;br /&gt;
&lt;br /&gt;
When performing a '''Update''', the identifying properties must be specified. You can't update a resource without identifying it.&lt;br /&gt;
&lt;br /&gt;
When performing a '''Create''', the identifying properties of the resource being created should not be specified at all. Only existing resources can have identifiers already.&lt;br /&gt;
&lt;br /&gt;
NOTE: Specifying properties that are not listed in the requirements has no effect.&lt;br /&gt;
&lt;br /&gt;
 '''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' ''https://rest.sensaphone.net/api/v1/device''&lt;br /&gt;
 &lt;br /&gt;
 '''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot;:&amp;quot;read&amp;quot;,&lt;br /&gt;
    &amp;quot;resource&amp;quot;:&amp;quot;device&amp;quot;,&lt;br /&gt;
    &amp;quot;acctid&amp;quot;:987654,&lt;br /&gt;
    &amp;quot;session&amp;quot;: &amp;quot;0123-4567-8901&amp;quot;,             &amp;amp;#8592; All values are within at least the outer JSON object.&lt;br /&gt;
    &amp;quot;device&amp;quot;:[                               &amp;amp;#8592; Devices are accessed as a JSON array of objects.&lt;br /&gt;
      {                                         &lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,                   &amp;amp;#8592; The &amp;quot;device_id&amp;quot; property is provided to identify the device accessed.&lt;br /&gt;
        &amp;quot;name&amp;quot;: null,                        &amp;amp;#8592; The &amp;quot;name&amp;quot; property is ''specifically'' requested, so it is set to null. The whole device will '''not''' be returned.&lt;br /&gt;
        &amp;quot;zones&amp;quot;:[                            &amp;amp;#8592; Zones are accessed as a JSON array of objects.&lt;br /&gt;
          {                                     &lt;br /&gt;
            &amp;quot;zone_id&amp;quot;: 112233                &amp;amp;#8592; By only specifying the &amp;quot;zone_id&amp;quot; and no other properties, '''all''' zone data is requested.&lt;br /&gt;
          }                                     &lt;br /&gt;
        ],                                      &lt;br /&gt;
        &amp;quot;this fake property&amp;quot;: &amp;quot;is ignored&amp;quot;   &amp;amp;#8592; Invalid properties are ignored.&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The above request is equivalent to the following requests, but must be done in two steps because two pieces of data were requested (The device's name and the device's zone with the ID 112233). No request JSON is required in this case.&lt;br /&gt;
 '''URI Mode Request URIs:'''&lt;br /&gt;
  '''GET''' ''https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{1234}/name''&lt;br /&gt;
  '''GET''' ''https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/{1234}/zone/{112233}''&lt;br /&gt;
&lt;br /&gt;
===Responses===&lt;br /&gt;
Responses conform to the following format and include error reporting.&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,          &amp;amp;#8592; Overall result of the request.&lt;br /&gt;
    &amp;quot;code&amp;quot;: 0,                &amp;amp;#8592; Status code for overall result.&lt;br /&gt;
    &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;,           &amp;amp;#8592; String describing the overall result.&lt;br /&gt;
    &lt;br /&gt;
    &amp;quot;properties&amp;quot;:             &amp;amp;#8592; Optionally used for '''Create''', '''Update''', and '''Delete'''&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;''PROPERTY''&amp;quot;:{            &amp;amp;#8592; Property names and layout will match the request.&lt;br /&gt;
       &amp;quot;success&amp;quot;: true,&lt;br /&gt;
       &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;,&lt;br /&gt;
       &amp;quot;code&amp;quot;:0&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;''PROPERTY''&amp;quot;:{&lt;br /&gt;
       &amp;quot;success&amp;quot;: false,&lt;br /&gt;
       &amp;quot;message&amp;quot;:&amp;quot;Failed&amp;quot;,&lt;br /&gt;
       &amp;quot;code&amp;quot;:123&lt;br /&gt;
      },&lt;br /&gt;
      ...&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;response&amp;quot;:                 &amp;amp;#8592; Any data that may have changed ('''Create'''/'''Update'''/'''Delete''') or been requested ('''Read''').&lt;br /&gt;
  {&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The success, code, and message for the overall result will always be included. The data in the &amp;quot;response&amp;quot; JSON object will depend on the specification of the resource accessed in the original request, but will generally follow the same layout and format of the request, although the specific properties returned will vary.&lt;br /&gt;
&lt;br /&gt;
 '''JSON Mode Request URI:'''&lt;br /&gt;
  '''POST''' ''https://rest.sensaphone.net/api/v1/device''&lt;br /&gt;
 &lt;br /&gt;
 '''Request JSON:'''&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;request_type&amp;quot;:&amp;quot;update&amp;quot;,&lt;br /&gt;
    &amp;quot;resource&amp;quot;:&amp;quot;device&amp;quot;,&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;device&amp;quot;:[&lt;br /&gt;
      {                                         &lt;br /&gt;
        &amp;quot;device_id&amp;quot;: 1234,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;My Device&amp;quot;,        &amp;amp;#8592; The device's &amp;quot;name&amp;quot; property is being changed.&lt;br /&gt;
        &amp;quot;zone&amp;quot;:[                            &lt;br /&gt;
          {                                     &lt;br /&gt;
            &amp;quot;zone_id&amp;quot;: 112233,&lt;br /&gt;
            &amp;quot;name&amp;quot;: 1234            &amp;amp;#8592; The device's zone's &amp;quot;name&amp;quot; property is being changed.&lt;br /&gt;
          }                                     &lt;br /&gt;
        ]&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,              &amp;amp;#8592; The overall request was processed correctly, even if some properties had errors.&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;properties&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,        &amp;amp;#8592; Identifying properties must be specified.&lt;br /&gt;
           &amp;quot;name&amp;quot;: {                 &amp;amp;#8592; Property &amp;quot;name&amp;quot; was changed.&lt;br /&gt;
             &amp;quot;success&amp;quot;: true,&lt;br /&gt;
             &amp;quot;message&amp;quot;:&amp;quot;OK&amp;quot;,&lt;br /&gt;
             &amp;quot;code&amp;quot;:0&lt;br /&gt;
           },&lt;br /&gt;
           &amp;quot;zone&amp;quot;:[                            &lt;br /&gt;
             {                                     &lt;br /&gt;
               &amp;quot;zone_id&amp;quot;: 112233,    &amp;amp;#8592; Identifying properties must be specified.&lt;br /&gt;
               &amp;quot;name&amp;quot;: {             &amp;amp;#8592; The device's zone's &amp;quot;name&amp;quot; was changed.&lt;br /&gt;
                 &amp;quot;success&amp;quot;: false,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;A string type is required&amp;quot;,&lt;br /&gt;
                 &amp;quot;code&amp;quot;:123&lt;br /&gt;
               }&lt;br /&gt;
             }                                     &lt;br /&gt;
           ]&lt;br /&gt;
         }&lt;br /&gt;
       ]&lt;br /&gt;
     },&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,        &amp;amp;#8592; Identifying properties must be specified.&lt;br /&gt;
         &amp;quot;name&amp;quot;: &amp;quot;My Device&amp;quot;,      &amp;amp;#8592; The new value for the device's &amp;quot;name&amp;quot;.&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above request is equivalent to the following requests, but must be done in two steps because two pieces of data were updated (The device's name and the device's zone's name). No request JSON is required in this case.&lt;br /&gt;
 '''URI Mode Request URIs:'''&lt;br /&gt;
  '''PUT''' ''https://rest.sensaphone.net/api/v1/{987654}/{0123-4567-8901}/device/{1234}/name/{My&amp;amp;nbsp;Device}''&lt;br /&gt;
  '''PUT''' ''https://rest.sensaphone.net/api/v1/{987654}/{0123-4567-8901}/device/{1234}/zone/{112233}/name/{1234}''&lt;br /&gt;
&lt;br /&gt;
The following are some of the status codes used for overall status.&lt;br /&gt;
::{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Code''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| 0          | Success&lt;br /&gt;
}}{{TableRowN| 1          | Failed: No Session ID provided&lt;br /&gt;
}}{{TableRowN| 2          | Failed: Session ID has expired&lt;br /&gt;
}}{{TableRowN| 3          | Failed: Invalid request URI.&lt;br /&gt;
}}{{TableRowN| 4          | Failed: Invalid request JSON.&lt;br /&gt;
}}{{TableRowN| 5          | Failed: Invalid username provided.&lt;br /&gt;
}}{{TableRowN| 6          | Failed: Invalid password provided.&lt;br /&gt;
}}{{TableRowN| 7          | Failed: User is not authorized.&lt;br /&gt;
}}{{TableRowN| 8          | Failed: Service unavailable. Try again later.&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
There will be three versions of the API. We will refer to them as V1, V2, and V3. The only difference between the versions is in the format of '''responses'''. Requests to the Sensaphone.net API are identical in all cases.&lt;br /&gt;
&lt;br /&gt;
===V1===&lt;br /&gt;
V1 will primarily be used to give responses that will be directly displayed in a client's application. &lt;br /&gt;
&lt;br /&gt;
'''Example V1 Response for &amp;quot;https://rest.sensaphone.net/api/v1/{987654}/{0123-4567-8901}/device/{1234}/name&amp;quot; :'''&lt;br /&gt;
&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;name&amp;quot; : &amp;quot;My Device&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
===V2===&lt;br /&gt;
V2 should be used when responses with the addition of metadata are needed.&lt;br /&gt;
&lt;br /&gt;
'''Example V2 Response for &amp;quot;https://rest.sensaphone.net/api/v2/{987654}/{0123-4567-8901}/device/{1234}/name&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;name&amp;quot;: &lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;is_null&amp;quot; : false,&lt;br /&gt;
          &amp;quot;is_empty&amp;quot;: false,&lt;br /&gt;
          &amp;quot;value&amp;quot;   : &amp;quot;Device 1&amp;quot;,&lt;br /&gt;
          &amp;quot;type&amp;quot;    : &amp;quot;string&amp;quot;,&lt;br /&gt;
          &amp;quot;is_pending&amp;quot;: false,&lt;br /&gt;
          &amp;quot;is_ranged&amp;quot; : true,&lt;br /&gt;
          &amp;quot;ranged&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
              &amp;quot;null&amp;quot;: false,&lt;br /&gt;
              &amp;quot;min&amp;quot; : 0,&lt;br /&gt;
              &amp;quot;max&amp;quot; : 128&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
::{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN| '''Property'''          | '''Status''' | '''Type''' | '''Description'''&lt;br /&gt;
}}{{TableRowN| is_null                 | Required     | Boolean    | States if the corresponding value is NULL. If so, no additional keys are given.&lt;br /&gt;
}}{{TableRowN| is_empty                | Required*    | Boolean    | States if the corresponding value is empty. If so, no additional keys are given.&lt;br /&gt;
}}{{TableRowN| value                   | Required**   | String     | Description of the corresponding value&lt;br /&gt;
}}{{TableRowN| type                    | Required**   | String     | Type of value&lt;br /&gt;
}}{{TableRowN| is_pending              | Optional     | Boolean    | States if the value is in process of being updated&lt;br /&gt;
}}{{TableRowN| is_ranged               | Optional     | Boolean    | States if there is a set of ranges for the value&lt;br /&gt;
}}{{TableRowN| ranged                  | Optional     | Array      | Array of ranges&lt;br /&gt;
}}{{TableRowN| &amp;amp;#8594; null            | Required     | Boolean    | States if the value can be null.&lt;br /&gt;
}}{{TableRowN| &amp;amp;#8594; min             | Required***  | Mixed      | Min of range&lt;br /&gt;
}}{{TableRowN| &amp;amp;#8594; max             | Optional     | Mixed      | Max of range&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
::&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Only required if &amp;quot;is_null&amp;quot; is false.&lt;br /&gt;
::&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; Only required if &amp;quot;is_empty&amp;quot; is false.&lt;br /&gt;
::&amp;lt;nowiki&amp;gt;***&amp;lt;/nowiki&amp;gt; Only required if &amp;quot;null&amp;quot; is false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===V3===&lt;br /&gt;
V3 should be used when only the pending meta data is needed&lt;br /&gt;
&lt;br /&gt;
'''Example V3 Response for &amp;quot;https://rest.sensaphone.net/api/v3/{987654}/{0123-4567-8901}/device/{1234}/name&amp;quot; :'''&lt;br /&gt;
&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;name&amp;quot; : &lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;is_pending&amp;quot;: true&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
The following resources are accessible through the REST API. They may be accessible from different URI contexts. See the individual resource pages for more information.&lt;br /&gt;
&lt;br /&gt;
'''All REST requests should be made against https://rest.sensaphone.net'''&lt;br /&gt;
&lt;br /&gt;
::{{TableStart|border_size=1&lt;br /&gt;
}}{{TableRowN|'''Page'''                                   |'''GET'''|'''PUT'''|'''POST'''|'''DELETE'''&lt;br /&gt;
}}{{TableRowN|&amp;amp;nbsp;                                       |(Read)|(Write)|(Create)|(Delete)&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/login|login]]                 |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/dashboard|dashboard]]         |Y|N|N|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/history|history]]             |Y|N|N|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/account|account]]               |Y|Y|N|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/feature|feature]]               |Y|Y|N|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/device|device]]               |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/devicegroup|devicegroup]]     |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/address|address]]             |Y|Y|N|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/coordinates|coordinates]]     |Y|Y|N|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/zone|zone]]                   |Y|Y|Y|N&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/calllist|calllist]]           |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/alarmschedule|alarmschedule]] |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/schedule|schedule]]           |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/timerange|timerange]]         |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/contactgroup|contactgroup]]   |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/user|user]]                   |Y|Y|Y|Y&lt;br /&gt;
}}{{TableRowN|[[{{PAGENAME}}/contact|contact]]             |Y|Y|Y|Y&lt;br /&gt;
}}{{TableEnd}}&lt;br /&gt;
&lt;br /&gt;
===List===&lt;br /&gt;
The following is a list of all possible REST resources, excluding any possible '''&amp;lt;nowiki&amp;gt;[/Property/[/Value]]&amp;lt;/nowiki&amp;gt;''' suffix. Properties ('''/Property''') of a resource are shown where it is a JSON object or array of objects (e.g. &amp;quot;alarmschedule&amp;quot;). For a full list of properties and values associated with each resource, see the page for that resource.&lt;br /&gt;
*/api/v1/login/{USERNAME}/{PASSWORD}&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/account&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/account/feature&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/calllist&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/contact&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/contact/schedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/contact/schedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/contactgroup&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/dashboard&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/default_schedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/default_schedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/default_schedule/calllist&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/device_schedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/device_schedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/device_schedule/calllist&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/feature&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/location&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/location/address&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/location/coordinates&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/zone&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/zone/alarm_zone/alarmschedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/zone/alarm_zone/alarmschedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/zone/alarm_zone/alarmschedule/calllist&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/zone/schedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/device/zone/schedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/devicegroup&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/history&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/login&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user/alarm_user/contact&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user/alarm_user/contact/schedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user/alarm_user/contact/schedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user/alarm_user/schedule&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user/alarm_user/schedule/timerange&lt;br /&gt;
*/api/v1/{ACCTID}/{SESSIONID}/user/site_user/address&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
Visit our [[FAQ|Frequently Asked Questions]] page.&lt;br /&gt;
&lt;br /&gt;
==Help==&lt;br /&gt;
If you need help using our API and your question isn't answered in the wiki, please feel free to email us at: [mailto:api@sensaphone.net api@sensaphone.net]&lt;/div&gt;</summary>
		<author><name>Tim</name></author>	</entry>

	<entry>
		<id>https://wiki.sensaphone.net/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.sensaphone.net/index.php/Main_Page"/>
				<updated>2015-03-24T20:08:00Z</updated>
		
		<summary type="html">&lt;p&gt;Mwood: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To access your devices and accounts on the Sensaphone.net website please go to:&lt;br /&gt;
  [https://www.sensaphone.net www.sensaphone.net]&lt;br /&gt;
&lt;br /&gt;
REST API Frequently Asked Questions:&lt;br /&gt;
  [[FAQ|FAQ]]&lt;br /&gt;
&lt;br /&gt;
Access the Sensaphone.net REST API documentation:&lt;br /&gt;
  [[Sensaphone.net API|Documentation]]&lt;/div&gt;</summary>
		<author><name>MediaWiki default</name></author>	</entry>

	</feed>