Nodes
The Nodes API allows for retrieving the hierarchy of nodes (groups, machines, gateways) in the system.
Endpoint
GET /api/v1/nodes
Query Parameters
| Parameter | Description |
|---|---|
| nodeId | The ID of the node to use as context for the query. |
| nodeContext | Determines which nodes to return relative to the specified nodeId. See available contexts below. |
| nodeFilters | Filter the results by node type. Can be combined as a bitmask or sum of values. |
Node Contexts
The nodeContext parameter defines the scope of the search relative to the nodeId.
| Context | Description |
|---|---|
| RootNodes | Returns the root nodes accessible to the user. |
| SpecificNode | Returns only the node specified by nodeId. |
| Descendants | Returns all descendants (children, grandchildren, etc.) of the nodeId. |
| Children | Returns only the immediate children of the nodeId. |
| Ancestors | Returns all ancestors (parent, grandparent, etc.) of the nodeId. |
| Parent | Returns the immediate parent of the nodeId. |
| AncestorsIncludingChildren | Special context that returns ancestors and their immediate children. |
Node Filters
Use nodeFilters to filter the results by node type. The value is a bitmask.
| Flag | Value | Description |
|---|---|---|
| Group | 1 | Include groups. |
| Gateway | 16 | Include gateways. |
| Machine | 256 | Include machines. |
Example Request
To get all machines that are descendants of node 1234:
GET /api/v1/nodes?nodeId=1234&nodeContext=Descendants&nodeFilters=256