We have seen deleting data using the REST API in the previous post.
As you know, data can be deleted using the
DELETE method. Here, we will just change the endpoint to delete the data. Instead of
hypi.id, we will use arcql statement to select the records to be deleted.
rest/v1/ is appended with the
clearArrayReferences value and arcql statement to select the records to be deleted. Here, our data type is
arcql=height=5.5 is the arcql statement. Replace these two values with your own data type and hypi.id values.
Again, we are passing
[clearArrayReferences](https://docs.hypi.app/docs/delete-data#delete) as a query parameter. If you are using one-to-many references, you will not be able to delete data without unlinking the references. In that case, set
clearArrayReferences to true. By default, you can keep the value
Here is the sample
curl --location --request DELETE 'https://api.staging.hypi.dev/rest/v1/StudentMedicalRecord?clearArrayReferences=false&arcql=height=5.5' \ --header 'hypi-domain: inclemency.apps.hypi.app' \ --header 'content-type: application/json' \ --header 'authorization: Auth_Key'
***Replace url, hypi-domain, authorization with your own set of values.
Delete Data with DELETE (using ArcQL filter) POSTMAN collection for the data deletion request in different programming languages! Click
</> and choose the programming language of your choice.