API Overview
API Mutation
API Query
API Subscription
Webhooks
Hardware

Create a Point

Working with points is required if you want to collect data from your physical sensory devices.

A Point could be seen as a sort of digital twin of the physical device. When setting up a new device you need to register a Point first. Let me give you an example where we set up a Point and also include some metadata.

For this point we want to be abled to update which wifi networks the device can connect to and also a parameter that regulates the frequency of payloads sent from the device, and we want the Point to be a part of the “buildings” space.

The metadata can always be added as a JSON string, and the content of this will depend on requirements in your physical hardware device and how you choose to set this up.

mutation {
point {
register(
input: {
spaceId: "buildings"
mac: "AB:CD:EF:GH:IJ:55"
name: "MyDevice"
metadata: {
GW: [
{ Name: "MyGateway",
User: "Username",
PW: "Password" }
{ Name: "MyOtherGateway",
User: "Username",
PW: "Password" }
]
UpdateFrequency: "10"
}
}
) {
name
mac
id
space{
name
}
}
}
}

To confirm the success of my mutation I requested some feedback from the GraphQL API which you find below.

{
"data": {
"point": {
"register": {
"name": "MyDevice",
"mac": "AB:CD:EF:GH:IJ:55",
"id": "604a11b2080ef7237ad1fc2a",
"space": {
"name": "buildings"
}
}
}
}
}

astronaut

Ready to get started?