This section provides the steps for deleting multiple relationships between objects from the repository.
HTTP responses
HTTP response status code | Interpretation |
200 OK | Relationships deleted successfully |
206 Partial Content | Some relationships do not exist or are already archived. When all deletions fail, a 206 is still returned. |
401 Unauthorized | Invalid or missing API key secret and/or tenant |
Conditions
A relationship can only be deleted if its status is:
2 - Accepted
A relationship cannot be deleted if its status is one of the following:
0 - Unknown
1 - Proposed
3 - Declined
4 - Disabled
5 - Archived
To delete existing relationships, make a DELETE request to the /relations
endpoint specifying:
Resource/endpoint destination URL
The header for your API request
The request body, which must contain a string with the list of relationship IDs that you want to have removed from the repository.
To delete two relationships with the IDs 64708b07e4a52d2e25e8e633
and 6470ca4df3933bf99b216337
, we pass the DELETE request to the URI https://public-api.eu.bluedolphin.app/v1/relations
.
curl -L -X DELETE 'https://public-api.eu.bluedolphin.app/v1/relations' \ -H 'x-api-key: YOURAPIKEYSECRET' \ -H 'tenant: yourtenantname' \ -H 'Content-Type: application/json' \ -d '{ "relation_ids": ["64708b07e4a52d2e25e8e633", "6470ca4df3933bf99b216337"] }'
A successful call returns a response with a 200 OK
HTTP status code and the following body:
"OK"