Using the account-token, you can manage your devices through API requests. It’s possible to create, edit, delete, and get info of it.
Create a device through POST method.
POST - https://api.tago.io/device
Request
{ "name": "My first device", "description": "Creating my first device", "active": true, "visible": true, "tags": [ {"key": "client", "value": "John"} ], "configuration_params": [ {"sent": false, "key": "check_rate", "value": 600}, {"sent": false, "key": "measure_time", "value": 0} ] }
Retrieve informations for a device, using it’s ID.
GET - https://api.tago.io/device/:id
Response
{ "status": true, "result": { "created_at": "2016-11-03T23:24:19.787Z", "updated_at": "2016-11-03T23:24:19.787Z", "last_access": "2016-11-03T23:24:19.787Z", "visible": true, "active": true, "tags": [ {"key": "client", "value": "John"} ], "name": "My Device", "id": "581bc7233148f62587e2d507", "configuration_params": [ {"sent": false, "key": "check_rate", "value": "600"} {"sent": false, "key": "measure_time", "value": ""} ], "bucket": { "name": "My Bucket", "id": "577bdd94567190920cfe9cfd" } } }
Retrieve a list of all devices in the account.
GET - https://api.tago.io/device
Delete the device by its ID.
DELETE - https://api.tago.io/device/:id
Response
{
"status": true,
"result": "Successfully Removed"
}
Generate a new token for the device and return it.
POST - https://api.tago.io/device/token
Response
{
"status": true,
"result": {
"token": "8be70d95-0dbc-4e16-89b6-b23b077d05e5"
}
}
Delete device token by its token
DELETE - https://api.tago.io/device/token/:token
Response
{
"status": true,
"result": "Successfully Removed"
}