Auto generated schema based 'Remove by query' API used POST request method. Here, give some examples and references.
Sample data
customer_id | first_name | last_name | last_update | pincode | isActive |
---|---|---|---|---|---|
1 | Bob | lin | 2022-11-14 04: 34: 58 | 382345 | 1 |
2 | Alice | Page | 2022-10-15 02: 10: 40 | 382346 | 1 |
3 | Mallory | Brown | 2022-09-13 03: 44: 05 | 382347 | 1 |
4 | Eve | Mathly | 2022-11-12 01: 59: 33 | 382348 | 1 |
5 | Eve | Page | 2022-11-12 01: 59: 33 | 382349 | 1 |
URL
/api/schema/user-path/instance/database/table/query/delete
Request Payload
{
"find": {
"first_name": "Bob"
}
}
$in with select, limit, deep
Request Payload
{
"find": {
"first_name": {
"$in": [
"Bob"
]
}
},
"select": "name,description",
"limit": 1,
"deep": [
{
"s_key": "customer_id",
"t_col": "products",
"t_key": "owner_id"
}
]
}
string | number supports different datatype
- 'pincode' datatype is a number, but we pass it as a string in the payload. Yet, it will delete.
Request Payload
{
"find": {
"pincode": "382330"
}
}
'$nin' not in
Request Payload
{
"find": {
"first_name": {
"$nin": [
"Bob",
"Alice"
]
}
}
}
$eq
Request Payload
{
"find": {
"customer_id": {
"$eq": 19
}
}
}
$ne
Request Payload
{
"find": {
"customer_id": {
"$ne": 19
}
}
}
$lt
Request Payload
{
"find": {
"customer_id": {
"$lt": 19
}
}
}
$lte
Request Payload
{
"find": {
"customer_id": {
"$lte": 19
}
}
}
$gt
Request Payload
{
"find": {
"customer_id": {
"$gt": 19
}
}
}
$gte
Request Payload
{
"find": {
"customer_id": {
"$gte": 19
}
}
}
$and
Request Payload
{
"find": {
"$and": [
{
"customer_id": {
"$lte": 15
}
},
{
"first_name": "Bob"
}
]
}
}
$or
Request Payload
{
"find": {
"$or": [
{
"customer_id": 155
},
{
"first_name": "Bob"
}
]
}
}
To get more information about API Maker APIs please refer API Maker documentation.
API Maker 'remove by query' API documentation.
API Maker array operation API video.
Websites
https://apimaker.dev
Register and experience API Maker
https://cloud.apimaker.dev
Follow on twitter
https://twitter.com/api_maker
Linked In
https://www.linkedin.com/company/api-maker
API Maker Youtube channel
https://www.youtube.com/@api_maker
Top comments (0)