> ## Documentation Index
> Fetch the complete documentation index at: https://alibi.itsdote.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# alibi_sdk.client

> Control plane client — generated from python/alibi_sdk source.

HTTP client for the Alibi control plane — retry + offline queue.

*Source:* [`python/alibi_sdk/alibi_sdk/client.py`](https://github.com/valid22/alibi-ai/blob/main/python/alibi_sdk/alibi_sdk/client.py)

## `ControlPlaneClient`

#### `__init__`

```python theme={null}
def __init__(base_url: str, timeout: Optional[float] = None, max_retries: Optional[int] = None, offline_queue: Optional[OfflineQueue] = None, enable_offline_queue: Optional[bool] = None) -> None
```

**Parameters**

| Name | Type |
| - | - |
| `base_url` | `str` |
| `timeout` | `Optional[float]` |
| `max_retries` | `Optional[int]` |
| `offline_queue` | `Optional[OfflineQueue]` |
| `enable_offline_queue` | `Optional[bool]` |

**Returns**

`None`

#### `flush_offline_queue`

```python theme={null}
async def flush_offline_queue(max_items: Optional[int] = None) -> FlushResult
```

**Parameters**

| Name | Type |
| - | - |
| `max_items` | `Optional[int]` |

**Returns**

`FlushResult`

#### `offline_pending`

```python theme={null}
def offline_pending() -> int
```

**Returns**

`int`

#### `start_session`

```python theme={null}
async def start_session(project_id: str, suite_id: Optional[str] = None, isolation_mode: Optional[str] = None, recorder: Optional[str] = None) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `str` |
| `suite_id` | `Optional[str]` |
| `isolation_mode` | `Optional[str]` |
| `recorder` | `Optional[str]` |

**Returns**

`dict[str, Any]`

#### `get_sandbox`

```python theme={null}
async def get_sandbox(sandbox_id: str) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `sandbox_id` | `str` |

**Returns**

`dict[str, Any]`

#### `list_sandboxes`

```python theme={null}
async def list_sandboxes(project_id: str) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `str` |

**Returns**

`dict[str, Any]`

#### `warm_pool`

```python theme={null}
async def warm_pool(project_id: str) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `str` |

**Returns**

`dict[str, Any]`

#### `reap_orphans`

```python theme={null}
async def reap_orphans(project_id: Optional[str] = None, orphan_ttl_ms: Optional[int] = None) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `Optional[str]` |
| `orphan_ttl_ms` | `Optional[int]` |

**Returns**

`dict[str, Any]`

#### `upload_step`

```python theme={null}
async def upload_step(session_id: str, step: dict[str, Any]) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `session_id` | `str` |
| `step` | `dict[str, Any]` |

**Returns**

`dict[str, Any]`

#### `stop_session`

```python theme={null}
async def stop_session(session_id: str) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `session_id` | `str` |

**Returns**

`dict[str, Any]`

#### `save_case`

```python theme={null}
async def save_case(session_id: str, name: str, suite_id: Optional[str] = None, tags: Optional[list[str]] = None) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `session_id` | `str` |
| `name` | `str` |
| `suite_id` | `Optional[str]` |
| `tags` | `Optional[list[str]]` |

**Returns**

`dict[str, Any]`

#### `get_case`

```python theme={null}
async def get_case(case_id: str) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `case_id` | `str` |

**Returns**

`dict[str, Any]`

#### `get_active_baseline`

```python theme={null}
async def get_active_baseline(project_id: str) -> Optional[dict[str, Any]]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `str` |

**Returns**

`Optional[dict[str, Any]]`

#### `capture_baseline`

```python theme={null}
async def capture_baseline(project_id: str, label: Optional[str] = None, schema_fingerprint: Optional[str] = None, storage_refs: Optional[dict[str, Any]] = None, snapshot: Optional[dict[str, Any]] = None) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `str` |
| `label` | `Optional[str]` |
| `schema_fingerprint` | `Optional[str]` |
| `storage_refs` | `Optional[dict[str, Any]]` |
| `snapshot` | `Optional[dict[str, Any]]` |

**Returns**

`dict[str, Any]`

#### `start_run`

```python theme={null}
async def start_run(project_id: str, case_id: str, baseline_version: Optional[int] = None) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `project_id` | `str` |
| `case_id` | `str` |
| `baseline_version` | `Optional[int]` |

**Returns**

`dict[str, Any]`

#### `report_step_result`

```python theme={null}
async def report_step_result(run_id: str, result: dict[str, Any]) -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `run_id` | `str` |
| `result` | `dict[str, Any]` |

**Returns**

`dict[str, Any]`

#### `finish_run`

```python theme={null}
async def finish_run(run_id: str, status: str = 'passed') -> dict[str, Any]
```

**Parameters**

| Name | Type |
| - | - |
| `run_id` | `str` |
| `status` | `str` |

**Returns**

`dict[str, Any]`

#### `health`

```python theme={null}
async def health() -> dict[str, Any]
```

**Returns**

`dict[str, Any]`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.