Use Upstash Redis through its REST API to manage keys, hashes, lists, counters, and expiry. The Command action accepts a Redis command for operations beyond the dedicated actions.
Use the block
Connect to Upstash Redis to perform key-value, hash, list, and utility operations via the REST API.
Actions
Upstash Redis Get
Get the value of a key from Upstash Redis.
Upstash Redis Set
Set the value of a key in Upstash Redis with an optional expiration time in seconds.
Upstash Redis Delete
Delete a key from Upstash Redis.
Upstash Redis Keys
List keys matching a pattern in Upstash Redis. Defaults to listing all keys (*).
Upstash Redis Command
Execute an arbitrary Redis command against Upstash Redis. Pass the full command as a JSON array (e.g., ["HSET", "myhash", "field1", "value1"]).
Upstash Redis HSET
Set a field in a hash stored at a key in Upstash Redis.
Upstash Redis HGET
Get the value of a field in a hash stored at a key in Upstash Redis.
Upstash Redis HGETALL
Get all fields and values of a hash stored at a key in Upstash Redis.
Upstash Redis INCR
Atomically increment the integer value of a key by one in Upstash Redis. If the key does not exist, it is set to 0 before incrementing.
Upstash Redis EXPIRE
Set a timeout on a key in Upstash Redis. After the timeout, the key is deleted.
Upstash Redis TTL
Get the remaining time to live of a key in Upstash Redis. Returns -1 if the key has no expiration, -2 if the key does not exist.
Upstash Redis LPUSH
Prepend a value to the beginning of a list in Upstash Redis. Creates the list if it does not exist.
Upstash Redis LRANGE
Get a range of elements from a list in Upstash Redis. Use 0 and -1 for start and stop to get all elements.
Upstash Redis EXISTS
Check if a key exists in Upstash Redis. Returns true if the key exists, false otherwise.
Upstash Redis SETNX
Set the value of a key only if it does not already exist. Returns true if the key was set, false if it already existed.
Upstash Redis INCRBY
Increment the integer value of a key by a given amount. Use a negative value to decrement. If the key does not exist, it is set to 0 before the operation.