Skip to content
View Markdown

Run a Redis command

POST/v1/disks/{disk}/redis/{namespace}
POST
/v1/disks/{disk}/redis/{namespace}
curl --request POST \
--url https://api.wabe.sh/v1/disks/demo/redis/app \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Upstash-Encoding: json' \
--header 'Upstash-Response-Format: json' \
--data '[ "SET", "greeting", "Hello" ]'
disk
required
string
/^[A-Za-z0-9_-]{1,128}$/

Example

demo

Project disk name, or the disk ID in the actor runtime disk URL.

namespace
required
string
/^[A-Za-z0-9_-]{1,128}$/

Example

app

Namespace on this disk.

Upstash-Encoding
string
default: json
Allowed values: json base64

Encoding for byte-string replies.

Upstash-Response-Format
string
default: json
Allowed values: json resp2

Reply format. RESP2 requires the default encoding.

Media typeapplication/json

Redis command name followed by positional arguments.

Array
>= 1 items

Example

[
"SET",
"greeting",
"Hello"
]

Command reply.

One result or error envelope. Pipeline/multi return an array of these.

object
result
error
string

Example

{
"result": "OK"
}

Invalid command, arguments, request shape or encoding.

Media typeapplication/json
One of:

One result or error envelope. Pipeline/multi return an array of these.

object
result
error
string

Missing, invalid or revoked project API key, or an invalid runtime access token.

Media typeapplication/json
object
error
required
string
message
required
string

Actor runtime token does not authorize this disk or instance generation.

Media typeapplication/json
object
error
required
string
message
required
string

Disk not found in this project.

Media typeapplication/json
object
error
required
string
message
required
string

Wabe Disk request or response limit exceeded.

Media typeapplication/json
One of:

One result or error envelope. Pipeline/multi return an array of these.

object
result
error
string

Storage failure.

Media typeapplication/json
One of:

One result or error envelope. Pipeline/multi return an array of these.

object
result
error
string

Disk unavailable.

Media typeapplication/json
object
error
required
string
message
required
string