...
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 | DELETE
|
Headers | KEY: Content-Type
Value: application/json
|
Headers | KEY: Authorization
Value: {{Insert the Bearer token from the user login}}
|
Body | The filter object can be used to filter the data to perform the delete action. 1. To select all documents in the collection, pass an empty document as the query filter parameter Code Block |
---|
{
"filter": {}
} |
2. The following example selects from the dynamic data collection all documents where the hospitalName equals "Valley Hospitals" Code Block |
---|
{
"filter": {"hospitalName": "Apollo HospitalsValley Hospitals"}
} |
In the filter object, pass the schema field name that should be used to filter the delete action.3. The following example selects all documents from the dynamic data collection where hospitalName equals either "Valley Hospitals" or "Valley Clinic" Code Block |
---|
{
"filter": {"hospitalName": {$in:["Valley Hospitals","Valley Clinic"]}}
} |
4. The following example selects all documents in the dynamic data collection where the hospitanName equals "Valley Hospitals" and rating is less than ($lt ) 3 Code Block |
---|
{
"filter": {"hospitalName": "Valley Hospitals", "rating":{$lt: 3}}
} |
5. The following example selects all documents in the dynamic data collection where the hospitalName equals "Valley Hospitals" or rating is less than ($lt ) 3 Code Block |
---|
{
"filter": {$or:[{"hospitalName": "Valley Hospitals"},{"rating":{$lt:3}}]}
} |
6. In the following example, the compound query document selects all documents in the dynamic data collection where the hospitalName equals "Valley Hospitals" and either rating is less than ($lt ) 3 or location starts with the character p : Code Block |
---|
{
"filter": {"hospitalName": "Valley Hospitals", $or:[{"rating":{$lt: 3}},{"location": /^p/}]}
} |
|
Sample Response
Code Block |
---|
|
{
"ok": 1,
"writeErrors": [],
"writeConcernErrors": [],
"insertedIds": [],
"nInserted": 0,
"nUpserted": 0,
"nMatched": 0,
"nModified": 0,
"nRemoved": 12,
"upserted": [],
"lastOp": {
"ts": "7106831085601816578",
"t": 443
}
} |
...