Bulk Update Node Order
Given multiple EDL parent nodes, update the order of each set of children.
PUT
/api/{version}/composites/trees/{object_name}/batchHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json (default) or text/csv |
Accept | application/json (default) or application/xml or text/csv |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
object_name | The name of the corresponding hierarchy-enabled object for which to update the node order in bulk. For example, edl__v, edl_item__v, or edl_template__v. |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
idParamoptional | To identify nodes in your input by a unique field on the corresponding record, add idParam={field_name} to the request endpoint. You can use any record field that has unique set to true in the record metadata. For example, idParam=external_id__v. If idParam is included, parent_id and id are not required in the request body. |
Body Parameters
Section link for Body ParametersExpressed as a JSON or a CSV.
| Name | Description |
|---|---|
parent_idconditional | The parent node ID from the veeva_hierarchy_node table. Not required if idParam is included. If idParam is included, add parent_{field} as a unique field on the corresponding record instead. |
idconditional | The node ID from the veeva_hierarchy_node table. Not required if idParam is included. If idParam is included, add {field} as a unique field on the corresponding record instead. |
order__vrequired | An integer specifying the sibling ordering. This is indexed at 1. |
{field_name}conditional | The unique field name to use instead of the id. You must also add the idParam query parameter, such as idParam=external_id__v. |
parent_{field}conditional | The unique field name on the corresponding parent record to use instead of the parent_id. This field name should match the input of the idParam query parameter with a parent_ prefix. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/json" \
-d '{"parent_id": "0000000000000AYI", "id": "0000000000000JLL","order": "2"}'
https://myvault.veevavault.com/api/v26.2/composites/trees/edl_hierarchy__v/batchResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"data": {
"parent_id": "0000000000000AYI",
"id": "0000000000000JLL",
"order__v": 1
}
}
]
}