This section provides the steps for deleting an existing relationship between two objects.
HTTP responses
HTTP response status code | Interpretation |
200 OK | Relationship deleted successfully |
401 Unauthorized | Invalid or missing API key secret and/or tenant |
400 Bad Request | One or more validation errors occurred. Relationship not found. |
403 Forbidden | The user is not allowed to delete this relationship |
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 an existing relationship, make a DELETE request to the /relations/{id}
endpoint specifying:
Resource/endpoint destination URL. Replace the path parameter {id} with the ID of the relationship that you want to remove from the repository.
The header for your API request
To delete the relationship with the id
646b450cefcadb499cbbb19b
, we pass a DELETE request to the URI https://public-api.eu.bluedolphin.app/v1/relations/646b450cefcadb499cbbb19b
.
curl -L -X DELETE 'https://public-api.eu.bluedolphin.app/v1/relations/646b450cefcadb499cbbb19b' \ -H 'x-api-key: YOURAPIKEYSECRET' \ -H 'tenant: yourtenantname' \ -H 'Content-Type: application/json'
A successful call returns a response with a 200 OK
HTTP status code and the following body:
"Ok"