This endpoint allows us to assign a particular nodeType to a list of nodes with a single API call. The method must be executed within the context of an open changeset. Depending upon the size of the node list and the complexity of the nodeType structure this operation can take a significant amount of time.
Note: The recommended maximum number of nodes in a list is 50. |
Note: During the bulkAssign, the affected nodes can't accept any other incoming changes. |
Endpoint
method | POST |
URI | /api/v1/data/node/types?ids=[ids]&type=[InodeTypeID]&changeset=[ID of the open data changeset]&assignChildTypes=true |
Headers
!
| Authorization | Bearer <userToken or APIkey> | |
! | Accept | application/vnd.siren+json |
Parameters
!
| ids | 1234,1235,1236 | a comma separated list of node IDs |
!
| type | 8765 | the unique ID of the nodeType |
! | changeset | 13579 | the unique ID of a data changeset with status NEW/OPEN |
Response
The response is a JSON object of all node changes.
In case of insufficient permissions, the response object will contain a {"AccessDeniedException"} message
Example cURL
curl -X POST 'https://demo.sweagle.com/api/v1/data/node/types?ids=1234,1235,1236&type=8765&changeset=13579&assignChildTypes=true' -H 'Accept: application/vnd.siren+json' -H "Authorization: bearer Xeb940d3-ea37-4766-bb6c-f0b83deafb6f"