Skip to content
Documentation

HTTP Node Tree Creation Walkthrough

This walkthrough builds a node tree with the PowerTSM HTTP API: it creates a node attribute, assigns child nodes, modifies a node and verifies the resulting structure. It only demonstrates the creation of a node tree; see Working with Nodes for the basic information about nodes.

First, an attribute has to be created that the nodes will be attached to:

Request

POST /repositories/TSM_SQLSERVER/attributes

Request Body

{
"name": "TestNodeTree",
"description": "",
"type": {
"identifier": 13,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
}
}

13 is the ID of the attribute type Node. See Basic Attribute Types for more information.

The response of this request will look like this:

Response

{
"identifier": 1014,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
},
"value": {
"name": "TestNodeTree",
"description": "",
"type": {
"identifier": 13,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
}
}
}

Note the identifier of the root is 1014.

Request

POST /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes

Send this request with GET to see the ID(s) of the node(s).

This node is only assigned to the root, which is the attribute TestNodeTree:

Request Body

[
{
"name" : "ChildNodeA",
"root": {
"identifier" : 1014,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
},
"parent": null
}
]

Response

[
{
"$successful": "true",
"value": {
"identifier": 10,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
},
"value": {
"root": {
"identifier": 1014,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
},
"name": "ChildNodeA",
"parent": null,
"children": {}
}
}
}
]

Note that the id of the created node is 10.

This creates a child of ChildNodeA:

Request

POST /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes

Request Body

[
{
"name" : "ChildNodeA.1",
"root": {
"identifier" : 1014,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
},
"parent": {
"identifier" : 10,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
}
}
]

To follow the example, do this three times, one more time with the node name ChildNodeA.2 and ChildNodeA.3 respectively.

The response provides the information that, for this example, the ChildNodeA.1 has the id 11 and ChildNodeA.2 has the id 12.

This second variant achieves the same result. It creates a child node of the node ChildNodeA.1:

Request

POST /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes/id:10/children/id:11/children

Note that this body does not need to be enclosed in []. The parent id must be the same as the last id in the request path (in this case 11):

Request Body

{
"name" : "ChildNodeA.1.1",
"root": {
"identifier" : 1014,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
},
"parent": {
"identifier" : 11,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
}
}

The structure now looks like this:

TestNodeTree (id:1014)
└─ ChildNodeA (id:10)
├─ ChildNodeA.1 (id:11)
│ └─ ChildNodeA.1.1 (id:14)
├─ ChildNodeA.2 (id:12)
└─ ChildNodeA.3 (id:13)

Request

PUT /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes/id:10/children/id:11/children/id:14

The body renames the node to ChildNodeA.2.1_modified and sets its parent id to 12, which is the id of ChildNodeA.2:

Request Body

{
"name" : "ChildNodeA.2.1_modified",
"root": {
"identifier" : 1014,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
},
"parent": {
"identifier" : 12,
"storageInformation": {
"repositoryName": "TSM_SQLSERVER"
}
}
}

The following request delivers the full content of the node attribute:

GET /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes

From there it is visible that the first child of the attribute is ChildNodeA with the id 10.

To only see details on that node the following request is used:

GET /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes/id:10

This also shows the ids of the children of ChildNodeA. To see further details of the children, the /children endpoint is used:

GET /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes/id:10/children

Each of the children can be navigated to by simply appending their id from there. To see ChildNodeA.1, which is a child of ChildNodeA:

GET /repositories/TSM_SQLSERVER/attributes/TestNodeTree/nodes/id:10/children/id:11
© 2026 Volue.Version v0.6.38017 November 2026