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
Section link for How to Create Security Tree NodesSecurity tree nodes are Security Tree object records. Once you have created a Security Tree object (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 endpoint to create a security tree node on the security_tree__c security tree:
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-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__cBody Parameters
Section link for Body Parameters| Name | Description |
|---|---|
name__vrequired | 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__sysconditional | 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
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"data": {
"id": "V8S000000003002",
"url": "/api/v25.2/vobjects/security_tree__c/V8S000000003002"
}
}
]
}How to Retrieve Security Tree Nodes
Section link for How to Retrieve Security Tree NodesSecurity 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
Section link for RequestSELECT id, name__v, parent_node__sys
FROM security_tree__cResponse
Section link for Response{
"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
}
]
}