Increment¶
Description¶
This operation increments the key's value by a specific number.
Method¶
PUT
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]/key-value/[key]/increment?value=[increment-by]
where:
Argument | Description |
---|---|
[hive-name] |
Name of a hive where the operation is performed. |
[key] |
Key name identifying a key-value pair. |
[increment-by] |
A number to increment the value by. |
Request Headers¶
None.
Request Body¶
None.
Response Body¶
Тhe incremented value.
Example¶
The example below increments the value associated with the key John
by 2
.
curl --location --request PUT "https://xxxx.backendless.app/api/hive/workedHours/key-value/John/increment?value=2"
where:
Argument | Description |
---|---|
workedHours |
Name of a hive where the operation is performed. |
John |
Key name to increment the associated value by 2 . |
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key name |
Key name identifying a key-value pair. |
increment by |
Specify a number to increment the value by. |
Returns the incremented value.
Consider the following Key Value storage:
The example below increments the value for the "Apples"
key by 2
:
The key-value storage will look as shown below after the Codeless logic runs: