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 | { "filter": {"hospitalName": "Apollo Hospitals"} } In the |
Sample Response
{ "ok": 1, "writeErrors": [], "writeConcernErrors": [], "insertedIds": [], "nInserted": 0, "nUpserted": 0, "nMatched": 0, "nModified": 0, "nRemoved": 12, "upserted": [], "lastOp": { "ts": "7106831085601816578", "t": 443 } }
After the delete action is done, the response will have the object nRemoved
populated with the count of records that were deleted.