Skip to content

Devices with tag

GET
/users/id/getDevicesByTag

Parameters

Path Parameters

id*

user id

Typestring
Required

Query Parameters

tag*

Tag to search for in fully qualified key:value format. Example device_type:truck. Partial searches with wildcards may be used, eg device_type:% or device_type:veh_%

Typestring
Required
fields

Optional array of device model fields to return. eg ["id","name"]

Typestring

Responses

Request was successful
JSON
[
null
]

Samples

cURL
curl -X GET https://api.lightbug.cloud/api/users/id/getDevicesByTag
JavaScript
fetch("https://api.lightbug.cloud/api/users/id/getDevicesByTag")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("https://api.lightbug.cloud/api/users/id/getDevicesByTag");
Python
import requests
response = requests.get("https://api.lightbug.cloud/api/users/id/getDevicesByTag")
print(response.json())