Developer Portal
Connector Guides
API ReferenceConsole

Tago.io

TagoLogo

Utilizing the Tago.io connector, you can query against the device datapoints logged on the Tago.io network. Since Tago.io is a platform, the types of results you can retrieve cross a wide variety of possible scenarios. As such, our example code will not show a specific use case, but rather show how to locate the different things and points associated specifically with the Tago connector as a whole.

Use Cases

As noted, potential use cases cover pretty much any kind of sensor Tago supports, which include:

  • Tracking device humidity and temperature across your building
  • Tracking CO2 levels across your building
  • Tracking space usage through detection of motion events

Configuration

CredentialDescription
Profile TokenYou will need your profile token generated from the Tago.io dashboard, located under Profiles and then the Token tab

Mapped Concepts

Connector ConceptMapped Type
DeviceDevice
Device DataPoint

Sample Code

This sample, unlike those in most of the other connector docs, is going to start actually at the connectors level, rather than a thing or point. The following example filters by a specific connector ID (which you can find in the URL for the connector when editing it in the UI, or by making a call to connectors without a filter and looking for the id field) and then retrieves the things and points associated with that connector. We also included the state and updated fields, so you can see the connector is ACTIVE and the last time it was updated.

Request Response
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  connectors(filter: {id: {eq: "CONTgu8VfdJHEpEbpCaTKAbcD"}}) {
    id
    name
    state
    updated
    things {
      id
      name
      exactType
      points {
        id
        name
        exactType
        series(latest: true) {
          timestamp
          value {
            float64Value
          }
        }
      }
    }
  }
}

The example response has pretty generic labeling; in a real world scenario, the types would be more detailed depending on the sensor connected to Tago, and the details it feeds into the Tago database for us to retrieve.