curl -X DELETE \
-H "QB-Token: d9c91a69e552145f6fe24dbb40b50ac575012bba" \
-d 'score_value[gt]=5000&expert_mode=true' \
https://api.quickblox.com/data/ScoreTable/by_criteria.json
{
"total_deleted": 2
}
{}
Custom Objects
Delete Records by Criteria
You can delete records by criteria.
DELETE
/
data
/
{class_name}
/
by_criteria.json
curl -X DELETE \
-H "QB-Token: d9c91a69e552145f6fe24dbb40b50ac575012bba" \
-d 'score_value[gt]=5000&expert_mode=true' \
https://api.quickblox.com/data/ScoreTable/by_criteria.json
{
"total_deleted": 2
}
{}
Recipes
Delete records by criteria with API key
Delete records by criteria with API key
1
1. Use 'Authorization' header to pass API key
curl -X DELETE \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-d 'score_value[gt]=5000&expert_mode=true' \
https://api.quickblox.com/data/ScoreTable/by_criteria.json
2
2. As a result, the API returns the number of deleted records.
{
"total_deleted": 2
}
| Operator | Description |
|---|---|
| lt | Less Than operator Types: integer, float Example: score_value[lt]=1000 |
| lte | Less Than or Equal to operator Types: integer, float Example: score_value[lte]=850 |
| gt | Greater Than operator Types: integer, float Example: bonus_count[gt]=2.45 |
| gte | Greater Than or Equal to operator Types: integer, float Example: bonus_count[gte]=56.443 |
| ne | Not Equal to operator Types: integer, float, string, boolean Example: game_mode_name[ne]=ctf |
| in | Contained IN array operator Types: integer, float, string Example: game_mode_name[in]=deathmatch,rage |
| nin | Not contained IN array operator Types: integer, float, string Example: game_mode_name[nin]=survivor,crazy_nightmare |
| all | ALL contained IN array operator Types: array Example: game_modes[all]=survivor,crazy |
| or | OR operator Types: integer, float, string Example: name[or]=sam,tim name[or]=sam&lastname[or]=johnson Will return records with name sam or tim. Will return records with name sam or last name johnson. |
| ctn | Contains substring operator Types: string Example: username[ctn]=son Will return all records where username field contains son substring. |
| near | Types: location Example: mylocation[near]=25.32,44.551;1000 Search records in a specific radius with the current position in meters. Format: {field_name}[near]=longitude,latitude;radius. |
Path Parameters
string
required
Custom object class name.
Body Parameters
string
Search records with the field that contains the specified value.
object
Show {custom_field_M} object
Show {custom_field_M} object
string
Search a record with the field that contains a value according to the specified value and operator.
Headers
string
required
A user or application session token. See Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.
string
default:"ApiKey {your_api_key}"
API key from Dashboard. Expected format:
ApiKey {your_api_key}. Must be used
either QB-Token or Authorization.string
User ID. The user ID of the user on whose behalf the request is being made.
Responses
200
200
A successful response
integer
400
400
An error response
curl -X DELETE \
-H "QB-Token: d9c91a69e552145f6fe24dbb40b50ac575012bba" \
-d 'score_value[gt]=5000&expert_mode=true' \
https://api.quickblox.com/data/ScoreTable/by_criteria.json
{
"total_deleted": 2
}
{}
Was this page helpful?