How to bulk delete content using API?
This document will define steps to delete the contents of a schema by using the API directly. Postman application is used here to trigger the API endpoint.
Please frame the endpoint to hit the delete action.
Endpoint URL: {{domainURL}}/api/schema/{{schema_keyValue}}/data?projectId={{projectID}}
Sample endpoint: https://example.orbita-eng.cloud:8443/api/schema/sampleschema/data?projectId=628e1ced1fc9c700730133d4
The schema key value can be viewed on the Schema page
Postman application steps
Use the Postman application for hitting the endpoint. Please refer to the following parameters that you will need.
Parameter | Value |
---|---|
Method |
|
Headers |
|
Headers |
|
Body | The 1. To select all documents in the collection, pass an empty document as the query filter parameter {
    "filter": {}
} Â 2. The following example selects from the dynamic data collection all documents where the {
    "filter": {"hospitalName": "Valley Hospitals"}
} Â 3. The following example selects all documents from the dynamic data collection where {
    "filter": {"hospitalName": {$in:["Valley Hospitals","Valley Clinic"]}}
}  4. The following example selects all documents in the dynamic data collection where the  5. The following example selects all documents in the dynamic data collection where the  6. In the following example, the compound query document selects all documents in the dynamic data collection where the |
Â
Â
Sample Response
After the delete action is done, the response will have the object nRemoved
populated with the count of records that were deleted.