MyRapidi
MyRapidi

Search our Wiki

Delete Connection

Below you see an example of how to delete aconnection. Examples both in JSON and JSONAPI of.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.

JSON:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X DELETE
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/connections/2

JSONAPI:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X DELETE
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/connections/2

The output for both JSON and JSONAPI on successful deletion is that the response code Status: 204 No Content is returned.

For both JSON and JSONAPI the output when your deletion has failed (ex. connection has already been deleted / does not exist) the response code Status: 404 Not Found is returned + an error message:

Status: 404 Not Found

...

{"errors":[{"source":{"pointer":"/data/attributes/id"},"detail":"Could not find Connection with id 2"}]}