Delete Values¶
Description¶
This operation deletes specific elements from the set.
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]/set/[key]/values
where:
Argument | Description |
---|---|
[hive-name] |
Name of a hive where the operation is performed. |
[key] |
Key name identifying a 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 an array containing JSON values.
["value1", 1, "bob", 1.99, true ...]
Response Body¶
The number of deleted items. Otherwise, returns 0
if the specified values do not exist.
Example¶
Delete Multiple Values
The example below deletes the "Sedan"
and "Crossover"
items from the cars
set.
curl --location --request DELETE "https://xxxx.backendless.app/api/hive/transport/set/cars/values" \--header 'Content-Type: application/json' \--data-raw '["Sedan", "Crossover"]'
where:
Argument | Description |
---|---|
transport |
Name of a hive where the operation is performed. |
cars |
Key name identifying a set. |
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key name |
Key name identifying a set. |
items |
A list of items that must be deleted from the set. |
Returns the number of deleted values.
Consider the following Set storage:
The example below deletes two items "Sedan"
and "Crossover"
from the "cars"
set:
The set will look as shown below after the Codeless logic runs: