Device (session, sponsor, product …)¶
GET /{deviceType}/list¶
Get the list of all devices of that type.
All available properties will be shown.
Examples:
/room/list
/session/list
/sponsor/list
/product/list
/space-shuttle/list
Note
This method does not support pagination yet, pagination support will be added in a future release.
Because this will always return all records, please use it carefully.
Response¶
The response is a collection of devices where the deviceType
will always match the device type specified in the
URL. The collection can be empty ([]
in JSON). The example below is for /room/list
[
{
"id": 1,
"name": "Rainbow Room",
"code": "5ad2654c-4ce9-4daa-9844-b62b32303553",
"deviceType": "room",
"createdAt": "2017-08-25T12:44:38+10:00",
"updatedAt": "2017-09-06T11:33:48+10:00"
}
]
GET /{deviceType}/{idType}:{id}¶
Gets a specific device. Please note if the device ID is correct, but the device type specified in the URL is wrong this
method will return a 404 Not Found
error.
Response¶
The response is a single devices (if found). The example below is for /room/id:1
{
"id": 1,
"name": "Rainbow Room",
"code": "5ad2654c-4ce9-4daa-9844-b62b32303553",
"deviceType": "room",
"createdAt": "2017-08-25T12:44:38+10:00",
"updatedAt": "2017-09-06T11:33:48+10:00"
}
POST /{deviceType}/new¶
Creates a new device of the specified deviceType
and returns it.
PATCH /{deviceType}/{idType}:{id}¶
Updates an existing device. Please note if the device ID is correct, but the device type specified in the URL is wrong
this method will return a 404 Not Found
error.
DELETE /{deviceType}/{idType}:{id}¶
Deletes an existing device. Please note if the device ID is correct, but the device type specified in the URL is wrong
this method will return a 404 Not Found
error.
GET /{deviceType}/cache¶
Gets a list of all devices for client side caching. You can specify a set of fields you want to cache and only those
will be returned. A device’s id
will always be returned, even if you don’t ask for it.
POST /{deviceType}/log/{interactionType}¶
Logs an interaction against the device.
Examples:
POST /session/log/check-in
POST /session/log/check-out
POST /session/log/join
POST /space-shuttle/log/launch
POST /device/{idType}:{id}/ping¶
Remote devices can send a ping to the server to notify Tag that the device is alive along with some vital information to help the on-site Events Team manage devices.
Should send a ping every 60 seconds (pingInterval), the local time of the device (localTime), latitude and longitude where available, battery charge level (battery, where available, preferably battery %), a count of records in the device not yet synced to Tag (failedUploads) and details of the network connection the device is currently using (network).
Example:
{
"localTime": 1234567890,
"lat": -36.8558162,
"lon": 174.7697974,
"battery": 24,
"pingInterval": 60,
"failedUploads": 4,
"network": "4G"
}