Delete Keys¶
Description¶
This operation deletes multiple keys and the corresponding values from a Hive store.
Method¶
DELETE
Endpoint URL¶
Important
Make sure to replace xxxx in the domain name in the request specification below to the one assigned to your application.
https://xxxx.backendless.app/api/hive/[hive-name]/[bucket-type]
where:
Argument | Description |
---|---|
[hive-name] |
Name of a hive where the operation is performed. |
[bucket-type] |
Specific data type in the [hive-name] Hive where the keys/values are to be deleted. Acceptable values are list , key-value , map , set or sorted-set . |
Request Headers¶
Content-Type:application/json
where:
Argument | Description |
---|---|
Content-Type |
Must be set to application/json . This header is mandatory. |
Request Body¶
The request body must be a JSON array of string values representing keys to delete.
["key1", "key2", ...]
Response Body¶
The number of deleted keys. If no keys are deleted, then 0
is returned.
Example¶
The example below deletes the "fruits"
and "vegetables"
keys from the listkey-value store.
curl --location --request DELETE "https://xxxx.backendless.app/api/hive/groceryStore/list" \--header 'Content-Type: application/json' \--data-raw '["fruits","vegetables"]'
where:
Argument | Description |
---|---|
groceryStore |
Name of a hive where the operation is performed. |
["fruits","vegetables"] |
The array of keys to delete from the store. |
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
type |
Storage type, can be one of the following: Key / Value, Sorted Set, Set, Map, List. |
keys |
An array of key names (as string values) to delete. |
Returns the number of deleted keys. If no keys are deleted, then 0
is returned.
Consider the following Key Value storage:
The example below deletes two key-value pairs from the Key Value storage.
The key-value storage will look as shown below after the Codeless logic runs: