Skip to content

Queries devices of user.

GET
/users/id/devices

Parameters

Path Parameters

id*

user id

Typestring
Required
formatJSON

Query Parameters

filter

JSON Filter object

Typestring
formatJSON

Responses

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

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

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