# Run a Redis command

Source: https://docs.wabe.sh/api-reference/operations/putrediscommand/

`PUT https://api.wabe.sh/v1/disks/{disk}/redis/{namespace}`

## Authorization

Project API key from the Wabe Dashboard or actor runtime access token for the disk URL supplied by the broker.

## Parameters

- `disk` (path, string, required) — Project disk name, or the disk ID in the actor runtime disk URL.

- `namespace` (path, string, required) — Namespace on this disk.

- `Upstash-Encoding` (header, string) — Encoding for byte-string replies. Allowed values: `json`, `base64`.

- `Upstash-Response-Format` (header, string) — Reply format. RESP2 requires the default encoding. Allowed values: `json`, `resp2`.

## Request body

`application/json`

Example

```json
[
  "SET",
  "greeting",
  "Hello"
]
```

Schema

```json
{
  "type": "array",
  "minItems": 1,
  "items": {
    "oneOf": [
      {
        "type": "string"
      },
      {
        "type": "number"
      },
      {
        "type": "boolean"
      }
    ]
  },
  "description": "Redis command name followed by positional arguments."
}
```

## Responses

### 200

Command reply.

`application/json`

Example

```json
{
  "result": "OK"
}
```

Schema

```json
{
  "type": "object",
  "properties": {
    "result": {},
    "error": {
      "type": "string"
    }
  },
  "description": "One result or error envelope. Pipeline/multi return an array of these."
}
```

`application/octet-stream`

Schema

```json
{
  "type": "string",
  "format": "binary"
}
```

### 400

Invalid command, arguments, request shape or encoding.

`application/json`

Schema

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "result": {},
        "error": {
          "type": "string"
        }
      },
      "description": "One result or error envelope. Pipeline/multi return an array of these."
    },
    {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "result": {},
          "error": {
            "type": "string"
          }
        },
        "description": "One result or error envelope. Pipeline/multi return an array of these."
      }
    }
  ]
}
```

### 401

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

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 403

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

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 404

Disk not found in this project.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 413

wabe Disk request or response limit exceeded.

`application/json`

Schema

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "result": {},
        "error": {
          "type": "string"
        }
      },
      "description": "One result or error envelope. Pipeline/multi return an array of these."
    },
    {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "result": {},
          "error": {
            "type": "string"
          }
        },
        "description": "One result or error envelope. Pipeline/multi return an array of these."
      }
    }
  ]
}
```

### 500

Storage failure.

`application/json`

Schema

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "result": {},
        "error": {
          "type": "string"
        }
      },
      "description": "One result or error envelope. Pipeline/multi return an array of these."
    },
    {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "result": {},
          "error": {
            "type": "string"
          }
        },
        "description": "One result or error envelope. Pipeline/multi return an array of these."
      }
    }
  ]
}
```

### 503

Disk unavailable.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```
