Sorry, you need to enable JavaScript to visit this website.

Image Management

Used to retrieve and manipulate image resource files found on the camera's SD card.

Table of contents

GET /api/<versionNumber>/images[?sort=<sort_criteria>][&order=<order>][&offset=<offset>][&count=<count>][&filter=<types>]

Format:

http://<baseURL>/api/<versionNumber>/images[?sort=<sort>][&order=<order>][&offset=<offset>][&count=<count>][&filter=<filter>]

Example:

http://192.168.1.101/api/2/images

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

Parameter 'offset' is 0-based so offset=0 will address the first file from the resource.

'offset' and 'count' are used (based on sort criteria set by 'sort' parameter and 'order') to retrieve image information for 'count' files, first starting at specified 'offset' from beginning of a sorted list of files. If 'offset' is bigger than total count of files, error code will be returned. However, if 'offset' falls into range but 'count' specifies more items than available, this method will return as many items as possible and won't return error status code.

All query parameters are optional. Following table depicts possible options and default value for each of them.

Parameter Possible values Description Req'd? Type
[sort] filename (default) Results are sorted by filename (default, in case other parameters are added in the future). No string
[order] asc (default)
desc
Results are returned in ascending (default, if parameter is omitted) or descending order if specified differently. No string
[offset] 0-based integer offset Defaults to 0 if omitted, otherwise represents 0-based offset targeting the first item from the result list that should be returned in response. No integer
[count] integer number of items requested Defaults to 1 if omitted, otherwise represents maximum number of items that should be returned in response. If 'count' is bigger than the remaining number of result items, only remaining items will be returned.
If count is set to 0, response containing only total number of items, without any actual item will be returned.
No integer
[filter] comma-separated list of strings representing image types containing: "single",
"continuous" and/or "burst" (take a look at GET /capabilities/recording for images)
This filter specifies which image types should be returned. If it's not specified, all image types will be considered. It's a comma-separated list of strings which can contain one of several supported image types
(as enumerated in GET /capabilities/recording method).
No array of strings

Description:

Returns array of JSON objects containing, for all image files passing the query parameters filter specified in the text above. Each JSON object will contain following information:

Parameter Description Req'd? Type
path Path to image in format: '/'+<DCIM_folder>+'/'+<filename>. Yes string, max. 255 characters
id Unique identified of the image file. Yes string, max. 49 characters
created ISO 8601 UTC format of file's creation time. Yes string
size_bytes Image file size in bytes. Yes integer
mode Mode used to record image (look at Capabilities section). Yes string
resolution Captured image resolution. Yes string
aspect_ratio Aspect ratio of captured image. Yes string
[lat_deg] Latitude part of coordinate where image was taken. If it doesn't exist (no GPS fix at the time of shot), this attribute will be omitted from the response. No float
[lon_deg] Longitude part of coordinate where image was taken. If it doesn't exist (no GPS fix at the time of shot), this attribute will be omitted from the response. No float
is_valid Flags is recorded file is valid (true) or corrupt (false).
If 'is_valid' flag is set to 'false', values of all other required attributes should not be taken into account since they might (and probably will) contain faulty data.
Yes boolean

NOTE: If 'is_valid' flag is set to 'false', values of all other required attributes should not be taken into account since they might (and probably will) contain faulty data.

Response codes:

