/device/get
Body
deviceID
- Type: String
- Examples:
"devicelfdzibp1qwso0jj7blg4a407"
path
(optional)
- Type: String
- Examples:
"productID"
,"status"
,"admin"
Success response
code
"DEVICE-DETAILS-FETCHED"
message
"Details of the device are successfully fetched: "
device
- Type: Dictionary
- Examples:
{ deviceID: "devicelfdzibp1qwso0jj7blg4a407", productID: "DRONE-01", name: "DRONE-01", status: false, admin: "[email protected]", "registeredAt": 1679144882869, "lastPairedAt": 1679144984839, paired: true }
Error response
DATA-INVALID
{ code: "DATA-INVALID", message: "Device ID is required for fetching its details." }
DEVICE-ID-INVALID
{ code: "DEVICE-ID-INVALID", message: "Device is not registered with the project."}
Usage
curl "https://api.grandeur.tech/device/get?apiKey=${API_KEY}" -H "Authorization: ${AUTH_TOKEN}" --json '{"deviceID": "devicelfdzibp1qwso0jj7blg4a407", "path": "paired"}'
Output
JSON
{
"code": "DEVICE-DETAILS-FETCHED",
"message": "Details of the device are successfully fetched: ",
"device": {
"paired": true
}
}