# Run a Redis transaction

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

`POST https://api.wabe.sh/v1/disks/{disk}/redis/{namespace}/multi-exec`

Execute commands as one isolated transaction.

## 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`.

## Request body

`application/json`

Example

```json
[
  [
    "SET",
    "count",
    "0"
  ],
  [
    "INCR",
    "count"
  ]
]
```

Schema

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

## Responses

### 200

One reply per command.

`application/json`

Example

```json
[
  {
    "result": "OK"
  },
  {
    "result": 1
  }
]
```

Schema

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

### 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"
  ]
}
```
