It is easy to connect devices, data sources, or third party APPs to your account using Tago API (Application Programming Interface).
We have a comprehensive set of APIs that gives you full control to manage your accounts, data, devices, dashboards, and scripts. For example, you can use the resources available in the Admin page to create, delete, or edit your accounts and dashboards; however, you can do all the same things directly using API.
We follow RESTful principles. Before checking the API documentation, there are some details you should know.
Looking for our SDK ? Click here.
All responses from Tago API have a pattern, and you will always receive something like this:
// For success:
// For warning:
'message': 'Warning message'
// For failed:
'message': 'Error message'
status: it is always boolean. If your request is successful the response will be true, otherwise it will be false.
result: can be any object type (that is dynamic object), depends what api endpoint you called for.
message: it is message from the server. Usually it is used when has any error or warning.
Tago takes the necessary steps to protect your data in the database and also during the communication between our server and your devices.
All communication between the devices, your application, and Tago server is performed through Hypertext Transfer Protocol Secure (HTTPS) to avoid the man-in-the-middle and wiretapping attacks.
Although the communication can also be performed with HTTP, Tago doesn’t recommend it. By doing so will eliminate the security of authentication and encryption provided by SSL/TLS protocols part of HTTPS. Just in case you really need to use HTTP without SSL, all you have to do is to add
_ssl=falseon the header or url query string.
Secret tokens for account and devices are generated by Tago system and can be individually managed by the user. Different levels of access can be granted to different users or devices.
The URL that your device should connect is
https://api.tago.io/data through Port
There are four type of tokens:
You are able to generate all tokens from Tago admin or directly using API. The type of token and its expiration can also be defined.
Using tokens is simple, just add them in the header of the request.
HEADER KEY HEADER VALUEAccount-TokenOnly Account TokenDevice-TokenOnly Device TokenAnalysis-TokenOnly Analysis TokenMiddleware-TokenOnly Middleware TokenAuthenticationAny Token (Account or Device)
Check the usage policy based on number of requests per a certain period.