Code Description
200 OK
400 Bad Request (sort, order, offset and/or count parameters are out of range or missing)
500 Server Error (request can't be processed)

Example request 1:

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/images

and example response:

{
    "total":2,
    "items": [
                {
                    "path":"/100TTCAM/IMG_0001.JPG",
                    "id":"7666a33a-6275-4549-836b-4f8d00281233-100-000-002-0001",
                    "created":"2012-03-05T18:34:14Z",
                    "size_bytes":2154637,
                    "mode":"single",
                    "resolution":"16MP",
                    "aspect_ratio":"4/3",
                    "lat_deg":44.715513,
                    "lon_deg":20.632324,
                    "is_valid":true
                }
            ]
}

Example request 2:

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/images?sortby=filename&amp;order=asc&amp;offset=1&amp;count=2

and example response:

{
"total":2,
"items": [
                 { 
                     "path":"/100TTCAM/IMG_0001.JPG", 
                     "id":"7666a33a-6275-4549-836b-4f8d00281233-100-000-002-0001", 
                     "created":"2012-03-05T18:34:14Z", 
                     "size_bytes":2154637, 
                     "mode":"single", 
                     "resolution":"16MP", 
                     "aspect_ratio":"4/3", 
                     "lat_deg":44.715513732021364, 
                     "lon_deg":20.63232421875, 
                     "is_valid":true 
                  }, 
                  { 
                     "path":"/100TTCAM/IMG_0002.JPG", 
                     "id":"9376a883-6345-2349-966b-2a8d00281980-100-000-002-0002", 
                     "created":"2012-03-04T12:05:20Z", 
                     "size_bytes":2154637, 
                     "mode":"burst", 
                     "resolution":"16MP", 
                     "aspect_ratio":"4/3", 
                     "lat_deg":44.715637, 
                     "lon_deg":20.631237, 
                     "is_valid":true 
                  } 
             ]
}

Example request 3:

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/images?sortby=filename&amp;order=asc&amp;offset=1&amp;count=2&amp;filter=burst

and example response:

{ 
     "total":2, 
     "items": [ 
                 { 
                     "path":"/100TTCAM/IMG_0001.JPG", 
                     "id":"7666a33a-6275-4549-836b-4f8d00281233-100-000-002-0001", 
                     "created":"2012-03-05T18:34:14Z", 
                     "size_bytes":2154637, 
                     "mode":"burst", 
                     "resolution":"16MP", 
                     "aspect_ratio":"4/3", 
                     "lat_deg":44.715513732021364, 
                     "lon_deg":20.63232421875, 
                     "is_valid":true 
                  }, 
                  { 
                     "path":"/100TTCAM/IMG_0002.JPG", 
                     "id":"9376a883-6345-2349-966b-2a8d00281980-100-000-002-0002", 
                     "created":"2012-03-04T12:05:20Z", 
                     "size_bytes":2154637, 
                     "mode":"burst", 
                     "resolution":"16MP", 
                     "aspect_ratio":"4/3", 
                     "lat_deg":44.715637, 
                     "lon_deg":20.631237, 
                     "is_valid":true 
                  } 
             ] 
} 

 

GET /api/<versionNumber>/images/<image_id>/thumb

Format:

http://<baseURL>/api/<versionNumber>/images/<image_id>/thumb

Example:

http://192.168.1.101/api/2/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001/thumb

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
image_id Image id. Yes

Description:

Returns thumbnail (in JPEG format) of requested image file identified by it's id. Thumbnail will be delivered in 480p resolution (848x480 for 16/9 aspect ratio images and 640x480 for 4x3).

Content-type field of the response's HTTP header will be set to image/jpeg.

Response codes:

 

Code Description
200 OK
404 Not Found (image file with requested id not found)
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>/1/api/2/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001/thumb

causes JPEG picture representing thumbnail taken 4.5s after beginning of a video to be sent as a response.

Content-type: image/jpeg

GET /api/<versionNumber>/images/<image_id>

Format:

http://<baseURL>/api/<versionNumber>/images/<image_id>

Example:

http://192.168.1.101/api/2/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001

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
image_id Image id. Yes

Description:

Returns information about image file stored on camera's SD card and specified by it's id. Response is in JSON format, look at GET /api/<versionNumber>/images for format details and description of returned attributes.

Response codes:

 

Code Description
200 OK
404 Not Found (image file with requested id not found)
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/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001

and response:

{
    "path":"/100TTCAM/IMG_0001.JPG",
    "id":"7666a33a-6275-4549-836b-4f8d00281233-100-000-002-0001",
    "created":"2012-03-05T18:34:14Z",
    "size_bytes":2154637,
    "mode":"normal",
    "resolution":"16MP",
    "aspect_ratio":"4/3",
    "lat_deg":44.715513,
    "lon_deg":20.632324,
    "is_valid":true
}

 

GET /api/<versionNumber>/images/<image_id>/contents

Format:

http://<baseURL>/api/<versionNumber>/images/<image_id>/contents

Example:

http://192.168.1.101/api/2/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001/contents

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
image_id Image id. Yes

Description:

Downloads image file specified by it's id from camera's SD card.

Request should set Accept field in the HTTP header to image/jpeg. Consequently, response will set Content type in the header as image/jpeg.

Response codes:

 

Code Description
200 OK
404 Not Found (image file with requested id not found)
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/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001/contents

Content type: image/jpeg

and example response:

  • will set Content-type field in response HTTP header to image/jpeg
  • start sending the photo file

DELETE /api/<versionNumber>/images/<image_id>

Format:

http://<baseURL>/api/<versionNumber>/images/<image_id>

Example:

http://192.168.1.101/api/2/images/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001

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
image_id Image id. Yes

Description:

Deletes image file specified by it's id from camera's SD card.

Response codes:

 

Code Description
200 OK
404 Not Found (image file with requested id not found)
500 Server Error (request can't be processed)

Example request:

DELETE 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/photos/1236a33a-5375-4549-836b-d4ed00289586-100-000-002-0001

You are here