Query Devices
Query for devices in a number of ways using available filters.
#
RoutesMethod | URI | Name | Summary |
---|---|---|---|
GET | /v1.0/admin/things | Get list of all devices | |
GET | /v1.0/admin/things/count | Get count of all devices | |
GET | /v1.0/admin/things/{thing_id} | Get one device | |
POST | /v1.0/admin/things | Create a device | |
POST | /v1.0/admin/things/{thing_id}/cmd | Send a command to a device | |
PUT | /v1.0/admin/things/{thing_id} | Update a device | |
DELETE | /v1.0/admin/things/{thing_id} | Delete a device |
#
Query ParametersName | Source | Type | Values |
---|---|---|---|
application_id | query | string | |
limit | query | number | |
page | query | number | |
location_id | query | number | |
status | query | number | |
user_id | query | string | |
thing_type | query | string | devices or gateways |
external_id | 'query' | string |
#
Find all Devices#
Get all devices for specific User**Example call to query devices for a user (e.g. one of our two users pulled in the previous example). In this case we'll query against robcan...@yopmail.com, user 99e86f3f-87f4-4d7e-9e87-529e16f27438:
Note how we filter by a specific user_id.
Example Response (robcan...@yopmail.com's devices):
#
Create a DeviceCreate a Device
Example Response:
#
Update DeviceUpdate a Device
Example Response:
#
Remove DeviceDelete a Device
Example Response:
#
Get Device by External IdGet a Device by External Id
#
Send Device CommandSend Device Commands
In the above example the channel must be one of the device capabilities found under device templates. The value depends on the type of capability. Here we have a stop alert downlink and the value must be equal to 1.