Reset Last Operation Time¶
Description¶
The Hive system maintains a timer for every key that measures the number of seconds elapsed since the last operation. This operation resets the timer to zero seconds.
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]/[bucket-type]/action/touch
where:
Argument | Description |
---|---|
[hive-name] |
Name of a hive where the operation is performed. |
[bucket-type] |
Storage type in the[hive-name] Hive where the timer is reset. 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 containing string values.
["key1", "key2", ...]
Response Body¶
The number of reset timers.
Example¶
The example below resets time since the last operation of the fruits
and vegetables
keys to 0
.
curl --location --request PUT "https://xxxx.backendless.app/api/hive/groceryStore/list/action/touch" \--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 in the store to reset time since the last operation. |
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 |
A list of key names to reset last operation time for. |
Consider the following Key Value storage:
The example below resets time since the last operation for the specified keys: