<turbo-stream action="update" target="wiki_3611_3686_subpage_3694_info"><template>
<p>Below you see an example of how to delete RTI entries. Examples both in JSON and JSONAPI are provided.</p>
<p><strong>Please note:</strong>To be able to determine which group to delete, you need to run 'Get groups' in order to know the ID.</p>
<p>The group id you then place at the end of the url.</p>
<p>NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.</p>
<p></p><h2>JSON:</h2><p></p>
<pre class="card">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
</pre>
<p></p><h2>JSONAPI:</h2><p></p>
<pre class="card">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
</pre>
<p>The output for both JSON and JSONAPI on successful deletion the response code <code>Status: 204 No Content</code> is returned.</p>
<p>For both JSON and JSONAPI the output when your deletion has failed (ex. group as already been deleted / doesn't exist) the response code <code>Status: 404 Not Found</code> is returned + an error message:</p>
<pre class="card">Status: 404 Not Found

...

{"errors":[{"source":{"pointer":"/data/attributes/id"},"detail":"not found - could not find Rti with id 51"}]}
</pre>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
