Status
Used to retrieve camera status.
GET /api/<versionNumber>/status
Format:
http://<baseURL>/api/<versionNumber>/status
Example:
http://192.168.1.101/api/2/status
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:
Retrieves current camera status. This is a convenience API method to retrieve multiple statuses at once. The URI is read-only and only supports GET. Changing some of the statuses, such as "recording_active" or "preview_active" will need to be done through their own record and preview URIs.
Response codes:
Code | Description |
200 | OK |
500 | Server Error (request can't be processed) |
Response:
Returns JSON object containing current status of the camera.
Parameter | Description | Type |
recording_active | Reflects camera recording status (true - recording, false - not recording). | boolean |
recording_secs | Recording time in seconds. | integer |
battery_level_pct | Percentage of battery remaining charge, ranging from 0-100. | integer |
battery_charging | Reflects battery charging status (true - charging, false - not charging). | boolean |
gnss_fix | GNSS fix status (true - fix obtained, false - no fix). | boolean |
gnss_strength_pct | Percentage of GNSS signal strength, ranging from 0-100. | integer |
heart_rate_sensor_connected | True if heart rate sensor is connected, false otherwise. | boolean |
cadence_sensor_connected | True if cadence sensor is connected, false otherwise. | boolean |
preview_active | Flags camera previewing status (true - preview active, false - preview not active). | boolean |
viewfinder_active | Reflects viewfinder status (true - viewfinder active, false - viewfinder not active). | boolean |
viewfinder_streaming_port | Port used to stream viewfinder. | integer |
backchannel_port | Port used to send asynchronous notifications from camera to the client. | integer |
memory_free_bytes | Remaining free space on SD card in bytes. | integer |
remaining_time_secs | Remaining video recording time (in seconds), based on the currently selected (or last remembered) video mode and it's parameters. | integer |
remaining_photos | Remaining number of photos based on currently selected (or last remembered) image mode and it's parameters. | integer |
transcoding_active | True if transcoding is in progress, false otherwise. | boolean |
transcoding_progress | Current progress of transcoding in percentage. Zero if transcoding is not active. | integer |
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/status
and response:
{ "recording_active":true, "recoding_secs":124, "battery_level_pct":75, "battery_charging":false, "gnss_fix":true, "gnss_strength_pct":75, "heart_rate_sensor_connected":true, "cadence_sensor_connected":true, "preview_active":true, "viewfinder_active":true, "viewfinder_streaming_port":4001, "backchannel_port":4003, "memory_free_bytes":123456, "remaining_time_secs":3600, "remaining_photos":254, "transcoding_active":false, "transcoding_progress":0 }