This endpoint allows deleting multiple includes in 1 API call. The method must be executed within the context of an open changeset. Depending on the size of the include list and the complexity of the referenced node this operation can take a significant amount of time.
In case the include does not exist, no change is done (obviously :) ) and the conflict is skipped gracefully.
Warning: The recommended maximum size of the array is 50. |
Warning: During the bulk deleteIncludes no other incoming changes to the same parent nodes can be applied or they will end up in blocked status.. |
Endpoint
method | DELETE |
URI | /api/v1/data/include/byMultiplePath?changeset=[changesetID] |
Headers
!
| Authorization | Bearer <userToken or APIkey> | |
! | Accept | application/vnd.siren+json | |
! | Content | Content-Type: application/json;charset=UTF-8 |
Parameters
!
| d |
[ {"include" : "environments,test01,infra,servers.server1234"}, {"include" : "environments,test01,infra,servers.server5678"} ] | provide the full path to the included node - comma separated. |
Note that the path must end with the includeName. In case the include was created through the UI then this includeName is the full path to the node that is included with . separators.
Response
The response is a JSON object of all deleted includes. In case of insufficient permissions, the response object will contain a {"AccessDeniedException"} message
example cURL
function deleteIncludeArray() { cat <<EOF [ {"include" : "environments,test01,infra,servers.server1234"}, {"include" : "environments,test01,infra,servers.server5678"} EOF } curl -X DELETE 'https://demo.sweagle.com/api/v1/data/include/byMultiplePath?changeset=1234' -H 'Accept: application/vnd.siren+json' -H "Authorization: bearer Xeb940d3-ea37-4766-bb6c-f0b83deafb6f" -H 'Content-Type: application/json;charset=UTF-8' -d "$(deleteIncludeArray)")