API Overview
API Mutation
API Query
API Subscription
Webhooks
Hardware

Create a Space

Working with spaces to structure your IoT data is highly recommended.

A space could be viewed as a catalogue containing sub-spaces and / or points. You could get more familiar with this here, and also read more about this in this blog post

Setting up a new space is easily done through our GraphQL API. In general there is always good to revisit your expected data structure and how you are going to utilize this in your IoT project.

We set up a space in this example as a subspace under the parent space “buildings”.

mutation {
space {
create(input: { name: "JustAnotherSpace",
parentId: "buildings" }) {
name
id
parent {
name
}
}
}
}

…and get confirmed that task is done in preferred way. In this example we have requested that the mutation returns the name, id and the name of the parent space.

{
"data": {
"space": {
"create": {
"name": "JustAnotherSpace",
"id": "604a075832a894b038a5fe36",
"parent": {
"name": "buildings"
}
}
}
}
}
astronaut

Ready to get started?