Skip to content

Delete Key

Description

This operation deletes a specific key and the corresponding value 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]/[key]

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 key is to be deleted. Acceptable values are list, key-value, map, set or sorted-set.
[key] Key name to delete.

Request Headers

None.

Request Body

None.

Response Body

1 if the specified key and the corresponding value are deleted. If the specified key is not deleted, then 0 is returned.

Example

The example below deletes the fruits key from the list store.

curl --location --request DELETE "https://xxxx.backendless.app/api/hive/groceryStore/list/fruits"

where:

Argument                Description
groceryStore Name of a hive where the operation is performed.
fruits Key name to delete from the store.

Codeless Reference

general_api_delete__key

where:

Argument                Description
hive name Name of a hive where the operation is performed.
type Type of the storage where to delete a key/value.
key name Key name to delete.

Returns 1 if the specified key and the corresponding value are deleted. If the operation is not successful, then 0 is returned.

Consider the following Key Value storage:

general_api_example_delete_value(s)_sample

The example below deletes the "Japan" key-value pair from the Key Value storage:

general_api_example_delete_key
The key-value storage will look as shown below after the Codeless logic runs:
general_api_example_delete_key_2