Retrieve configuration for a device​
GET
/devices/{id}/config
Authorizations​
ApiKeyAuth
API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.
Type
API Key (header: Authorization)
Example
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Parameters​
Path Parameters
id*
device id
Type
Requirednumber
Format
"integer"Query Parameters
refresh
unused
Type
boolean
GET
/devices/{id}/config
Request example
Responses​
Body (JSON)
application/json
JSON"currentFW": "string","otaFW": "string","interval": 300,"sleepInterval": 43200,"packing": 1,"movementSensitivity": 1,"debounce": 3,"movementSensitivity2": 2,"behavior": 0,"modeControl": 0,"modeControl2": 0,"gpsTimeout": 90,"transmitTimeout": 0,"gpsStabilize": 10,"gpsCheckInterval": 120,"stopTimeout": 90,"tolerancePercentage": 10,"reasonsToWake": [{}],"modified": "string","forceFw": false,"updateAvailibility": 0,"receivedAt": "string","reset": 0,"flashTryCount": 0,"homeWifiNetwork": "string","wakeAction": "normal","alertAction": "nothing","timed": [{}],"command": 0,"id": 0,"deviceId": 0,"safeZoneId": 0
{
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
}
Try this endpoint
Playground​
Authorization
Variables
Key
Value
OpenAPI definition ​
References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).
View endpoint OpenAPI definition
yaml
openapi: 3.1.0
info:
version: 1.1.0
title: TrackingAPI
description: V1 API for retrieving tracking data and changing settings on Lightbug devices
servers:
- url: https://api.lightbug.cloud/api
externalDocs: {}
security:
- ApiKeyAuth: []
tags: []
paths:
/devices/{id}/config:
get:
tags:
- device-config
summary: Retrieve configuration for a device
parameters:
- name: id
in: path
description: device id
required: true
schema:
type: number
format: integer
- name: refresh
description: unused
in: query
required: false
schema:
type: boolean
responses:'200':
yaml
description: Body (JSON)
content:
application/json:
schema:
properties:
currentFW:
description: Current Firmware version
type: string
otaFW:
description: |-
Pending Firmware version. If non null, the unit will be told to upgrade to
this version when it next transmits in sleep mode.
type: string
interval:
default: 300
description: The wake mode interval in seconds. The unit will connect to the server this often when awake.
type: number
format: ''
sleepInterval:
default: 43200
description: Sleep mode interval in seconds. The unit will try to connect this often to the server when asleep
type: number
format: ''
packing:
default: 1
description: |-
The number of GPS points to send with each transmission. A packing setting of 3 with an 'interval'
of 60s will result in points recorded approximately every 20s, but they will only be sent together.
This increases the time you have to wait for locations to come through to the server but improves battery life
type: number
format: ''
movementSensitivity:
default: 1
description: Deprecated. See debounce.
type: number
format: ''
debounce:
default: 3
description: |-
Movement sensitivity on a scale of 1 to 10, with 1 being the most sensitive. It is correlated to the
number of consecutive milliseconds the acceleration needs to exceed the movementSensitivity threshold
type: number
format: ''
movementSensitivity2:
default: 2
description: |-
A secondary debounce value. Typically this value is lower or equal to debounce, representing increased
sensitivity to movement once the device is already moving.
type: number
format: ''
behavior:
default: 0
description: |-
Char Bitfield with various flags. Advanced use only.
DisableBluetooth:32 |
Encrypt:128 |
GsmOnWhenAwake:1 |
GsmOnWhenAsleep:2 |
GpsOnWhenAwake:4 |
DisableWifiAccuracyAssist:8 |
RepeatSleep:16 |
DisableWifi:64
type: number
format: ''
modeControl:
default: 0
description: |-
Char Bitfield with various flags. Advanced use only.
StartStopOnly:1 |
LockAwakeOnAlert:2 |
SendSleepLocAfterBtDisconnect:4 |
type: number
format: ''
modeControl2:
default: 0
description: |-
Char Bitfield with various flags. Advanced use only. FW >= 69.
SendStopImmediately:1 |
StopTimeoutIsInMinutes:2 |
HarshPowerBudget:4 |
Lock2G: 8
type: number
format: ''
gpsTimeout:
default: 90
description: How long to let the GPS searches for a lock in seconds before giving up. Max 255s.
type: number
format: ''
transmitTimeout:
default: 0
description: "When the unit first wakes up from sleep, how long to wait before trying to transmit in multiples of 30 seconds. 0 = instant, 1 = 30s, 2 = 60s...\n\r\nUseful to avoid detection or draining battery inside shielded buildings."
type: number
format: ''
gpsStabilize:
default: 10
description: How long to let the GPS stabilise in seconds once a lock is achieved before sending the position. Higher values may increase accuracy.
type: number
format: ''
gpsCheckInterval:
default: 120
description: If a safe-zone is used, how often to check the wifi & gps to see if its still inside it (only applies when motion is detected)
type: number
format: ''
stopTimeout:
default: 90
description: The total amount of time in seconds the unit has to be stationary for before deeming the journey over and switching to sleep mode
type: number
format: ''
tolerancePercentage:
default: 10
description: Power budget in mAh per location update. Default 10, do not set lower than 5.
type: number
format: ''
reasonsToWake:
default:
- bluetooth: false
move: true
geofence: false
type: array
items:
type: object
modified:
description: Set to any non null date to indicate the configuration should be pushed to the device when it next connects
type: string
format: date-time
forceFw:
default: false
description: "Internal use.\n\r\nUsed with otaFW. Set to true to force the unit to upgrade on next connection (rather than waiting\nfor a sleep connection"
type: boolean
updateAvailibility:
default: 0
description: Internal use. Set to true to indicate an update is available
type: number
format: ''
receivedAt:
description: Indicates the last time the settings were sent to the device
type: string
format: date-time
reset:
description: "Non NULL values cause unit to restart on next connection\n\r\n0 = Normal reboot\n\r\n1 = Clear settings cache and restart\n\r\n2 = Clear cache and bluetooth connection data, then restart"
type: number
format: ''
flashTryCount:
default: 0
description: Internal use. Set to 0 when changing otaFW
type: number
format: ''
homeWifiNetwork:
maxLength: 127
description: WiFi network name to use as a Safe-zone. When this network is visible, stay asleep
type: string
wakeAction:
default: normal
description: |-
Internal Use Only. What to do when the unit wakes up (ie is moved and not in a safe-zone). Options are 'available'
(lost and found), and 'normal' (tracking)
type: string
alertAction:
default: nothing
description: |-
What to do when the button is pressed or the unit is dropped. Options are
'available' (stay registered on the mobile network),
'nothing' (one transmission) and
'lockOn' (keep transmitting at 'interval' until instructed otherwise
type: string
timed:
description: 'Timed update settings. Must be array of objects matching [{hh: number, mm: number, day: number, action: number}, ...] format'
type: array
items:
type: object
command:
description: Internal use. Sends command to device on next connection
type: number
format: ''
id:
type: number
format: ''
deviceId:
type: number
format: ''
safeZoneId:
type: number
format: ''
required:
- interval
- sleepInterval
- packing
- wakeAction
- alertAction
type: objectyaml
deprecated: false
security:
- ApiKeyAuth: []
operationId: get-devices-id-config
components:
securitySchemes:
ApiKeyAuth:
in: header
name: Authorization
type: apiKey
description: API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See <a href='/apis/authentication'>Authentication</a> for more details.
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...