api.docs.tago.io
Open in
urlscan Pro
54.175.254.103
Public Scan
Submitted URL: http://api.docs.tago.io/
Effective URL: https://api.docs.tago.io/
Submission: On November 22 via api from US — Scanned from DE
Effective URL: https://api.docs.tago.io/
Submission: On November 22 via api from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
* Body * Headers (1) * Body * Headers (1) * Body * Headers (1) Public Documentation Settings ENVIRONMENT No Environment LAYOUT Double Column LANGUAGE cURL - cURL TagoIO API Introduction TagoIO API Documentation Devices (With Device-Token) Profile (With Profile-Token) Network (With Network-Token) TAGOIO API TAGOIO API DOCUMENTATION Contact Support: * Github: tago-io * Community: TagoIO Community HOW TO USE THIS DOCUMENTATION The documention is split by which token you're required to use in the request. TagoIO provides 4 different tokens: * Device-Token: The token from your device, which you can get from the device's page. * Profile-Token: Also know as Account-Token. You get from your profile settings page. * Network-Token: Is the token from your Network. Only available if you're owner of the network in your integrations page. * Analysis-Token: The token from your analysis, available in the analysis page. DEVICES (WITH DEVICE-TOKEN) Data operations using Device-Token. GETCURRENT DEVICE INFORMATION https://api.tago.io/info Get information about the current device or network depending on the chosen token type HEADERS device-token 5e12345a-d70a-4e2d-b83d-5c0123456789 Example Request Get current device information curl curl --location 'https://api.tago.io/info' \ --header 'device-token: 5e12345a-d70a-4e2d-b83d-5c0123456789' 200 OK Example Response * Body * Headers (1) View More json { "status": true, "result": { "active": true, "bucket": { "id": "6298fcc3e0b6840012b6abfa", "name": "TagoIO Device" }, "connector": "62333bd36977fc001a2990c8", "created_at": "2022-06-02T18:09:07.135Z", "id": "6298fcc3e0b6840012b6abfa", "last_input": "2022-06-02T19:40:54.517Z", "name": "TagoIO Device", "network": "62336c32ab6e0d0012e06c04", "payload_decoder": "LyogVGhpcyBpcyBhIGRlZmF1bHQgZXhhbXBsZSBmb3IgcGF5bG9hZCBwYXJzZXIuCioqIFRoZSBpZ25vcmVfdmFycyB2YXJpYWJsZSBpbiB0aGlzIGNvZGUgc2hvdWxkIGJlIHVzZWQgdG8g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dWUgLSAzMik7Ci8vICAgdGVtcGVyYXR1cmUudW5pdCA9ICJDIjsKLy8gfQ==", "profile": "5e1e192a06fbee00265ccfb0", "tags": [], "updated_at": "2022-06-10T20:22:59.405Z", "visible": true, "type": "mutable" } } Content-Type application/json GETGET DATA https://api.tago.io/data Get data from the bucket attached to the device. HEADERS device-token 5e12345a-d70a-4e2d-b83d-5c0123456789 (Required) PARAMS query last_item Valid queries: count, min, max, avg, sum, last_item, last_location, aggregate, conditional (Optional) qty 20 Total quantity of data to be retrieved (Optional) details true Get additional fields for the data, such as created_at date (Optional) ordination descending ascending/descending (Optional) skip 15 Skip the amount of data specified (Optional) variables temperature Filter data by variable (Optional) values 25 Filter data by its value (Optional) groups 0923092039 Filter data grouped by an specific group (Optional) start_date 2022-09-09T10:28:44Z Filter date by a specific timestamp. Also accepts a relative date. (Optional) end_date 2022-09-10T10:28:44Z Filter date by a specific timestamp. Also accepts a relative date. (Optional) function avg when using query=aggregate the allowed functions are: "avg" | "sum" | "min" | "max" when using query=conditional the allowed functions are: "gt" | "gte" | "lt" | "lte" | "eq" | "ne" (where gt = greater than, gte = greater than or equal, lt = less than, lte = less than or equal, eq = equal, ne = not equal interval day when using query=aggregate the allowed intervals are: "minute" | "hour" | "day" | "month" | "quarter" | "year" Example Request Example with all params View More curl curl --location 'https://api.tago.io/data?variable=temperature&device=612ea1694035dd0012f6d238&group=1631814703672&ids=6143842f561c4e00199f517b&value=-11.67&query=last%20_item&qty=20&details=true&ordination=descending&skip=10' \ --header 'device-token: b4766ce8-7d31-cdbb-548d-c0bcb71fbf8f' 200 OK Example Response * Body * Headers (1) View More json { "status": true, "result": [ { "id": "6143842f561c4e00199f517b", "device": "612ea1694035dd0012f6d238", "variable": "temperature", "value": -11.67, "unit": "°C", "group": "1631814703672", "time": "2021-09-16T17:51:43.672Z", "created_at": "2021-09-16T17:51:43.672Z", "location": { "type": "point", "coordinates": [ -78.677328, 35.770723 ] } } ] } Content-Type application/json POSTSEND DATA https://api.tago.io/data Send data to the bucket attached to the device HEADERS device-token a36eb1da-d51a-4f79-a77d-e746f6a98822 (Required) Content-Type application/json Bodyraw View More [ { "variable": "humidity", "value": 27, "group": "1631814703672", "unit": "%" }, { "variable": "temperature", "value": 29, "metadata": { "color": "red" }, "group": "1631814703672", "unit": "C", "time": "2022-06-02T19:40:54.517Z" }, { "variable": "location", "value": "TagoIO Headquarters", "location": { "lat": 35.770723, "lng": -78.677328 } } ] Example Request Sending multiple data View More curl curl --location 'https://api.tago.io/data' \ --header 'device-token: a36eb1da-d51a-4f79-a77d-e746f6a98822' \ --header 'Content-Type: application/json' \ --data '[ { "variable": "temperature", "value": 27, "metadata": { "color": "red" }, "group": "1631814703672", "unit": "C", "time": "2021-09-16T17:51:43.672Z" }, { "variable": "humidity", "value": 20, "group": "1631814703672", "unit": "%", "time": "2021-09-16T17:59:43.672Z" } ]' 200 OK Example Response * Body * Headers (1) json { "status": true, "result": "2 Data Added" } Content-Type application/json