Device Data
Get Data
Get data from the device.
get/data
Request
- Base URLhttps://api.us-e1.tago.io
- AuthAPI key in header Device-Token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
query'count' | 'min' | 'max' | 'avg' | 'sum' | 'last_item' | 'last_location' | 'aggregate' | 'conditional'
Select the query mode.
qtyinteger
Example:20
Total quantity of data to retrieve.
detailsboolean
Example:true
Include additional fields (e.g., created_at).
ordination'ascending' | 'descending'
Example:descending
Sort order.
skipinteger
Example:15
Number of items to skip.
variablesstring
Example:temperature
Filter data by variable.
valuesstring
Example:25
Filter data by value.
groupsstring
Example:0923092039
Filter by group identifier.
start_datestring date-time
Example:2022-09-09T10:28:44Z
Start timestamp or relative date.
end_datestring date-time
Example:2022-09-10T10:28:44Z
End timestamp or relative date.
function'avg' | 'sum' | 'min' | 'max' | 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne'
Example:avg
Allowed values depend on query mode: aggregate → avg,sum,min,max; conditional → gt,gte,lt,lte,eq,ne.
Response
Success Response
Example response
{
"result": [
{
"created_at": "2021-09-16T17:51:43.672Z",
"device": "612ea1694035dd0012f6d238",
"group": "1631814703672",
"id": "6143842f561c4e00199f517b",
"location": {
"coordinates": [
-78.677328,
35.770723
],
"type": "point"
},
"time": "2021-09-16T17:51:43.672Z",
"unit": "°C",
"value": -12.67,
"variable": "temperature"
}
],
"status": true
}Changes
No recorded changes to this operation across all 2 revisions of this API.