Datetime
Used to read/set time on the camera by remote client. Time should be always GMT and format used should be ISO8601.
Table of contents
GET /api/<versionNumber>/datetime
Format:
http://<baseURL>/api/<versionNumber>/datetime
Example:
http://192.168.1.101/api/2/datetime
Parameters:
Parameter | Description | Req'd? | Type / Values |
---|---|---|---|
baseURL | Fixed address, Bandit acts like an access point with this addres. TomTom Bandit's WiFi has to be turned on. | Yes | 192.168.1.101 |
versionNumber | Service version number. The current value is 2. | Yes | 2 |
Description:
Returns camera's current date and time in ISO8601 format. Response consists of JSON object containing following attributes:
Parameter | Description | Type |
datetime | Date and time in ISO8601 format (see Datetime format). | string |
Response codes:
Code | Description |
200 | OK |
400 | Bad Request (wrong or unrecognised parameters) |
500 | Server Error (request can't be processed) |
Example request:
GET http://<span class="nolink"><span class="nolink"><span class="nolink"><span class="nolink"><span class="nolink">192.168.1.101</span></span></span></span></span>/api/2/datetime
and response:
{ "datetime":"2015-03-25T22:58:00Z" }
POST /api/<versionNumber>/datetime
Format:
http://<baseURL>/api/<versionNumber>/datetime
Example:
http://192.168.1.101/api/2/datetime
Parameters:
Parameter | Description | Req'd? | Type / Values |
---|---|---|---|
baseURL | Fixed address, Bandit acts like an access point with this addres. TomTom Bandit's WiFi has to be turned on. | Yes | 192.168.1.101 |
versionNumber | Service version number. The current value is 2. | Yes | 2 |
Description:
Sets camera's current date and time. Parameters will be passed through request body. Request object shall be in JSON format with date and time posted in ISO8601 format. Content type should be 'application/json' and allowed attribute is:
Parameter | Description | Req'd? | Type |
datetime | Datetime in ISO8601 format. | Yes | string |
Response codes:
Code | Description |
200 | OK |
400 | Bad Request (wrong or unrecognised parameters) |
500 | Server Error (request can't be processed) |
Example request:
POST http://<span class="nolink"><span class="nolink"><span class="nolink"><span class="nolink"><span class="nolink">192.168.1.101</span></span></span></span></span>/api/2/datetime
Content-type: application/json
Object in request body:
{ "datetime":"2015-03-25T22:58:00Z" }