Skip to content

Changing Nodes

HTTPS POST
https://api.konstellat.io/api/v1/project/{{projectId}}/node
Query parameters
Name Type Note
projectId  * string Project ID
sync boolean Syncing
hash string Conflicts
force boolean Conflicts
* Required
Required permissions
  • GetProject
  • GetConstellationNode
  • CreateConstellationNode
  • UpdateConstellationNode
  • DeleteConstellationNode
Example request body
JSON
{
"nodeChanges": {
"root": {
"children": { "12345678": false, "87654321": true }
},
"12345678": null,
"87654321": {
"name": "E2E",
"description": "Auth, order, and shop tests",
"versionValue": "0.1.0",
"versionSchema": "SemVer",
"statusResult": "Success",
"statusStrategy": "Manual",
"children": {},
"metadata": { "kio.pos.x": { "float": -750 }, "kio.pos.y": { "float": 750 } }
},
"aabbccdd": {
"versionValue": "5",
"versionSchema": "Incremental"
}
},
"message": "Update Constellation"
}

Adding nodes can be done by providing all fields (i.e. no null fields) and by adding the node to a parent node’s children with the value set to true.

JSON
{
"nodeChanges": {
"root": {
"children": { "12345678": true }
},
"12345678": {
"name": "API",
"description": "",
"versionValue": "0.1.0",
"versionSchema": "SemVer",
"statusResult": "Success",
"statusStrategy": "Manual",
"children": {},
"metadata": { "kio.pos.x": { "float": 100 }, "kio.pos.y": { "float": -100 } }
}
},
"message": "Add node 12345678"
}

Updating nodes can be done by providing a value (i.e. not null) to all the fields that should be updated. A field with a null value is kept as-is. Nodes that are not added to nodeChanges are not changed.

JSON
{
"nodeChanges": {
"root": {
"versionValue": "1",
"versionSchema": "Incremental",
"statusResult": "Failure",
"statusStrategy": "Manual",
"metadata": { "kio.pos.x": { "float": -100 }, "kio.pos.y": { "float": 100 } }
}
},
"message": "Update node root"
}

Removing nodes can be done by setting the node to null and removing it from its parent by setting it to false in the parent’s children.

JSON
{
"nodeChanges": {
"12345678": null,
"root": {
"children": { "12345678": false }
}
},
"message": "Remove node 12345678"
}
HTTPS DELETE
https://api.konstellat.io/api/v1/project/{{projectId}}/node/{{nodeId}}
Query parameters
Name Type Note
projectId  * string Project ID
nodeId  * string Node ID
sync boolean Syncing
hash string Conflicts
force boolean Conflicts
* Required
Required permissions
  • GetProject
  • DeleteConstellationNode
Example request body
JSON
{ message: "Remove node 12345678" }