Skip to content

Clear Key Expiration Time

Description

This operation clears a timeout associated with a key. Note that all keys are created without timeouts by default, and you can set it by invoking the "Set Key Expiration - TTL" or the "Set Key Expiration - Unix time" operations.

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]/[key]/clear-expiration

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 timeout value will be cleared for a key. Acceptable values are list, key-value, map, set or sorted-set.
[key] Key name to clear a timeout for.

Request Headers

None.

Request Body

None.

Response Body

None.

Example

The example below deletes the TTL or Unix time timeout set on the fruits key.

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

where:

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

Codeless Reference
general_api_clear_keys_expiration_time

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.
key name Key name to clear a timeout for.

Consider the following Key Value storage:

sample-key-value

The example below deletes the timeout set on the "Japan" key.

general_api_example_clear_keys_expiration_time