Data Endpoints
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

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

Testnet

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

Example queries

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

List devices owned by a specific account

1
query {
2
pebble_device (limit: 10, where: {owner: {_eq: "0x259c0a4251ee7CD3cbA0a437973443c9C7cd2D4f"} }) {
3
id
4
owner
5
}
6
}
Copied!
Result:
1
{
2
"data": {
3
"pebble_device": [
4
{
5
"id": "351358810263431",
6
"owner": "0x259c0a4251ee7CD3cbA0a437973443c9C7cd2D4f"
7
},
8
{
9
"id": "351358813374789",
10
"owner": "0x259c0a4251ee7CD3cbA0a437973443c9C7cd2D4f"
11
}
12
]
13
}
14
}
Copied!

Query additional device data

1
query {
2
pebble_device (limit: 1, where: {owner: {_eq: "0x259c0a4251ee7CD3cbA0a437973443c9C7cd2D4f"} }) {
3
id
4
name
5
owner
6
address
7
firmware
8
avatar
9
beep
10
config
11
configurable
12
created_at
13
data_channel
14
}
15
}
Copied!
Result:
1
{
2
"data": {
3
"pebble_device": [
4
{
5
"id": "351358810263431",
6
"name": "My Living Room",
7
"owner": "0x259c0a4251ee7CD3cbA0a437973443c9C7cd2D4f",
8
"address": "0x6ff4142596AaD08e95362EA9b4e03c50645E187a",
9
"firmware": "Riverrock 1.0.8",
10
"avatar": "https://storageapi.fleek.co/uu-z-team-bucket/b7a5acf3-c513-4279-944b-72f4dbf17e8c",
11
"beep": 1000,
12
"config": null,
13
"configurable": false,
14
"created_at": "2022-01-06T16:45:40.118+00:00",
15
"data_channel": 8183
16
}
17
]
18
}
19
}
Copied!

Query the most recent datapoint with valid GPS for a device

1
query {
2
pebble_device_record(limit: 1, order_by: {timestamp: desc}, where: {imei: {_eq: "351358810263431"}, latitude: {_neq: "200.0000000"}}) {
3
latitude, longitude, timestamp
4
}
5
}
Copied!
Result:
1
{
2
"data": {
3
"pebble_device_record": [
4
{
5
"latitude": "45.4799999",
6
"longitude": "9.1500000",
7
"timestamp": 1641854726
8
}
9
]
10
}
11
}
Copied!
Export as PDF
Copy link