MyRapidi
MyRapidi

Search our Wiki

REST API RTI Delete RTI

Below you see an example of how to delete RTI entries. Examples both in JSON and JSONAPI are provided.

Please note:To be able to determine which group to delete, you need to run 'Get groups' in order to know the ID.

The group id you then place at the end of the url.

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]/rtis/51

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]/rtis/51

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

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

Status: 404 Not Found

...

{"errors":[{"source":{"pointer":"/data/attributes/id"},"detail":"not found - could not find Rti with id 51"}]}