/devices/get
Body
type
(optional)
- Type: Enumeration
- Examples:
"registered"
,"paired"
,"unpaired"
filter
(optional)
- Type: Enumeration
- Examples:
"online"
,"offline"
productID
(optional)
- Type: String
- Examples:
"DRONE"
Success response
code
"DEVICES-LIST-FETCHED"
message
"List of requested devices is successfully fetched."
nDevices
- Type: Integer
- Examples:
1
devices
- Type: List
- Examples:
[ { deviceID: "devicelfdzibp1qwso0jj7blg4a407", productID: "DRONE-01", name: "DRONE-01", status: false, admin: "[email protected]", "registeredAt": 1679144882869, "lastPairedAt": 1679144984839, paired: true } ]
Usage
curl "https://api.grandeur.tech/devices/get?apiKey=${API_KEY}" -H "Authorization: ${AUTH_TOKEN}" --json '{"type": "paired", "filter": "offline", "productID": "DRONE-0"}'
Output
JSON
{
"code": "DEVICES-LIST-FETCHED",
"message": "List of requested devices is successfully fetched.",
"nDevices": 1,
"devices": [ {
"deviceID": "devicelfdzibp1qwso0jj7blg4a407",
"productID": "DRONE-01",
"name": "DRONE-01",
"status": false,
"admin": "[email protected]",
"registeredAt":1679144882869,
"lastPairedAt":1679144984839,
"paired": true
} ]
}