* Article is under review *
This article assumes you have checked the introduction and the GET request article. If not, please do so first.
To delete objects / data in the REST API, you can make a delete request for the specific object you want to delete. The delete request works similar to the GET request. In delete requests, you need to specify the ID of the object you want to delete. It is also important to add the version of the object as a query parameter called "version" in the request.
Each object has a version associated with it. This is the value from which the server keeps track of the history of the updates. If you do not specify the version, or you specify the incorrect version than the latest current version the object has on the service, the request will fail. You can see the version as a property in the object, for example: "Version": 32746687.
We advice to use a GET request and check if your request has the correct URL before deleting the object, just to double check that you are deleting the correct thing.
Example: https://lynx.a-dato.com/api/projects/123?version=123455a
Comments
0 comments
Please sign in to leave a comment.