> ## 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-node/client

> Control plane client — generated from packages/sdk-node/src/client.ts.

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

*Source:* [`packages/sdk-node/src/client.ts`](https://github.com/valid22/alibi-ai/blob/main/packages/sdk-node/src/client.ts)

## `ControlPlaneClient`

### `baseUrl`

```ts theme={null}
baseUrl: string
```

### `timeoutMs`

```ts theme={null}
timeoutMs: number
```

### `maxRetries`

```ts theme={null}
maxRetries: number
```

### `constructor`

```ts theme={null}
constructor(
    baseUrl: string,
    opts?: {
      timeoutMs?: number;
      maxRetries?: number;
      offlineQueue?: OfflineQueue;
      enableOfflineQueue?: boolean;
    },
  )
```

**Parameters**

| Name | Type |
| - | - |
| `baseUrl` | `string` |
| `opts` | `\{ timeoutMs?: number; maxRetries?: number; offlineQueue?: OfflineQueue; enableOfflineQueue?: boolean; \}` |

### `rawRequest`

```ts theme={null}
async rawRequest(
    method: string,
    path: string,
    opts?: { json?: unknown; params?: Record<string, string> },
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `method` | `string` |
| `path` | `string` |
| `opts` | `\{ json?: unknown; params?: Record<string, string> \}` |

### `request`

```ts theme={null}
async request(
    method: string,
    path: string,
    opts?: {
      json?: unknown;
      params?: Record<string, string>;
      queueable?: boolean;
    },
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `method` | `string` |
| `path` | `string` |
| `opts` | `\{ json?: unknown; params?: Record<string, string>; queueable?: boolean; \}` |

### `flushQueue`

```ts theme={null}
flushQueue(opts?: { maxItems?: number }): Promise<FlushResult>
```

**Parameters**

| Name | Type |
| - | - |
| `opts` | `\{ maxItems?: number \}` |

### `startSession`

```ts theme={null}
startSession(
    projectId: string,
    body?: {
      suiteId?: string;
      isolationMode?: string;
      recorder?: string;
    },
  ): Promise<Record<string, unknown>>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |
| `body` | `\{ suiteId?: string; isolationMode?: string; recorder?: string; \}` |

### `getSandbox`

```ts theme={null}
getSandbox(sandboxId: string): Promise<Record<string, unknown>>
```

**Parameters**

| Name | Type |
| - | - |
| `sandboxId` | `string` |

### `listSandboxes`

```ts theme={null}
listSandboxes(projectId: string): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |

### `warmPool`

```ts theme={null}
warmPool(projectId: string): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |

### `reapOrphans`

```ts theme={null}
reapOrphans(
    projectId?: string,
    body?: { orphanTtlMs?: number },
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |
| `body` | `\{ orphanTtlMs?: number \}` |

### `uploadStep`

```ts theme={null}
uploadStep(
    sessionId: string,
    step: Record<string, unknown>,
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `sessionId` | `string` |
| `step` | `Record<string, unknown>` |

### `stopSession`

```ts theme={null}
stopSession(sessionId: string): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `sessionId` | `string` |

### `saveCase`

```ts theme={null}
saveCase(
    sessionId: string,
    body: { name: string; suiteId?: string; tags?: string[] },
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `sessionId` | `string` |
| `body` | `\{ name: string; suiteId?: string; tags?: string[] \}` |

### `getCase`

```ts theme={null}
getCase(caseId: string): Promise<Record<string, unknown>>
```

**Parameters**

| Name | Type |
| - | - |
| `caseId` | `string` |

### `getActiveBaseline`

```ts theme={null}
async getActiveBaseline(
    projectId: string,
  ): Promise<Record<string, unknown> | null>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |

### `captureBaseline`

```ts theme={null}
captureBaseline(
    projectId: string,
    body: {
      label?: string;
      schemaFingerprint?: string;
      storageRefs?: Record<string, unknown>;
      snapshot?: Record<string, unknown>;
    },
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |
| `body` | `\{ label?: string; schemaFingerprint?: string; storageRefs?: Record<string, unknown>; snapshot?: Record<string, unknown>; \}` |

### `startRun`

```ts theme={null}
startRun(
    projectId: string,
    body: { caseId: string; baselineVersion?: number },
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `projectId` | `string` |
| `body` | `\{ caseId: string; baselineVersion?: number \}` |

### `reportStepResult`

```ts theme={null}
reportStepResult(
    runId: string,
    result: Record<string, unknown>,
  ): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `runId` | `string` |
| `result` | `Record<string, unknown>` |

### `finishRun`

```ts theme={null}
finishRun(runId: string, status = "passed"): Promise<unknown>
```

**Parameters**

| Name | Type |
| - | - |
| `runId` | `string` |
| `status = "passed"` | `—` |

### `health`

```ts theme={null}
health(): Promise<unknown>
```


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