API Overview
API Mutation
API Query
API Subscription
Webhooks
Hardware

Requirement

Before you can successfully transmit data and see them in the GraphQL API you need :

  1. An active D4 Tenant 
  2. Onboarded device with matching device-id on that tenant.
  3. A payload that is correctly formatted and passes the unit/type testing.

Your MQTT credentials are stored in the tenant. You can get this information by using GQL API. To get this use this query:

query{
tenant{
settings{
mqtt{
url
port
hostname
username
password
}
}
}
}

This will return the information you need and look like this:

{
"data": {
"tenant": {
"settings": {
"mqtt": {
"url": "mqtt://mqtt.dimensionfour.io:1883",
"port": "1883",
"hostname": "mqtt.dimensionfour.io",
"username": "d4-mqtt-yourcompany",
"password": "fdsgdfg34989ddf"
}
}
}
}
}

astronaut

Ready to get started?