Skip to content

Update configuration for a device

PUT
/devices/id/config

Parameters

Path Parameters

id*

device id

Typenumber
Required
formatinteger

Request Body

JSON
{
"currentFW": "string",
"otaFW": "string",
"interval": 0,
"sleepInterval": 0,
"packing": 0,
"movementSensitivity": 0,
"debounce": 0,
"movementSensitivity2": 0,
"behavior": 0,
"modeControl": 0,
"modeControl2": 0,
"gpsTimeout": 0,
"transmitTimeout": 0,
"gpsStabilize": 0,
"gpsCheckInterval": 0,
"stopTimeout": 0,
"tolerancePercentage": 0,
"reasonsToWake": [
{
}
],
"modified": "string",
"forceFw": true,
"updateAvailibility": 0,
"receivedAt": "string",
"reset": 0,
"flashTryCount": 0,
"homeWifiNetwork": "string",
"wakeAction": "string",
"alertAction": "string",
"timed": [
{
}
],
"command": 0,
"id": 0,
"deviceId": 0,
"safeZoneId": 0
}

Responses

Body (JSON)
application/json
JSON
{
"currentFW": "string",
"otaFW": "string",
"interval": 0,
"sleepInterval": 0,
"packing": 0,
"movementSensitivity": 0,
"debounce": 0,
"movementSensitivity2": 0,
"behavior": 0,
"modeControl": 0,
"modeControl2": 0,
"gpsTimeout": 0,
"transmitTimeout": 0,
"gpsStabilize": 0,
"gpsCheckInterval": 0,
"stopTimeout": 0,
"tolerancePercentage": 0,
"reasonsToWake": [
{
}
],
"modified": "string",
"forceFw": true,
"updateAvailibility": 0,
"receivedAt": "string",
"reset": 0,
"flashTryCount": 0,
"homeWifiNetwork": "string",
"wakeAction": "string",
"alertAction": "string",
"timed": [
{
}
],
"command": 0,
"id": 0,
"deviceId": 0,
"safeZoneId": 0
}

Samples

cURL
curl -X PUT \
'https://api.lightbug.cloud/api/devices/id/config' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.lightbug.cloud/api/devices/id/config', {method:'PUT',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.lightbug.cloud/api/devices/id/config';
$method = 'PUT';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://api.lightbug.cloud/api/devices/id/config'

headers = {
    'Content-Type': 'application/json'
}

response = requests.put(url, headers=headers)
print(response.json())