Query Pebble Data

Pebble Tracker will send data messages to either the Mainnet or the Testnet of the Real-World Oracle, depending on the firmware configuration. All data messages can be fetched from the Oracle network by querying the following endpoints using GraphQL.

Mainnet endpoint

Use the GraphQL endpoint below to query the Real-world Data Oracle Mainnet:

-> https://pebble.iotex.me/v1/graphql arrow-up-right

Testnet Endpoint

Use the GraphQL endpoint below to query the Real-world Data Oracle Testnet:

-> https://dev.iotex.io/v1/graphqlarrow-up-right

Example queries

You can use a public GraphQL endpoint like https://tray.io/docs/api/sandboxarrow-up-right to test some queries:

List devices owned by a specific account

query {
      pebble_device (limit: 10, where: {owner: {_eq: "0x259c0a4251ee7CD3cbA0a437973443c9C7cd2D4f"} }) {
        id
        owner
      }
    }

Result:

Query additional device data

Result:

Query the most recent datapoint with valid GPS for a device

Result: