Skip to content

Get device

GET
/devices/id

Parameters

Path Parameters

id*

Model id

Typestring
Required
formatJSON

Query Parameters

filter

Filter defining fields and include - must be a JSON-encoded string ({"something":"value"})

Typestring
formatJSON

Responses

Body (JSON)
application/json
JSON
{
"imei": "string",
"iccid": "string",
"loraId": 0,
"imsi": "string",
"btMac": 0,
"btMacAddress": "string",
"uwbId": 0,
"serial": "string",
"type": "string",
"expires": "string",
"lastConnection": "string",
"firstSeen": "string",
"mode": "string",
"name": "string",
"batteryVoltage": 0,
"batteryPct": 0,
"batteryType": "string",
"tags": [
"string"
],
"currentMode": 0,
"color": "string",
"saveToWeb": true,
"active": true,
"deepSleep": true,
"simstate": "string",
"stripeSubscription": "string",
"subscriptionType": "string",
"meta": {
},
"siloId": 0,
"resellerId": 0,
"resellerPlanId": 0,
"btPasskey": 0,
"simType": "string",
"id": 0,
"ownerId": 0,
"onoWhitelistId": 0
}

Samples

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

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

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