IoT GURU Cloud
List of visible devices with down alert of the user.
| URI | /device/downAlerts/{userShortId} |
| Method | GET |
userShortId |
The short id of the user |
| 200 |
The (filtered) JSON of the device[
{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
]
|
Find a device by id.
| URI | /device/find/{deviceShortId} |
| Method | GET |
deviceShortId |
The short id of the device |
| Access token (optional) | Authorization: Bearer eyJhbGciO ... _K74HRzwg |
| 200 |
The (filtered) JSON of the device{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
|
| 404 |
Device not found or allowed to see |
Generate new key to the device.
| URI | /device/generateNewKey/{deviceShortId} |
| Method | GET |
deviceShortId |
The id of the device |
| Access token | Authorization: Bearer eyJhbGciO ... _K74HRzwg |
| 200 |
The (filtered) JSON of the node{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
|
| 401 |
The provided JWT access token is invalid or expired |
| 403 |
Device not found or not owned |
List of devices of the user.
| URI | /device/list |
| Method | GET |
| Access token | Authorization: Bearer eyJhbGciO ... _K74HRzwg |
| 200 |
The (filtered) JSON of the list of devices[
{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
]
|
List of public devices of the user id.
| URI | /device/listByUser/{userShortId} |
| Method | GET |
userShortId |
The short id of the user |
| Access token (optional) | Authorization: Bearer eyJhbGciO ... _K74HRzwg |
| 200 |
The (filtered) JSON of the list of devices[
{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
]
|
List of public obsoleted devices of the user id.
| URI | /device/obsoleted/{userShortId} |
| Method | GET |
userShortId |
The short id of the user |
| Access token (optional) | Authorization: Bearer eyJhbGciO ... _K74HRzwg |
| 200 |
The (filtered) JSON of the list of devices[
{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
]
|
Create a new device or update the editable fields of the device.
| URI | /device/update |
| Method | POST |
| Access token | Authorization: Bearer eyJhbGciO ... _K74HRzwg |
| Create new device (without deviceId and deviceShortId) | {
"alertDelay":900,
"alertEnabled":true,
"alertFrequency":3600,
"description":"Outside A",
"firmwareVersion":"0.1.19-1",
"name":"Outside A"
} |
| Update the device (with deviceId and deviceShortId) | {
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"alertDelay":900,
"alertEnabled":true,
"alertFrequency":3600,
"description":"Outside A",
"firmwareVersion":"0.1.19-1",
"name":"Outside A"
} |
| 200 |
The (filtered) JSON of the created or update device{
"deviceId":"5f4936b0-46c7-11e8-a240-7bca10e5bd5b",
"deviceShortId":"okB7yhDlvVtfSTawRscR6A",
"alertDelay":900,
"alertEnabled":true,
"alertFirstTimestamp":1552208093260,
"alertFrequency":3600,
"alertLastTimestamp":1552720193260,
"description":"Outside A",
"deviceKey":"xxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion":"0.1.19-1",
"ip":"192.168.0.229",
"lastCheck":1552208093260,
"lastUpdate":1528657140376,
"name":"Outside A",
"reportedFirmwareVersion":"0.1.19-1",
"userId":"4ca6ff41-4408-11e8-94bd-3dd310e71935"
}
|
| 401 |
The provided JWT access token is invalid or expired |
| 403 |
Device not found or not owned |