**Source URL:** https://limited.veevavault.dev/commercial/security/tree/working-with-tree-security-nodes.md

# Working with Security Tree Nodes

Security tree nodes are *Security Tree* object records. To work with Security tree nodes, you work with the *Security Tree* object records.

## How to Create Security Tree Nodes {#how-to-create-security-tree-nodes}

Security tree nodes are *Security Tree* object records. Once you have [created a Security Tree object](/security/tree/how-to-crud-tree-security/) (an object of class `securitytree`), you can create, update, and delete security tree nodes the same way you would create, update, or delete object records with Vault API or Vault Java SDK.

For example, the following request uses Vault API’s [Create & Upsert Object Records](/vault-api/api-reference/26.2/vault-objects/create-upsert-object-records) endpoint to create a security tree node on the `security_tree__c` security tree:

### Request {#request}

```
curl -X POST -H "Authorization: {AUTH_VALUE}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-raw '[
    {
       "name__v": "My New Security Tree Node",
       "parent_node__sys": "V8S000000002001"
    }
]' \
https://myvault.veevavault.com/api/v25.2/vobjects/security_tree__c

```

### Body Parameters {#body-parameters}

| Name | Description |
| --- | --- |
| `name__v` | The name of this new security tree node, visible to Admins in the Vault UI and to developers as the `name__v` value. |
| `parent_node__sys` | The ID of an existing node in this security tree to assign as the parent to this new node. If omitted, creates a root node. Each security tree can contain only one root node. |

### Response {#response}

```
{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "responseStatus": "SUCCESS",
            "data": {
                "id": "V8S000000003002",
                "url": "/api/v25.2/vobjects/security_tree__c/V8S000000003002"
            }
        }
    ]
}

```

## How to Retrieve Security Tree Nodes {#how-to-retrieve-security-tree-nodes}

Security trees are fully queryable with VQL, including objects in the `_c__sys` namespace.

For example, the following query retrieves all nodes associated with the `security_tree__c` security tree:

### Request {#request-1}

```
SELECT id, name__v, parent_node__sys
FROM security_tree__c

```

### Response {#response-1}

```
{
   "responseStatus": "SUCCESS",
   "responseDetails": {
        "pagesize": 1000,
        "pageoffset": 0,
        "size": 3,
        "total": 3
    },
   "data": [
       {
           "id": "V8S000000002002",
           "name__v": "Security Tree Node",
           "parent_node__sys": "V8S000000003001"
       },
       {
           "id": "V8S000000003001",
           "name__v": "Security Tree Root Node",
           "parent_node__sys": null
       }
   ]
}

```


---

**Previous:** [How to Create, Edit, & Update Security Trees](/commercial/security/tree/how-to-crud-tree-security)  
