> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Spaces

> Manage spaces with the AX CLI

<Note>
  The `ax spaces` commands are currently in **BETA**. The API may change without notice. A one-time warning is emitted on first use.
</Note>

The `ax spaces` commands let you create, retrieve, and manage spaces on the Arize platform.

## `ax spaces list`

List all spaces, optionally filtered by organization.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces list [--organization-id <id>] [--limit <n>] [--cursor <cursor>]
```

| Option | Description |
| - | - |
| `--organization-id` | Filter spaces by organization ID |
| `--limit`, `-l` | Maximum number of results to return (default: 15) |
| `--cursor`, `-c` | Pagination cursor for the next page |
| `--output`, `-o` | Output format (`table`, `json`, `csv`, `parquet`) or file path |
| `--verbose`, `-v` | Enable verbose logs |

**Examples:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces list
ax spaces list --organization-id org_abc123
ax spaces list --output spaces.json
```

## `ax spaces create`

Create a new space within an organization.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces create --name <name> --organization-id <id> [--description <text>]
```

| Option | Description |
| - | - |
| `--name`, `-n` | Name for the new space (prompted if omitted) |
| `--organization-id` | Organization ID to create the space in (prompted if omitted) |
| `--description` | Optional description for the space |
| `--output`, `-o` | Output format (`table`, `json`, `csv`, `parquet`) or file path |
| `--verbose`, `-v` | Enable verbose logs |

**Example:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces create --name "production" --organization-id org_abc123
ax spaces create --name "staging" --organization-id org_abc123 --description "Staging environment"
```

## `ax spaces get`

Retrieve a single space by name or ID.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces get <name-or-id>
```

| Option | Description |
| - | - |
| `--output`, `-o` | Output format (`table`, `json`, `csv`, `parquet`) or file path |
| `--verbose`, `-v` | Enable verbose logs |

**Example:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces get sp_abc123
ax spaces get "production"
```

## `ax spaces update`

Update a space's name or description. At least one of `--name` or `--description` must be provided.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces update <name-or-id> [--name <name>] [--description <text>]
```

| Option | Description |
| - | - |
| `--name`, `-n` | New name for the space |
| `--description` | New description for the space |
| `--output`, `-o` | Output format (`table`, `json`, `csv`, `parquet`) or file path |
| `--verbose`, `-v` | Enable verbose logs |

**Examples:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces update sp_abc123 --name "production-v2"
ax spaces update sp_abc123 --description "Main production environment"
ax spaces update sp_abc123 --name "prod" --description "Production"
```

## `ax spaces delete`

Delete a space and all resources within it. This operation is irreversible.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces delete <name-or-id> [--force]
```

| Option | Description |
| - | - |
| `--force`, `-f` | Skip the confirmation prompt |
| `--verbose`, `-v` | Enable verbose logs |

<Warning>
  Deleting a space permanently removes all resources that belong to it — models, monitors, dashboards, datasets, custom metrics, and experiments. Without `--force`, you will be prompted to type the space name or ID to confirm.
</Warning>

**Examples:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces delete sp_abc123 --force
ax spaces delete "production"
```

## `ax spaces add-user`

Add a user to a space, or update their role if already a member (upsert semantics). The user must already be a member of the space's parent organization.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces add-user <name-or-id> --user-id <id> --role <role>
```

| Option | Description |
| - | - |
| `--user-id` | Global ID of the user to add (prompted if omitted) |
| `--role`, `-r` | Predefined space role: `ADMIN`, `MEMBER`, `READ_ONLY`, or `ANNOTATOR` (prompted if omitted) |
| `--output`, `-o` | Output format (`table`, `json`, `csv`, `parquet`) or file path |
| `--verbose`, `-v` | Enable verbose logs |

**Example:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces add-user sp_abc123 --user-id usr_xyz789 --role MEMBER
```

## `ax spaces remove-user`

Remove a user from a space.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces remove-user <name-or-id> --user-id <id> [--force]
```

| Option | Description |
| - | - |
| `--user-id` | Global ID of the user to remove (prompted if omitted) |
| `--force`, `-f` | Skip the confirmation prompt |
| `--verbose`, `-v` | Enable verbose logs |

**Examples:**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ax spaces remove-user sp_abc123 --user-id usr_xyz789
ax spaces remove-user sp_abc123 --user-id usr_xyz789 --force
```
