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

# Metabase API reference

> API reference for the Metabase plugin in Corsair: every `metabase.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Action

### get

`action.get`

Returns the actions the current user can read, unarchived unless `?archived=true`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.action.get({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   model-id?: number | null,
>   type?: implicit | query | null,
>   archived?: boolean
> }
> ```

**Output:** `JsonValue[]`

***

### getByActionId

`action.getByActionId`

Fetch an Action.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.action.getByActionId({ "path": { "action-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   action-id: number
> }
> ```

**Output:** `JsonValue`

***

### getPublic

`action.getPublic`

Fetch a list of Actions with public UUIDs.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.action.getPublic({  });
```

**Input:** *empty object*

**Output:** `JsonValue[]`

***

### post

`action.post`

Create a new action.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.action.post({ "body": { "name": "", "type": "implicit" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue` | No | — |

**Output:** `JsonValue`

***

### postByActionIdExecuteValues

`action.postByActionIdExecuteValues`

Fetches the values for filling in execution parameters.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.action.postByActionIdExecuteValues({ "path": { "action-id": 1 }, "body": { "parameters": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   action-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   parameters: Record<string, string | number | boolean | null>
> }
> ```

**Output:** `Record<string, JsonValue>`

***

### postExecute

`action.postExecute`

Execute the ad-hoc `action`, without saving it.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.action.postExecute({ "body": { "action": { "name": "", "type": "implicit" } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   action: JsonValue,
>   parameters?: Record<string, string | number | boolean | null | (string | number | boolean | null)[]> | null
> }
> ```

**Output:** `Record<string, JsonValue>`

***

## Agent

### getV1Ping

`agent.getV1Ping`

Health check endpoint for the Agent API.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.getV1Ping({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | — |

***

### postV1Collection

`agent.postV1Collection`

Create a new Collection.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.postV1Collection({ "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name: string,
>   parent_collection_id?: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `location` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `parent_id` | `number \| null \| null` | No | — |

***

### postV1ConstructNativeQuery

`agent.postV1ConstructNativeQuery`

Construct a native (raw SQL) query against a database.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV1ConstructNativeQuery({ "body": { "database_id": 1, "sql": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_id: number,
>   sql: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `prompt` | `string \| null \| null` | No | — |
| `query` | `string \| null` | No | — |

***

### postV1Dashboard

`agent.postV1Dashboard`

Create a new dashboard, optionally populated with saved questions.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.postV1Dashboard({ "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collection_id?: number | null,
>   description?: string | null,
>   name: string,
>   question_ids?: number[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `collection_id` | `number \| null \| null` | No | — |
| `collection_path` | `string \| null` | No | — |
| `dashcard_ids` | `number[] \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `tabs` | `object[] \| null` | No | — |
| `url` | `string \| null` | No | — |

> [accordion] tabs full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null
> }[] | null
> ```

***

### postV1Execute

`agent.postV1Execute`

Execute an MBQL query and return results.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV1Execute({ "body": { "query": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   query: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |
| `error` | `string \| null` | No | — |
| `row_count` | `number \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   cols?: {
>     base_type?: string | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     name?: string | null
>   }[] | null,
>   rows?: JsonValue[][] | null
> } | null
> ```

***

### postV1ExecuteSql

`agent.postV1ExecuteSql`

Execute a raw SQL query against a database.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.agent.postV1ExecuteSql({ "body": { "database_id": 1, "sql": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_id: number,
>   sql: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |
| `error` | `string \| null` | No | — |
| `row_count` | `number \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   cols?: {
>     base_type?: string | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     name?: string | null
>   }[] | null,
>   rows?: JsonValue[][] | null
> } | null
> ```

***

### postV1Metric

`agent.postV1Metric`

Save a previously constructed query as a named metric.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.postV1Metric({ "body": { "name": "a", "query": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collection_id?: number | null,
>   description?: string | null,
>   display?: table | bar | line | pie | scatter | area | row | combo | pivot | scalar | smartscalar | gauge | progress | funnel | map | waterfall | sankey | null,
>   name: string,
>   query: string,
>   visualization_settings?: Record<string, JsonValue> | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `collection_id` | `number \| null \| null` | No | — |
| `collection_path` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `display` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### postV1Question

`agent.postV1Question`

Save a previously constructed query as a named question (card).

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.postV1Question({ "body": { "name": "a", "query": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collection_id?: number | null,
>   description?: string | null,
>   display?: table | bar | line | pie | scatter | area | row | combo | pivot | scalar | smartscalar | gauge | progress | funnel | map | waterfall | sankey | null,
>   name: string,
>   query: string,
>   visualization_settings?: Record<string, JsonValue> | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `collection_id` | `number \| null \| null` | No | — |
| `collection_path` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `display` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### postV1QuestionByIdQuery

`agent.postV1QuestionByIdQuery`

Run a saved question (card) and return its results.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV1QuestionByIdQuery({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |
| `error` | `string \| null` | No | — |
| `row_count` | `number \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   cols?: {
>     base_type?: string | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     name?: string | null
>   }[] | null,
>   rows?: JsonValue[][] | null
> } | null
> ```

***

### postV1ReadResource

`agent.postV1ReadResource`

Read one or more Metabase resources via metabase:// URI patterns.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV1ReadResource({ "body": { "uris": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   uris: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `output` | `string \| null` | No | — |
| `resources` | `object[] \| null` | No | — |

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   content?: JsonValue | null,
>   error?: string | null | null,
>   uri?: string | null
> }[] | null
> ```

***

### postV1Search

`agent.postV1Search`

Search for tables, models, metrics, saved questions, dashboards, and collections.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV1Search({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   semantic_queries?: string[] | string | null,
>   term_queries?: string[] | string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `total_count` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   collection?: Record<string, JsonValue> | null | null,
>   id?: number | null,
>   name?: string | null,
>   verified?: boolean | null | null,
>   location?: string | null | null,
>   database_id?: number | null | null,
>   updated_at?: string | null | null,
>   display_name?: string | null | null,
>   type?: table | metric | model | question | dashboard | collection | null,
>   official?: boolean | null | null,
>   database_schema?: string | null | null,
>   created_at?: string | null | null,
>   description?: string | null | null
> }[] | null
> ```

***

### postV2ConstructQuery

`agent.postV2ConstructQuery`

Construct an MBQL query from a portable MBQL 5 representations JSON payload.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV2ConstructQuery({ "body": { "query": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   prompt?: string | null,
>   query: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `prompt` | `string \| null \| null` | No | — |
| `query` | `string \| null` | No | — |

***

### postV2Query

`agent.postV2Query`

Execute a portable MBQL 5 representations JSON query and stream the results, with continuation-token pagination.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.agent.postV2Query({ "body": { "continuation_token": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   continuation_token: string
> } | {
>   query: string
> } | {
>   prompt?: string | null,
>   query: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `continuation_token` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `error` | `string \| null` | No | — |
| `row_count` | `number \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   cols?: {
>     base_type?: string | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     name?: string | null
>   }[] | null,
>   rows?: JsonValue[][] | null
> } | null
> ```

***

### putV1DashboardById

`agent.putV1DashboardById`

Update a dashboard.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.putV1DashboardById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   collection_id?: number | null,
>   dashcards?: (
>     {
>       action: add,
>       card_id: number,
>       display_size?: wide | tall | full | null,
>       tab_id?: number | null
>     } | {
>       action: add_heading,
>       display_size?: null,
>       tab_id?: number | null,
>       text: string
>     } | {
>       action: add_text,
>       display_size?: wide | tall | full | null,
>       tab_id?: number | null,
>       text: string
>     } | {
>       action: update_text,
>       dashcard_id: number,
>       text: string
>     } | {
>       action: remove,
>       dashcard_id: number
>     } | {
>       action: move,
>       dashcard_id: number,
>       position: top | bottom
>     }
>   )[] | null,
>   description?: string | null,
>   name?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `archived` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `collection_path` | `string \| null` | No | — |
| `dashcard_ids` | `number[] \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `tabs` | `object[] \| null` | No | — |

> [accordion] tabs full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null
> }[] | null
> ```

***

### putV1MetricById

`agent.putV1MetricById`

Update a saved metric.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.putV1MetricById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   collection_id?: number | null,
>   description?: string | null,
>   display?: table | bar | line | pie | scatter | area | row | combo | pivot | scalar | smartscalar | gauge | progress | funnel | map | waterfall | sankey | null,
>   name?: string | null,
>   query?: string | null,
>   visualization_settings?: Record<string, JsonValue> | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `archived` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `collection_path` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `display` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |

***

### putV1QuestionById

`agent.putV1QuestionById`

Update a saved question (card).

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.agent.putV1QuestionById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   collection_id?: number | null,
>   description?: string | null,
>   display?: table | bar | line | pie | scatter | area | row | combo | pivot | scalar | smartscalar | gauge | progress | funnel | map | waterfall | sankey | null,
>   name?: string | null,
>   query?: string | null,
>   visualization_settings?: Record<string, JsonValue> | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `archived` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `collection_path` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `display` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |

***

## Analytics

### postInternal

`analytics.postInternal`

Receive a batch of internal analytics events from the frontend and record them as Prometheus metrics.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.analytics.postInternal({ "body": { "events": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   events: {
>     amount?: number | null,
>     labels?: Record<string, string> | null,
>     metric: string,
>     op: inc
>   }[]
> }
> ```

**Output:** `null`

***

## Api Key

### putByIdRegenerate

`apiKey.putByIdRegenerate`

Regenerate an API Key

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.apiKey.putByIdRegenerate({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

The OpenAPI pattern `^mb_.*{4}\*+$` is invalid ECMAScript. Metabase's schema description says masked values start with `mb_` and end in asterisks; the plugin validates that documented shape.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `masked_key` | `string & string \| null` | No | — |
| `prefix` | `string \| null` | No | — |
| `unmasked_key` | `string \| null` | No | — |

***

## Cache

### delete

`cache.delete`

Delete cache configurations.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.cache.delete({ "body": { "model": "root", "model_id": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   model: root | database | dashboard | question,
>   model_id: number[]
> }
> ```

**Output:** `null`

***

### get

`cache.get`

Return cache configuration.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.cache.get({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   model?: (root | database | dashboard | question)[],
>   collection?: number | null,
>   id?: number | null,
>   sort_column?: name | policy | collection,
>   sort_direction?: asc | desc
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   collection?: {
>     authority_level?: string | null | null,
>     id?: number | null,
>     name?: string | null | null,
>     type?: string | null | null
>   } | null | null,
>   model?: root | database | dashboard | question | null,
>   model_id?: number | null,
>   name?: string | null | null,
>   strategy?: {
>     type?: string | null
>   } | null
> }[] | null
> ```

***

### postInvalidate

`cache.postInvalidate`

Invalidate cache entries.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.cache.postInvalidate({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include?: overrides | null,
>   database?: number[] | null,
>   dashboard?: number[] | null,
>   question?: number[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### put

`cache.put`

Store cache configuration.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.cache.put({ "body": { "model": "root", "model_id": 0, "strategy": { "type": "nocache" } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   model: root | database | dashboard | question,
>   model_id: number,
>   strategy: JsonValue | {
>     name?: string | null,
>     type: nocache
>   } | {
>     min_duration_ms: number,
>     multiplier: number,
>     type: ttl
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |

***

## Collection Permissions

### graph.get

`collectionPermissions.graph.get`

Read collection permission graph

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collectionPermissions.graph.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   namespace?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `groups` | `Record<string, Record<string, write \| read \| none>>` | Yes | — |
| `revision` | `number \| null` | No | — |

***

### graph.update

`collectionPermissions.graph.update`

Replace collection permission graph entries

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.collectionPermissions.graph.update({
	body: {
		groups: {
			2: { 8: 'read' },
		},
		revision: 1,
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |
| `body` | `object` | Yes | — |

The permission-graph update can overwrite supplied entries. force=true persists the supplied graph without a revision check and can overwrite concurrent updates; the operation is marked destructive.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   force?: boolean | null,
>   skip-graph?: boolean | null
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   groups: Record<string, Record<string, write | read | none>>,
>   namespace?: string | null,
>   revision?: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `revision` | `number \| null` | No | — |

***

## Collections

### candidates.list

`collections.candidates.list`

List collection questions eligible to move into dashboards

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.candidates.list({
	path: { id: 8 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `total` | `number` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   description: string | null,
>   id: number,
>   name: string,
>   sole_dashboard_info: {
>     description: string | null,
>     id: number,
>     name: string
>   }
> }[]
> ```

***

### candidates.move

`collections.candidates.move`

Move eligible collection questions into their dashboards

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.collections.candidates.move({
	path: { id: 8 },
	body: {
		card_ids: [15],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object \| null` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   card_ids?: number[]
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `moved` | `number[]` | Yes | — |

***

### create

`collections.create`

Create a Metabase collection

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.collections.create({
	body: { name: 'Analytics' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   authority_level?: official | null,
>   description?: string | null,
>   name: string,
>   namespace?: string | null,
>   parent_id?: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `name` | `string` | Yes | — |

***

### delete

`collections.delete`

Permanently delete a collection

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.collections.delete({
	path: { id: 8 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

DELETE /api/collection/\{id} permanently removes a collection; the operation is marked destructive.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `number`

***

### get

`collections.get`

Get a collection by its numeric ID or NanoID

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.get({
	path: { id: 8 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number | string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `name` | `string` | Yes | — |

***

### items.list

`collections.items.list`

List items in a collection

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.items.list({
	path: { id: 8 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

Collection item rows are heterogeneous and the OpenAPI schema intentionally leaves their item fields open. The plugin preserves JSON-compatible fields instead of claiming a fixed model.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number | string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   q?: string | null,
>   pinned-state?: is_not_pinned | is_pinned | all | null,
>   archived?: boolean | null,
>   sort-direction?: desc | asc | null,
>   show-dashboard-questions?: boolean | null,
>   show-exploration-documents?: boolean | null,
>   include-available-models?: boolean | null,
>   models?: (dashboard | table | exploration | dataset | no_models | timeline | snippet | collection | measure | transform | document | pulse | action | metric | card)[] | null,
>   official-collections-first?: boolean | null,
>   sort-column?: model | name | last_edited_by | last_edited_at | description | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `available_models` | `JsonValue[]` | No | — |
| `data` | `Record<string, JsonValue>[]` | Yes | — |
| `limit` | `number \| null` | No | — |
| `models` | `JsonValue[] \| null` | Yes | — |
| `offset` | `number \| null` | No | — |
| `total` | `number` | Yes | — |

***

### items.metadata

`collections.items.metadata`

Get model and count metadata for collection items

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.items.metadata({
	path: { id: 8 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number | string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   models?: (dashboard | table | exploration | dataset | no_models | timeline | snippet | collection | measure | transform | document | pulse | action | metric | card)[] | null,
>   archived?: boolean | null,
>   pinned-state?: is_not_pinned | is_pinned | all | null,
>   show-dashboard-questions?: boolean | null,
>   show-exploration-documents?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `available_models` | `string[]` | Yes | — |
| `total_items` | `number` | Yes | — |

***

### list

`collections.list`

List collections visible to the API key group

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   exclude-other-user-collections?: boolean | null,
>   namespace?: string | null,
>   personal-only?: boolean | null
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   name: string
> }[]
> ```

***

### root.candidates.list

`collections.root.candidates.list`

List root questions eligible to move into dashboards

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.root.candidates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `total` | `number` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   description: string | null,
>   id: number,
>   name: string,
>   sole_dashboard_info: {
>     description: string | null,
>     id: number,
>     name: string
>   }
> }[]
> ```

***

### root.candidates.move

`collections.root.candidates.move`

Move eligible root questions into their dashboards

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.collections.root.candidates.move({
	body: {
		card_ids: [15],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object \| null` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   card_ids?: number[]
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `moved` | `number[]` | Yes | — |

***

### root.get

`collections.root.get`

Get the virtual root collection

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.root.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   namespace?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `name` | `string` | Yes | — |

***

### root.items.list

`collections.root.items.list`

List items visible at the collection root

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.root.items.list({
	query: {
		models: ['dashboard'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

Root item rows are heterogeneous and the OpenAPI schema intentionally leaves their item fields open. The plugin preserves JSON-compatible fields instead of claiming a fixed model.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   collection-type?: remote-synced | null,
>   include-library?: boolean | null,
>   q?: string | null,
>   pinned-state?: is_not_pinned | is_pinned | all | null,
>   archived?: boolean | null,
>   sort-direction?: desc | asc | null,
>   show-dashboard-questions?: boolean | null,
>   show-exploration-documents?: boolean | null,
>   include-available-models?: boolean | null,
>   namespace?: string | null,
>   models?: (dashboard | table | exploration | dataset | no_models | timeline | snippet | collection | measure | transform | document | pulse | action | metric | card)[] | null,
>   official-collections-first?: boolean | null,
>   sort-column?: model | name | last_edited_by | last_edited_at | description | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `available_models` | `JsonValue[]` | No | — |
| `data` | `Record<string, JsonValue>[]` | Yes | — |
| `limit` | `number \| null` | No | — |
| `models` | `JsonValue[] \| null` | Yes | — |
| `offset` | `number \| null` | No | — |
| `total` | `number` | Yes | — |

***

### root.items.metadata

`collections.root.items.metadata`

Get model and count metadata for root items

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.root.items.metadata({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   models?: (dashboard | table | exploration | dataset | no_models | timeline | snippet | collection | measure | transform | document | pulse | action | metric | card)[] | null,
>   archived?: boolean | null,
>   namespace?: string | null,
>   pinned-state?: is_not_pinned | is_pinned | all | null,
>   collection-type?: remote-synced | null,
>   include-library?: boolean | null,
>   show-dashboard-questions?: boolean | null,
>   show-exploration-documents?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `available_models` | `string[]` | Yes | — |
| `total_items` | `number` | Yes | — |

***

### trash.get

`collections.trash.get`

Get the virtual trash collection

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.trash.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `name` | `string` | Yes | — |

***

### tree

`collections.tree`

Get the collection tree

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.collections.tree({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   exclude-archived?: boolean | null,
>   exclude-other-user-collections?: boolean | null,
>   include-library?: boolean | null,
>   namespace?: string | null,
>   namespaces?: string[] | null,
>   shallow?: boolean | null,
>   collection-id?: number | null
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   children?: boolean | (recursive)[],
>   id: number | string,
>   name: string
> }[]
> ```

***

### update

`collections.update`

Update or move a collection

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.collections.update({
	path: { id: 8 },
	body: { name: 'Finance reports' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   authority_level?: official | null,
>   description?: string | null,
>   name?: string | null,
>   parent_id?: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `name` | `string` | Yes | — |

***

## Dashboard

### postByDashboardIdDashcardByDashcardIdExecuteValues

`dashboard.postByDashboardIdDashcardByDashcardIdExecuteValues`

Fetches the values for filling in execution parameters.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.dashboard.postByDashboardIdDashcardByDashcardIdExecuteValues({ "path": { "dashboard-id": 1, "dashcard-id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   dashboard-id: number,
>   dashcard-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   parameters?: Record<string, string | number | boolean | null>
> }
> ```

**Output:** `Record<string, JsonValue>`

***

### postByIdPdf

`dashboard.postByIdPdf`

Render Dashboard with ID to a PDF (server-side, the same way dashboard subscriptions render charts) and stream it back as a file download.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.dashboard.postByIdPdf({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

The route description specifies a PDF download while the OpenAPI success media/schema is JSON with an unconstrained body. The adapter returns a bounded binary artifact and preserves documented response headers.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   paper_size?: a4 | letter | null,
>   parameters?: JsonValue[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

## Database

### getByIdSchemas

`database.getByIdSchemas`

Returns a list of all the schemas with tables found for the database `id`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.database.getByIdSchemas({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include_editable_data_model?: boolean | null,
>   include_hidden?: boolean | null,
>   can-query?: boolean | null
> }
> ```

**Output:** `string[]`

***

### getByIdSettingsAvailable

`database.getByIdSettingsAvailable`

Get all database-local settings and their availability for the given database.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.database.getByIdSettingsAvailable({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `settings` | `object \| null` | No | — |

> [accordion] settings full type
>
> ```ts theme={null}
> Record<string, {
>   enabled?: boolean | null,
>   reasons?: {
>     key?: string | null,
>     message?: string | string | null,
>     type?: error | warning | null
>   }[] | null
> }> | null
> ```

***

## Dataset

### post

`dataset.post`

Execute a query and retrieve the results in the usual format.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.dataset.post({ "body": { "type": "internal" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue \| object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> JsonValue | JsonValue | {
>   database: number,
>   type: native,
>   native: JsonValue
> } | {
>   database: number,
>   type: query,
>   query: JsonValue
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `row_count` | `number \| null` | No | — |
| `error` | `string \| null` | No | — |
| `started_at` | `string \| null` | No | — |
| `database_id` | `number \| null` | No | — |
| `context` | `JsonValue \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |
| `error_type` | `string \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `json_query` | `Record<string, JsonValue> \| null` | No | — |
| `average_execution_time` | `number \| null \| null` | No | — |
| `cached` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   insights?: Record<string, JsonValue>[] | null,
>   results_metadata?: {
>     columns?: JsonValue[] | null
>   } | null,
>   download_perms?: string | null,
>   format-rows??: boolean | null,
>   is_sandboxed?: boolean | null,
>   cols?: JsonValue[] | null,
>   sandbox_details?: Record<string, JsonValue>[] | null,
>   results_timezone?: string | null,
>   rows?: JsonValue[][] | null,
>   native_form?: Record<string, JsonValue> | null
> } | null
> ```

***

### postByExportFormat

`dataset.postByExportFormat`

Execute a query and download the result data as a file in the specified format.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.dataset.postByExportFormat({ "path": { "export-format": "csv" }, "body": { "query": { "type": "internal" } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

The route description specifies a file download while the OpenAPI success schema references a JSON query result. The adapter follows the explicit file-download description and returns a bounded binary artifact.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   export-format: csv | api | xlsx | json
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   csv_include_bom?: boolean,
>   format_rows?: boolean,
>   pivot_results?: boolean,
>   query: JsonValue | JsonValue | {
>     database: number,
>     type: native,
>     native: JsonValue
>   } | {
>     database: number,
>     type: query,
>     query: JsonValue
>   },
>   visualization_settings?: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### postPivot

`dataset.postPivot`

Generate a pivoted dataset for an ad-hoc query

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.dataset.postPivot({ "body": { "stages": [{ "lib/type": "mbql.stage/native" }] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue \| object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> JsonValue | {
>   database: number,
>   type: native,
>   native: JsonValue
> } | {
>   database: number,
>   type: query,
>   query: JsonValue
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `row_count` | `number \| null` | No | — |
| `error` | `string \| null` | No | — |
| `started_at` | `string \| null` | No | — |
| `database_id` | `number \| null` | No | — |
| `context` | `JsonValue \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |
| `error_type` | `string \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `json_query` | `Record<string, JsonValue> \| null` | No | — |
| `average_execution_time` | `number \| null \| null` | No | — |
| `cached` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   insights?: Record<string, JsonValue>[] | null,
>   results_metadata?: {
>     columns?: JsonValue[] | null
>   } | null,
>   download_perms?: string | null,
>   format-rows??: boolean | null,
>   is_sandboxed?: boolean | null,
>   cols?: JsonValue[] | null,
>   sandbox_details?: Record<string, JsonValue>[] | null,
>   results_timezone?: string | null,
>   rows?: JsonValue[][] | null,
>   native_form?: Record<string, JsonValue> | null
> } | null
> ```

***

## Data Studio

### postTableDiscardValues

`dataStudio.postTableDiscardValues`

Batch version of /table/:id/discard\_values.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.dataStudio.postTableDiscardValues({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_ids?: number[],
>   schema_ids?: string[],
>   table_ids?: number[]
> }
> ```

**Output:** `null`

***

### postTableEdit

`dataStudio.postTableEdit`

Bulk updating tables.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.dataStudio.postTableEdit({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   data_authority?: computed | authoritative | unconfigured | ingested,
>   data_layer?: final | internal | hidden | null,
>   table_ids?: number[],
>   owner_email?: string | null,
>   owner_user_id?: number | null,
>   data_source?: source-data | transform | unknown | ingested | metabase-transform | upload | null,
>   schema_ids?: string[],
>   entity_type?: string | null,
>   database_ids?: number[]
> }
> ```

**Output:** *empty object*

***

### postTableRescanValues

`dataStudio.postTableRescanValues`

Batch version of /table/:id/rescan\_values.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.dataStudio.postTableRescanValues({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_ids?: number[],
>   schema_ids?: string[],
>   table_ids?: number[]
> }
> ```

**Output:** `null`

***

### postTableSelection

`dataStudio.postTableSelection`

Gets information about selected tables

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.dataStudio.postTableSelection({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_ids?: number[],
>   schema_ids?: string[],
>   table_ids?: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `published_downstream_tables` | `object[] \| null` | No | — |
| `selected_table` | `object \| null` | No | — |
| `unpublished_upstream_tables` | `object[] \| null` | No | — |

> [accordion] published\_downstream\_tables full type
>
> ```ts theme={null}
> {
>   db_id?: number | null,
>   display_name?: string | null,
>   id?: number | null,
>   is_published?: boolean | null,
>   name?: string | null,
>   schema?: string | null | null
> }[] | null
> ```

> [accordion] selected\_table full type
>
> ```ts theme={null}
> {
>   db_id?: number | null,
>   display_name?: string | null,
>   id?: number | null,
>   is_published?: boolean | null,
>   name?: string | null,
>   schema?: string | null | null
> } | null | null
> ```

> [accordion] unpublished\_upstream\_tables full type
>
> ```ts theme={null}
> {
>   db_id?: number | null,
>   display_name?: string | null,
>   id?: number | null,
>   is_published?: boolean | null,
>   name?: string | null,
>   schema?: string | null | null
> }[] | null
> ```

***

### postTableSyncSchema

`dataStudio.postTableSyncSchema`

Batch version of /table/:id/sync\_schema.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.dataStudio.postTableSyncSchema({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_ids?: number[],
>   schema_ids?: string[],
>   table_ids?: number[]
> }
> ```

**Output:** `null`

***

## Document

### getPublic

`document.getPublic`

List all Documents that have public links.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.document.getPublic({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   public_uuid?: string | null
> }[]
> ```

***

### postByDocumentIdPublicLink

`document.postByDocumentIdPublicLink`

Generate a publicly-accessible UUID for a Document.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.document.postByDocumentIdPublicLink({ "path": { "document-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   document-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uuid` | `string \| null` | No | — |

***

### postByFromDocumentIdCopy

`document.postByFromDocumentIdCopy`

Copy a Document.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.document.postByFromDocumentIdCopy({ "path": { "from-document-id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   from-document-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collection_id?: number | null,
>   collection_position?: number | null,
>   name?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |

***

## Ee

### deleteAiControlsMcpPermissionsAdvanced

`ee.deleteAiControlsMcpPermissionsAdvanced`

Pro/Enterprise only. Switch back to All Users only.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.deleteAiControlsMcpPermissionsAdvanced({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |
| `tools` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   mcp_enabled?: boolean | null,
>   tool_access?: Record<string, string> | null
> }[] | null
> ```

> [accordion] tools full type
>
> ```ts theme={null}
> {
>   default_access?: allowed | denied | null,
>   description?: string | null,
>   name?: string | null,
>   scope?: string | null
> }[] | null
> ```

***

### deleteAiControlsPermissionsAdvanced

`ee.deleteAiControlsPermissionsAdvanced`

Pro/Enterprise only. Switch back to simple permissions.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.deleteAiControlsPermissionsAdvanced({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   perm_type?: permission/metabot | permission/metabot-nlq | permission/metabot-other-tools | permission/metabot-sql-generation | null,
>   perm_value?: yes | no | null
> }[] | null
> ```

***

### deleteAppsBySlugGroupsByGroupId

`ee.deleteAppsBySlugGroupsByGroupId`

Pro/Enterprise only. Revoke a group's access to a data app's resource collection.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.deleteAppsBySlugGroupsByGroupId({ "path": { "slug": "a", "group-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string,
>   group-id: number
> }
> ```

**Output:** `null`

***

### deleteCloudAddOnsByProductType

`ee.deleteCloudAddOnsByProductType`

Pro/Enterprise only. Remove an add-on.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.deleteCloudAddOnsByProductType({ "path": { "product-type": "metabase-ai" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   product-type: metabase-ai | metabase-ai-tiered | metabase-ai-managed | python-execution | transforms | transforms-basic | transforms-advanced | transforms-basic-metered | transforms-advanced-metered | dwh-rent | etl-connections
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue \| null` | No | — |
| `status` | `number \| null` | No | — |

***

### deleteCustomVizPluginById

`ee.deleteCustomVizPluginById`

Pro/Enterprise only. Remove a custom visualization plugin and evict its on-disk cache.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.deleteCustomVizPluginById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### deleteTransformTestById

`ee.deleteTransformTestById`

Pro/Enterprise only. Delete a transform test.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.deleteTransformTestById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### getAiControlsMcpPermissions

`ee.getAiControlsMcpPermissions`

Pro/Enterprise only. List the MCP tool policy of every group, with the tools it can name and the current permission mode.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsMcpPermissions({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |
| `tools` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   mcp_enabled?: boolean | null,
>   tool_access?: Record<string, string> | null
> }[] | null
> ```

> [accordion] tools full type
>
> ```ts theme={null}
> {
>   default_access?: allowed | denied | null,
>   description?: string | null,
>   name?: string | null,
>   scope?: string | null
> }[] | null
> ```

***

### getAiControlsPermissions

`ee.getAiControlsPermissions`

Pro/Enterprise only. List all metabot permissions for all groups, filling in defaults for missing entries.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsPermissions({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   perm_type?: permission/metabot | permission/metabot-nlq | permission/metabot-other-tools | permission/metabot-sql-generation | null,
>   perm_value?: yes | no | null
> }[] | null
> ```

***

### getAiControlsUsageGroup

`ee.getAiControlsUsageGroup`

Pro/Enterprise only. Get all group-level metabot usage limits.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsUsageGroup({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   max_usage?: number | null
> }[]
> ```

***

### getAiControlsUsageGroupByGroupId

`ee.getAiControlsUsageGroupByGroupId`

Pro/Enterprise only. Get the metabot usage limit for a specific group.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsUsageGroupByGroupId({ "path": { "group-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   group-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_id` | `number \| null` | No | — |
| `max_usage` | `number \| null \| null` | No | — |

***

### getAiControlsUsageInstance

`ee.getAiControlsUsageInstance`

Pro/Enterprise only. Get the instance-wide metabot usage limit.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsUsageInstance({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `max_usage` | `number \| null \| null` | No | — |

***

### getAiControlsUsageTenant

`ee.getAiControlsUsageTenant`

Pro/Enterprise only. Get all tenant-level metabot usage limits.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsUsageTenant({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   max_usage?: number | null,
>   tenant_id?: number | null
> }[]
> ```

***

### getAiControlsUsageTenantByTenantId

`ee.getAiControlsUsageTenantByTenantId`

Pro/Enterprise only. Get the metabot usage limit for a specific tenant.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAiControlsUsageTenantByTenantId({ "path": { "tenant-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tenant-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `max_usage` | `number \| null \| null` | No | — |
| `tenant_id` | `number \| null` | No | — |

***

### getApps

`ee.getApps`

Pro/Enterprise only. List the data apps the user can read.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getApps({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> (
>   {
>     enabled?: boolean | null,
>     id?: number | null,
>     name?: string | null,
>     slug?: string | null,
>     updated_at?: JsonValue | null,
>     version?: number | null,
>     created_at?: JsonValue | null,
>     bundle_hash?: string | null | null,
>     allowed_hosts?: string[] | null,
>     outdated?: boolean | null,
>     resource_collection_id?: number | null,
>     description?: string | null | null,
>     bundle_path?: string | null
>   } | {
>     enabled?: boolean | null,
>     id?: number | null,
>     name?: string | null,
>     outdated?: boolean | null,
>     slug?: string | null
>   }
> )[]
> ```

***

### getAppsBySlug

`ee.getAppsBySlug`

Pro/Enterprise only. Fetch metadata for a single data app by its slug, disabled ones to superusers only.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsBySlug({ "path": { "slug": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   slug?: string | null,
>   updated_at?: JsonValue | null,
>   version?: number | null,
>   created_at?: JsonValue | null,
>   bundle_hash?: string | null | null,
>   allowed_hosts?: string[] | null,
>   outdated?: boolean | null,
>   resource_collection_id?: number | null,
>   description?: string | null | null,
>   bundle_path?: string | null
> } | {
>   enabled?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   outdated?: boolean | null,
>   slug?: string | null
> }
> ```

***

### getAppsBySlugBundle

`ee.getAppsBySlugBundle`

Pro/Enterprise only. Serve the cached JS bundle for a single data app by slug, disabled ones to superusers only.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsBySlugBundle({ "path": { "slug": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

The JavaScript bundle is returned as a bounded binary artifact with the response content type and selected cache headers preserved.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### getAppsBySlugGroupPermissionWarnings

`ee.getAppsBySlugGroupPermissionWarnings`

Pro/Enterprise only. Return missing table access for the groups listed for this app.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsBySlugGroupPermissionWarnings({ "path": { "slug": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   missing_tables?: {
>     database_id?: number | null,
>     database_name?: string | null,
>     id?: number | null,
>     name?: string | null,
>     schema?: string | null | null
>   }[] | null
> }[]
> ```

***

### getAppsBySlugGroups

`ee.getAppsBySlugGroups`

Pro/Enterprise only. List the groups other than Administrators that can read a data app's resource collection.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsBySlugGroups({ "path": { "slug": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   member_count?: number | null,
>   name?: string | null
> }[]
> ```

***

### getAppsGenerateSchema

`ee.getAppsGenerateSchema`

Pro/Enterprise only. The `src/metabase.schema.ts` file of a data app: the Library's published tables, with their fields, segments and measures, and its metrics.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsGenerateSchema({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contents?: string | null,
>   path?: string | null
> }[]
> ```

***

### getAppsRepoStatus

`ee.getAppsRepoStatus`

Pro/Enterprise only. Status of the connected repository as it relates to data apps.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsRepoStatus({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configured` | `boolean \| null` | No | — |
| `url` | `string \| null \| null` | No | — |

***

### getAppsSandboxHost

`ee.getAppsSandboxHost`

Pro/Enterprise only. Serve the document used as the `src` of the Near-Membrane realm iframe, carrying a per-document CSP that confines `'unsafe-eval'` to that realm.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getAppsSandboxHost({  });
```

**Input:** *empty object*

The HTML sandbox document is returned as a bounded binary artifact; the Content-Security-Policy header is preserved and the HTML is never executed by the plugin.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### getContentDiagnosticsDuplicated

`ee.getContentDiagnosticsDuplicated`

Pro/Enterprise only. List **duplicated** findings - the latest valid finding per (entity, finding-type) across the duplicated finding types (currently just `duplicate_name`), permission-filtered for the current user.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getContentDiagnosticsDuplicated({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   include-personal-collections?: boolean,
>   sort-column?: detected-at | entity-type | name | created-at | created-by | collection-name | duplicate-count,
>   sort-direction?: desc | asc,
>   entity-types?: transform | question | dashboard | card | document | collection | metric | model | (transform | question | dashboard | card | document | collection | metric | model)[],
>   min-duplicate-count?: number,
>   query?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `last_scan_at` | `string \| null \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   entity_display_name?: string | null | null,
>   collection_name?: string | null | null,
>   detected_at?: string | null,
>   entity_id?: number | null,
>   id?: number | null,
>   duplicate_count?: number | null,
>   finding_type?: string | null,
>   card_type?: string | null | null,
>   can_write?: boolean | null,
>   details?: {
>     collection?: {
>       effective_ancestors?: {
>         id?: number | root | null,
>         name?: string | string | null
>       }[] | null,
>       id?: number | root | null,
>       name?: string | string | null,
>       namespace?: string | null | null
>     } | null | null,
>     creator?: {
>       id?: number | null,
>       name?: string | null | null,
>       type?: user | null
>     } | null | null,
>     description?: string | null | null,
>     duplicate_entities?: {
>       card_type?: string | null | null,
>       display?: string | null | null,
>       entity_type?: string | null,
>       id?: number | null,
>       name?: string | null | null,
>       namespace?: string | null | null,
>       view_count?: number | null
>     }[] | null,
>     normalized_name?: string | null,
>     owner?: {
>       email?: string | null | null,
>       id?: number | null | null,
>       name?: string | null | null,
>       type?: string | null
>     } | null | null,
>     view_count?: number | null
>   } | null,
>   created_at?: string | null | null,
>   display?: string | null | null,
>   entity_type?: string | null,
>   entity_kind?: string | null
> }[] | null
> ```

***

### getContentDiagnosticsImbalanced

`ee.getContentDiagnosticsImbalanced`

Pro/Enterprise only. List **imbalanced** findings - the latest valid finding per (entity, finding-type) across the `empty`/`sparse`/`crowded` checkers, permission-filtered for the current user.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getContentDiagnosticsImbalanced({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   include-personal-collections?: boolean,
>   sort-column?: detected-at | entity-type | name | created-at | created-by | collection-name | content-count | finding-type,
>   sort-direction?: desc | asc,
>   entity-types?: transform | question | dashboard | card | document | collection | metric | model | (transform | question | dashboard | card | document | collection | metric | model)[],
>   finding-types?: crowded | empty | sparse | (crowded | empty | sparse)[],
>   query?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `last_scan_at` | `string \| null \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   entity_display_name?: string | null | null,
>   collection_name?: string | null | null,
>   detected_at?: string | null,
>   entity_id?: number | null,
>   id?: number | null,
>   finding_type?: string | null,
>   card_type?: string | null | null,
>   can_write?: boolean | null,
>   details?: {
>     as_of?: string | null,
>     collection?: {
>       effective_ancestors?: {
>         id?: number | root | null,
>         name?: string | string | null
>       }[] | null,
>       id?: number | root | null,
>       name?: string | string | null,
>       namespace?: string | null | null
>     } | null | null,
>     creator?: {
>       id?: number | null,
>       name?: string | null | null,
>       type?: user | null
>     } | null | null,
>     description?: string | null | null,
>     owner?: {
>       email?: string | null | null,
>       id?: number | null | null,
>       name?: string | null | null,
>       type?: string | null
>     } | null | null,
>     threshold?: number | null,
>     unit?: string | null,
>     view_count?: number | null
>   } | null,
>   created_at?: string | null | null,
>   display?: string | null | null,
>   entity_type?: string | null,
>   entity_kind?: string | null,
>   content_count?: number | null
> }[] | null
> ```

***

### getContentDiagnosticsSlow

`ee.getContentDiagnosticsSlow`

Pro/Enterprise only. List **slow** findings - the latest valid `slow` finding per entity, permission-filtered for the current user.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getContentDiagnosticsSlow({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   include-personal-collections?: boolean,
>   sort-column?: detected-at | entity-type | name | created-at | created-by | collection-name | duration-ms,
>   sort-direction?: desc | asc,
>   entity-types?: transform | question | dashboard | card | document | metric | model | (transform | question | dashboard | card | document | metric | model)[],
>   min-duration-ms?: number,
>   query?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `last_scan_at` | `string \| null \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   entity_display_name?: string | null | null,
>   collection_name?: string | null | null,
>   detected_at?: string | null,
>   entity_id?: number | null,
>   id?: number | null,
>   finding_type?: string | null,
>   card_type?: string | null | null,
>   can_write?: boolean | null,
>   duration_ms?: number | null,
>   details?: {
>     collection?: {
>       effective_ancestors?: {
>         id?: number | root | null,
>         name?: string | string | null
>       }[] | null,
>       id?: number | root | null,
>       name?: string | string | null,
>       namespace?: string | null | null
>     } | null | null,
>     creator?: {
>       id?: number | null,
>       name?: string | null | null,
>       type?: user | null
>     } | null | null,
>     description?: string | null | null,
>     owner?: {
>       email?: string | null | null,
>       id?: number | null | null,
>       name?: string | null | null,
>       type?: string | null
>     } | null | null,
>     slow_entities?: {
>       card_type?: string | null | null,
>       entity_type?: string | null,
>       id?: number | null,
>       name?: string | null | null,
>       view_count?: number | null
>     }[] | null,
>     threshold_ms?: number | null,
>     view_count?: number | null
>   } | null,
>   created_at?: string | null | null,
>   display?: string | null | null,
>   entity_type?: string | null,
>   entity_kind?: string | null
> }[] | null
> ```

***

### getContentDiagnosticsStale

`ee.getContentDiagnosticsStale`

Pro/Enterprise only. List **stale** findings - the latest valid `stale` finding per entity, permission-filtered for the current user.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getContentDiagnosticsStale({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   include-personal-collections?: boolean,
>   sort-column?: detected-at | entity-type | name | created-at | created-by | collection-name | last-active-at,
>   sort-direction?: desc | asc,
>   entity-types?: transform | question | dashboard | card | document | metric | model | (transform | question | dashboard | card | document | metric | model)[],
>   threshold-days?: number,
>   query?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `last_scan_at` | `string \| null \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   entity_display_name?: string | null | null,
>   collection_name?: string | null | null,
>   detected_at?: string | null,
>   entity_id?: number | null,
>   last_active_at?: string | null | null,
>   id?: number | null,
>   finding_type?: string | null,
>   card_type?: string | null | null,
>   can_write?: boolean | null,
>   details?: {
>     collection?: {
>       effective_ancestors?: {
>         id?: number | root | null,
>         name?: string | string | null
>       }[] | null,
>       id?: number | root | null,
>       name?: string | string | null,
>       namespace?: string | null | null
>     } | null | null,
>     creator?: {
>       id?: number | null,
>       name?: string | null | null,
>       type?: user | null
>     } | null | null,
>     description?: string | null | null,
>     owner?: {
>       email?: string | null | null,
>       id?: number | null | null,
>       name?: string | null | null,
>       type?: string | null
>     } | null | null,
>     threshold_days?: number | null,
>     view_count?: number | null
>   } | null,
>   created_at?: string | null | null,
>   display?: string | null | null,
>   entity_type?: string | null,
>   entity_kind?: string | null
> }[] | null
> ```

***

### getContentTranslationDictionary

`ee.getContentTranslationDictionary`

Pro/Enterprise only. Fetch the content translation dictionary for authenticated users (auth-based embedding flows).

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getContentTranslationDictionary({ "query": { "locale": "" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   locale: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   locale?: string | null,
>   msgid?: string | null,
>   msgstr?: string | null
> }[] | null
> ```

***

### getCustomVizPlugin

`ee.getCustomVizPlugin`

Pro/Enterprise only. List all registered custom visualization plugins.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getCustomVizPlugin({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   id?: number | null,
>   updated_at?: JsonValue | null,
>   status?: active | error | null,
>   error_message?: string | null | null,
>   identifier?: string | null,
>   display_name?: string | null,
>   dev_only?: boolean | null,
>   created_at?: JsonValue | null,
>   bundle_hash?: string | null | null,
>   manifest?: JsonValue | null,
>   warnings?: {
>     type?: string | null
>   }[] | null,
>   dev_bundle_url?: string | null | null,
>   metabase_version?: string | null | null,
>   icon?: string | null | null
> }[]
> ```

***

### getCustomVizPluginByIdAsset

`ee.getCustomVizPluginByIdAsset`

Pro/Enterprise only. Serve the plugin's icon image from its bundle.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getCustomVizPluginByIdAsset({ "path": { "id": 1 }, "query": { "path": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | Yes | — |

The manifest icon is returned as a bounded binary artifact with its content type preserved.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   path: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### getCustomVizPluginByIdBundle

`ee.getCustomVizPluginByIdBundle`

Pro/Enterprise only. Serve the JS bundle for a plugin from the on-disk cache.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getCustomVizPluginByIdBundle({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

The JavaScript bundle is returned as a bounded binary artifact with the response content type and selected cache headers preserved.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### getCustomVizPluginList

`ee.getCustomVizPluginList`

Pro/Enterprise only. List active and enabled custom visualization plugins.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getCustomVizPluginList({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bundle_url?: string | null,
>   id?: number | null,
>   identifier?: string | null,
>   display_name?: string | null,
>   bundle_hash?: string | null | null,
>   manifest?: JsonValue | null,
>   warnings?: {
>     type?: string | null
>   }[] | null,
>   dev_bundle_url?: string | null | null,
>   icon?: string | null | null
> }[]
> ```

***

### getCustomVizPluginSandboxHost

`ee.getCustomVizPluginSandboxHost`

Pro/Enterprise only. Serve a minimal HTML document used as the iframe `src` for the near-membrane custom-viz sandbox.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getCustomVizPluginSandboxHost({  });
```

**Input:** *empty object*

The HTML sandbox document is returned as a bounded binary artifact; the Content-Security-Policy header is preserved and the HTML is never executed by the plugin.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### getDataComplexityScoreComplexity

`ee.getDataComplexityScoreComplexity`

Pro/Enterprise only. Return the most recently stored Data Complexity Score for this instance.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDataComplexityScoreComplexity({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   force-recalculation?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `library` | `object \| null` | No | — |
| `meta` | `object \| null` | No | — |
| `metabot` | `object \| null` | No | — |
| `universe` | `object \| null` | No | — |

> [accordion] library full type
>
> ```ts theme={null}
> {
>   error?: string | null
> } | {
>   measurement?: number | null,
>   rating?: low | medium | high | null | null,
>   rating_label?: string | null | null,
>   score?: number | null
> } | {
>   components?: Record<string, (recursive)> | null,
>   rating?: low | medium | high | null | null,
>   rating_label?: string | null | null,
>   score?: number | null | null
> } | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   calculated_at?: string | number | boolean | null | JsonValue[] | Record<string, JsonValue> | null,
>   embedding_model?: {
>     model_name?: string | null,
>     provider?: string | null
>   } | null | null,
>   format_version?: number | null,
>   formula_version?: number | null,
>   synonym_threshold?: number | null
> } | null
> ```

> [accordion] metabot full type
>
> ```ts theme={null}
> {
>   error?: string | null
> } | {
>   measurement?: number | null,
>   rating?: low | medium | high | null | null,
>   rating_label?: string | null | null,
>   score?: number | null
> } | {
>   components?: Record<string, (recursive)> | null,
>   rating?: low | medium | high | null | null,
>   rating_label?: string | null | null,
>   score?: number | null | null
> } | null
> ```

> [accordion] universe full type
>
> ```ts theme={null}
> {
>   error?: string | null
> } | {
>   measurement?: number | null,
>   rating?: low | medium | high | null | null,
>   rating_label?: string | null | null,
>   score?: number | null
> } | {
>   components?: Record<string, (recursive)> | null,
>   rating?: low | medium | high | null | null,
>   rating_label?: string | null | null,
>   score?: number | null | null
> } | null
> ```

***

### getDataStudioTableByIdPublishingInfo

`ee.getDataStudioTableByIdPublishingInfo`

Pro/Enterprise only. Return the latest valid publishing information for a published table, or no content when unavailable.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDataStudioTableByIdPublishingInfo({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `object \| null`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   published_at?: string | null,
>   published_by?: {
>     common_name?: string | null,
>     id?: number | null
>   } | null | null
> } | null
> ```

***

### getDependenciesBackfillStatus

`ee.getDependenciesBackfillStatus`

Pro/Enterprise only. Whether no entity awaits the computation of its dependencies, as `complete`, for superusers.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDependenciesBackfillStatus({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `complete` | `boolean \| null` | No | — |

***

### getDependenciesGraph

`ee.getDependenciesGraph`

Pro/Enterprise only. This endpoint takes an :id and a supported entity :type, and returns a graph of all its upstream dependencies.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDependenciesGraph({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   id?: number,
>   type?: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app
> }
> ```

**Output:** `JsonValue`

***

### getDependenciesGraphBreaking

`ee.getDependenciesGraphBreaking`

Pro/Enterprise only. Returns a list of entities that are breaking other entities (sources of errors).

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDependenciesGraphBreaking({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   types?: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app | (transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app)[],
>   card-types?: question | metric | model | (question | metric | model)[],
>   query?: string,
>   include-personal-collections?: boolean,
>   sort-column?: dependents-with-errors | dependents-errors | name | location,
>   sort-direction?: desc | asc
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `JsonValue[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

***

### getDependenciesGraphBroken

`ee.getDependenciesGraphBroken`

Pro/Enterprise only. Returns the broken dependents for a specific source entity.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDependenciesGraphBroken({ "query": { "id": 1, "type": "transform" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   id: number,
>   type: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app,
>   dependent-types?: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app | (transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app)[],
>   dependent-card-types?: question | metric | model | (question | metric | model)[],
>   include-personal-collections?: boolean,
>   sort-column?: name | view-count | location,
>   sort-direction?: desc | asc
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: Record<string, JsonValue> | null,
>   id?: number | null,
>   type?: string | null
> }[]
> ```

***

### getDependenciesGraphDependents

`ee.getDependenciesGraphDependents`

Pro/Enterprise only. Returns a list of dependents for the specified entity.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDependenciesGraphDependents({ "query": { "id": 1, "type": "transform" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   query?: string,
>   id: number,
>   sort-direction?: desc | asc,
>   broken?: boolean,
>   type: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app,
>   include-personal-collections?: boolean,
>   dependent-types?: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app | (transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app)[],
>   dependent-card-types?: question | metric | model | (question | metric | model)[],
>   sort-column?: name | view-count | location
> }
> ```

**Output:** `JsonValue[]`

***

### getDependenciesGraphUnreferenced

`ee.getDependenciesGraphUnreferenced`

Pro/Enterprise only. Returns a list of all unreferenced items in the instance.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getDependenciesGraphUnreferenced({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   types?: transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app | (transform | table | snippet | dashboard | sandbox | measure | card | document | segment | action | data-app)[],
>   card-types?: question | metric | model | (question | metric | model)[],
>   query?: string,
>   include-personal-collections?: boolean,
>   sort-column?: dependents-with-errors | dependents-errors | name | location,
>   sort-direction?: desc | asc
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `JsonValue[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

***

### getErd

`ee.getErd`

Pro/Enterprise only. Return an Entity Relationship Diagram (ERD) for tables and their FK relationships.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getErd({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edges` | `object[] \| null` | No | — |
| `nodes` | `object[] \| null` | No | — |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   relationship?: one-to-one | many-to-one | null,
>   source_field_id?: number | null,
>   source_table_id?: number | null,
>   target_field_id?: number | null,
>   target_table_id?: number | null
> }[] | null
> ```

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   owner?: {
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   visibility_type?: string | null | null,
>   schema?: string | null | null,
>   name?: string | null,
>   table_id?: number | null,
>   display_name?: string | null,
>   fields?: {
>     base_type?: string | null | null,
>     id?: number | null,
>     name?: string | null,
>     semantic_type?: string | null | null,
>     fk_target_table_id?: number | null | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     database_type?: string | null,
>     fk_target_field_id?: number | null | null
>   }[] | null,
>   db_id?: number | null,
>   description?: string | null | null
> }[] | null
> ```

***

### getGsheetsConnection

`ee.getGsheetsConnection`

Pro/Enterprise only. Check the status of a connection.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getGsheetsConnection({  });
```

**Input:** *empty object*

**Output:** `object \| Record<string, JsonValue>`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   error?: boolean | null,
>   message?: string | null
> } | Record<string, JsonValue> | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   sync_started_at?: number | null,
>   url?: string | null
> } | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   sync_started_at?: number | null,
>   url?: string | null
> } | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   last_sync_at?: number | null,
>   next_sync_at?: number | null,
>   url?: string | null
> } | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   error_message?: string | null,
>   url?: string | null
> }
> ```

***

### getGsheetsServiceAccount

`ee.getGsheetsServiceAccount`

Pro/Enterprise only. Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster before.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getGsheetsServiceAccount({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string \| null \| null` | No | — |

***

### getLibrary

`ee.getLibrary`

Pro/Enterprise only. Get the Library.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getLibrary({  });
```

**Input:** *empty object*

**Output:** `JsonValue \| object`

> [accordion] Output full type
>
> ```ts theme={null}
> JsonValue | {
>   data?: null | null
> }
> ```

***

### getMetabotAnalyticsConversations

`ee.getMetabotAnalyticsConversations`

Pro/Enterprise only. Return paginated list of AI conversations with summary statistics.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMetabotAnalyticsConversations({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   sort_by?: created_at | title | message_count | total_tokens | cache_read_tokens | user | profile_id | ip_address | null,
>   sort_dir?: asc | desc | null,
>   user_id?: number | null,
>   group_id?: number | null,
>   tenant_id?: number | null,
>   date?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   sanitized_user_agent?: string | null | null,
>   embedding_path?: string | null | null,
>   cache_read_tokens?: number | null,
>   user?: {
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   embedding_hostname?: string | null | null,
>   message_count?: number | null,
>   user_message_count?: number | null,
>   profile_id?: string | null | null,
>   title?: string | null | null,
>   conversation_id?: string | null,
>   last_message_at?: string | null | null,
>   created_at?: string | null,
>   ip_address?: string | null | null,
>   search_count?: number | null,
>   assistant_message_count?: number | null,
>   total_tokens?: number | null,
>   query_count?: number | null,
>   user_agent?: string | null | null,
>   forked_from_conversation_id?: string | null | null
> }[] | null
> ```

***

### getMetabotAnalyticsConversationsById

`ee.getMetabotAnalyticsConversationsById`

Pro/Enterprise only. Return full details for a specific conversation including all messages.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMetabotAnalyticsConversationsById({ "path": { "id": "00000000-0000-4000-8000-000000000001" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `queries` | `object[] \| null` | No | — |
| `sanitized_user_agent` | `string \| null \| null` | No | — |
| `embedding_path` | `string \| null \| null` | No | — |
| `slack_permalink` | `string \| null \| null` | No | — |
| `fork_boundary_message_id` | `string \| null \| null` | No | — |
| `user` | `object \| null` | No | — |
| `embedding_hostname` | `string \| null \| null` | No | — |
| `feedback` | `object[] \| null` | No | — |
| `message_count` | `number \| null` | No | — |
| `profile_id` | `string \| null \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `conversation_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `messages` | `object[] \| null` | No | — |
| `ip_address` | `string \| null \| null` | No | — |
| `search_count` | `number \| null` | No | — |
| `total_tokens` | `number \| null` | No | — |
| `query_count` | `number \| null` | No | — |
| `user_agent` | `string \| null \| null` | No | — |
| `forked_from_conversation_id` | `string \| null \| null` | No | — |

> [accordion] queries full type
>
> ```ts theme={null}
> {
>   tables?: string[] | null,
>   mbql?: Record<string, JsonValue> | null | null,
>   database_id?: number | null | null,
>   query_id?: string | null | null,
>   query_type?: sql | notebook | null,
>   display?: string | null | null,
>   tool?: construct_notebook_query | create_sql_query | edit_sql_query | replace_sql_query | null,
>   call_id?: string | null | null,
>   sql?: string | null | null,
>   message_id?: number | null
> }[] | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   first_name?: string | null | null,
>   id?: number | null,
>   last_name?: string | null | null
> } | null | null
> ```

> [accordion] feedback full type
>
> ```ts theme={null}
> {
>   user_id?: number | null,
>   positive?: boolean | null,
>   external_id?: string | null | null,
>   user?: {
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   id?: number | null,
>   updated_at?: string | null,
>   issue_type?: string | null | null,
>   created_at?: string | null,
>   freeform_feedback?: string | null | null,
>   message_id?: number | null
> }[] | null
> ```

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   contextTokens?: number | null,
>   externalId?: string | null,
>   id?: string | null,
>   parent_message_id?: string | null | null,
>   parts?: (
>     {
>       id?: string | null,
>       message?: string | null,
>       role?: user | agent | null,
>       type?: text | null
>     } | {
>       args?: string | null | null,
>       id?: string | null,
>       is_error?: boolean | null,
>       name?: string | null,
>       result?: string | null | null,
>       role?: agent | null,
>       status?: started | ended | null,
>       type?: tool_call | null
>     } | {
>       id?: string | null,
>       part?: {
>         data?: JsonValue | null,
>         type?: string | null
>       } | null,
>       role?: agent | null,
>       type?: data_part | null
>     }
>   )[] | null,
>   role?: user | agent | null,
>   status?: {
>     type?: done | null
>   } | {
>     type?: aborted | null
>   } | {
>     type?: in_progress | null
>   } | {
>     contextWindowFull?: boolean | null,
>     finishReason?: length | content-filter | tool-calls | null,
>     type?: incomplete | null
>   } | {
>     error?: string | {
>       data?: JsonValue | null,
>       message?: string | null | null,
>       type?: string | null
>     } | null,
>     type?: errored | null
>   } | null
> }[] | null
> ```

***

### getMetabotUsage

`ee.getMetabotUsage`

Pro/Enterprise only. Fetch current Metabot token usage for the current billing period.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMetabotUsage({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `is_locked` | `boolean \| null \| null` | No | — |
| `tokens` | `number \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |

***

### getMfaAdminEnrolledUsers

`ee.getMfaAdminEnrolledUsers`

Pro/Enterprise only. Admin: users who have a confirmed second factor.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMfaAdminEnrolledUsers({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   query?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   sso_source?: string | null | null,
>   is_active?: boolean | null,
>   id?: number | null,
>   email?: string | null,
>   is_superuser?: boolean | null,
>   last_name?: string | null | null,
>   first_name?: string | null | null,
>   enrolled_at?: string | null | null,
>   common_name?: string | null
> }[] | null
> ```

***

### getMfaAdminOverview

`ee.getMfaAdminOverview`

Pro/Enterprise only. Admin: enrollment overview — how many users have (and haven't) set up a second factor, and whether the instance encrypts secrets at rest.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMfaAdminOverview({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `encryption_key_set` | `boolean \| null` | No | — |
| `enrolled_count` | `number \| null` | No | — |
| `unenrolled_count` | `number \| null` | No | — |

***

### getMfaAdminUnenrolledUsers

`ee.getMfaAdminUnenrolledUsers`

Pro/Enterprise only. Admin: active users who have not set up a second factor.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMfaAdminUnenrolledUsers({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   query?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   common_name?: string | null,
>   email?: string | null,
>   first_name?: string | null | null,
>   id?: number | null,
>   is_active?: boolean | null,
>   is_superuser?: boolean | null,
>   last_name?: string | null | null,
>   sso_source?: string | null | null
> }[] | null
> ```

***

### getMfaStatus

`ee.getMfaStatus`

Pro/Enterprise only. The current user's MFA status, for the account-settings UI.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getMfaStatus({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enrolled` | `boolean \| null` | No | — |
| `method` | `string \| null \| null` | No | — |
| `mfa_enabled` | `boolean \| null` | No | — |
| `pending` | `boolean \| null` | No | — |
| `recovery_codes_remaining` | `number \| null` | No | — |

***

### getPermissionDebug

`ee.getPermissionDebug`

Pro/Enterprise only. This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getPermissionDebug({ "query": { "user_id": 1, "model_id": 1, "action_type": "card/read" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   user_id: number,
>   model_id: number,
>   action_type: card/read | card/query | card/download-data
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |
| `decision` | `allow \| denied \| limited \| null` | No | — |
| `message` | `string[] \| null` | No | — |
| `model-id` | `string \| null` | No | — |
| `model-type` | `card \| invalid \| null` | No | — |
| `segment` | `(sandboxed \| impersonated \| routed)[] \| null` | No | — |
| `suggestions` | `Record<string, string> \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   blocked-tables?: Record<string, string[]> | null,
>   download-limited-tables?: Record<string, string[]> | null,
>   download-no-tables?: Record<string, string[]> | null
> } | null
> ```

***

### getRemoteSyncBranches

`ee.getRemoteSyncBranches`

Pro/Enterprise only. Get list of branches from the configured source.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getRemoteSyncBranches({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `string[] \| null` | No | — |

***

### getRemoteSyncCurrentTask

`ee.getRemoteSyncCurrentTask`

Pro/Enterprise only. Get the current sync task

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getRemoteSyncCurrentTask({  });
```

**Input:** *empty object*

**Output:** `object \| null`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   progress?: number | null | null,
>   conflicts?: string[] | null | null,
>   last_progress_report_at?: JsonValue | null,
>   id?: number | null,
>   last_heartbeat_at?: JsonValue | null,
>   started_at?: JsonValue | null,
>   ended_at?: JsonValue | null,
>   initiated_by?: number | null | null,
>   cancelled?: boolean | null | null,
>   status?: running | successful | errored | cancelled | timed-out | conflict | null,
>   error_message?: string | null | null,
>   sync_task_type?: import | export | null,
>   version?: string | null | null,
>   initiated_by_user?: {
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   outcome?: Record<string, JsonValue> | null | null
> } | null
> ```

***

### getRemoteSyncDirty

`ee.getRemoteSyncDirty`

Pro/Enterprise only. Return all models with changes that have not been pushed to the remote sync source in any remote-synced collection.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getRemoteSyncDirty({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dirty` | `object[] \| null` | No | — |

> [accordion] dirty full type
>
> ```ts theme={null}
> {
>   table_name?: string | null | null,
>   model?: string | null,
>   authority_level?: string | null | null,
>   id?: number | null,
>   card_id?: number | null | null,
>   name?: string | null | null,
>   updated_at?: JsonValue | null,
>   table_id?: number | null | null,
>   query_type?: string | null | null,
>   collection_id?: number | null | null,
>   created_at?: JsonValue | null,
>   display?: string | null | null,
>   sync_status?: string | null,
>   description?: string | null | null
> }[] | null
> ```

***

### getRemoteSyncExportPreflight

`ee.getRemoteSyncExportPreflight`

Pro/Enterprise only. Dry-run preview of what pushing the current state would do given the live remote branch, without writing anything.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getRemoteSyncExportPreflight({ "query": { "branch": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   branch: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clean` | `boolean \| null` | No | — |
| `conflicts` | `string[] \| null` | No | — |
| `force_push_casualties` | `object \| null` | No | — |
| `has_changes` | `boolean \| null` | No | — |
| `reason` | `string \| null \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] force\_push\_casualties full type
>
> ```ts theme={null}
> {
>   deleted?: string[] | null,
>   overwritten?: string[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   added?: number | null,
>   removed?: number | null,
>   updated?: number | null
> } | null
> ```

***

### getRemoteSyncHasRemoteChanges

`ee.getRemoteSyncHasRemoteChanges`

Pro/Enterprise only. Check if there are new changes on the remote branch that can be pulled.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getRemoteSyncHasRemoteChanges({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   force-refresh?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `branch_missing` | `boolean \| null` | No | — |
| `cached` | `boolean \| null` | No | — |
| `has_changes` | `boolean \| null` | No | — |
| `local_version` | `string \| null \| null` | No | — |
| `remote_version` | `string \| null \| null` | No | — |

***

### getRemoteSyncIsDirty

`ee.getRemoteSyncIsDirty`

Pro/Enterprise only. Check if any remote-synced collection or collection item has local changes that have not been pushed to the remote sync source.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getRemoteSyncIsDirty({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `is_dirty` | `boolean \| null` | No | — |

***

### getReplacementRuns

`ee.getReplacementRuns`

Pro/Enterprise only. List replacement runs, optionally filtered by is-active.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getReplacementRuns({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   is-active?: boolean | null
> }
> ```

**Output:** `JsonValue[]`

***

### getReplacementRunsById

`ee.getReplacementRunsById`

Pro/Enterprise only. Get the status of a source replacement run.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getReplacementRunsById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `JsonValue`

***

### getSecurityCenter

`ee.getSecurityCenter`

Pro/Enterprise only. List all security advisories with match status.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getSecurityCenter({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advisories` | `object[] \| null` | No | — |
| `last_checked_at` | `string \| null \| null` | No | — |

> [accordion] advisories full type
>
> ```ts theme={null}
> {
>   download_jar_urls?: {
>     url?: string | null,
>     version?: string | null
>   }[] | null,
>   published_at?: string | null,
>   advisory_url?: string | null | null,
>   last_evaluated_at?: string | null | null,
>   match_status?: unknown | active | resolved | not_affected | error | null,
>   acknowledged_by?: {
>     common_name?: string | null,
>     email?: string | null,
>     id?: number | null
>   } | null | null,
>   title?: string | null,
>   affected_versions?: {
>     fixed?: string | null,
>     min?: string | null
>   }[] | null,
>   remediation?: string | null,
>   advisory_id?: string | null,
>   severity?: critical | high | medium | low | null,
>   description?: string | null,
>   acknowledged_at?: string | null | null
> }[] | null
> ```

***

### getSessionManagement

`ee.getSessionManagement`

Pro/Enterprise only. List sessions.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getSessionManagement({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

The official route description documents optional `status=ended` and `status=all` filters; omitting it lists live sessions.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   status?: ended | all
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   end_reason?: admin | logout | password-change | user-deactivated | tenant-deactivated | sso-logout | support-grant-revoked | expired | timed-out | null | null,
>   last_active_at?: string | null | null,
>   user?: {
>     common_name?: string | null | null,
>     email?: string | null,
>     id?: number | null
>   } | null,
>   device_id?: string | null | null,
>   id?: string | null,
>   expires_at?: string | null,
>   provider?: string | null,
>   ended_at?: string | null | null,
>   status?: live | ended | null,
>   ended_by?: number | null | null,
>   current?: boolean | null,
>   type?: normal | full-app-embed | null,
>   created_at?: string | null,
>   device_description?: string | null | null,
>   ip_address?: string | null | null,
>   user_agent?: string | null | null
> }[] | null
> ```

***

### getSupportAccessGrant

`ee.getSupportAccessGrant`

Pro/Enterprise only. List support access grants with optional filtering and pagination.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getSupportAccessGrant({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   ticket-number?: string | null,
>   user-id?: number | null,
>   include-revoked?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `JsonValue[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

***

### getSupportAccessGrantCurrent

`ee.getSupportAccessGrantCurrent`

Pro/Enterprise only. Get the currently active support access grant, if one exists.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getSupportAccessGrantCurrent({  });
```

**Input:** *empty object*

**Output:** `JsonValue \| null`

***

### getTenant

`ee.getTenant`

Pro/Enterprise only. Get all tenants

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTenant({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   status?: all | deactivated | active
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, string> | null | null,
>   id?: number | null,
>   is_active?: boolean | null,
>   member_count?: number | null,
>   name?: string | null,
>   slug?: string | null,
>   tenant_collection_id?: number | null
> }[] | null
> ```

***

### getTenantById

`ee.getTenantById`

Pro/Enterprise only. Get info about a tenant

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTenantById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, string> \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_active` | `boolean \| null` | No | — |
| `member_count` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `tenant_collection_id` | `number \| null` | No | — |

***

### getTransformsByIdInspect

`ee.getTransformsByIdInspect`

Pro/Enterprise only. Phase 1: Discover available lenses for a transform.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTransformsByIdInspect({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `JsonValue`

***

### getTransformsByIdInspectByLensId

`ee.getTransformsByIdInspectByLensId`

Pro/Enterprise only. Phase 2: Get full lens contents for a transform.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTransformsByIdInspectByLensId({ "path": { "id": 1, "lens-id": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   lens-id: string
> }
> ```

**Output:** `JsonValue`

***

### getTransformTest

`ee.getTransformTest`

Pro/Enterprise only. List the transform tests with their newest runs, optionally only those of one transform.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTransformTest({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   transform-id?: number | null
> }
> ```

**Output:** `JsonValue[]`

***

### getTransformTestById

`ee.getTransformTestById`

Pro/Enterprise only. Get a transform test with its newest run.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTransformTestById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `JsonValue`

***

### getTransformTestByIdRun

`ee.getTransformTestByIdRun`

Pro/Enterprise only. List the runs of a transform test, newest first.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.getTransformTestByIdRun({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   statuses?: (started | passed | failed | error | timeout)[] | null,
>   start-time?: string | null,
>   end-time?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   end_time?: string | null | null,
>   id?: number | null,
>   initiated_by?: number | null | null,
>   initiated_by_user?: {
>     common_name?: string | null | null,
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   last_heartbeat?: string | null,
>   start_time?: string | null,
>   status?: started | passed | failed | error | timeout | null,
>   transform_test_id?: number | null | null
> }[] | null
> ```

***

### postAiControlsMcpPermissionsAdvanced

`ee.postAiControlsMcpPermissionsAdvanced`

Pro/Enterprise only. Switch to group-level MCP tool access.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postAiControlsMcpPermissionsAdvanced({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |
| `tools` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   mcp_enabled?: boolean | null,
>   tool_access?: Record<string, string> | null
> }[] | null
> ```

> [accordion] tools full type
>
> ```ts theme={null}
> {
>   default_access?: allowed | denied | null,
>   description?: string | null,
>   name?: string | null,
>   scope?: string | null
> }[] | null
> ```

***

### postAiControlsPermissionsAdvanced

`ee.postAiControlsPermissionsAdvanced`

Pro/Enterprise only. Switch to group-level permissions.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postAiControlsPermissionsAdvanced({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   perm_type?: permission/metabot | permission/metabot-nlq | permission/metabot-other-tools | permission/metabot-sql-generation | null,
>   perm_value?: yes | no | null
> }[] | null
> ```

***

### postAppsBySlugGroups

`ee.postAppsBySlugGroups`

Pro/Enterprise only. Grant a batch of internal groups read access to a data app's resource collection atomically.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postAppsBySlugGroups({ "path": { "slug": "a" }, "body": { "group_ids": [1] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   group_ids: number[]
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   member_count?: number | null,
>   name?: string | null
> }[]
> ```

***

### postAppsGenerateActions

`ee.postAppsGenerateActions`

Pro/Enterprise only. The YAML files of the implicit actions a data app defines, one per `defineAction` export in `actions`, in its collection with the entity ID `collection`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.postAppsGenerateActions({ "body": { "collection": "aaaaaaaaaaaaaaaaaaaaa", "actions": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   actions: Record<string, {
>     entityId: string,
>     kind: row/create | row/update | row/delete,
>     table: {
>       id: number
>     }
>   }>,
>   collection: string
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contents?: string | null,
>   path?: string | null
> }[]
> ```

***

### postAppsGenerateQueries

`ee.postAppsGenerateQueries`

Pro/Enterprise only. The YAML files of the questions a data app defines, one per `defineQuery` export in `queries`, in its collection with the entity ID `collection`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.postAppsGenerateQueries({ "body": { "collection": "aaaaaaaaaaaaaaaaaaaaa", "queries": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collection: string,
>   queries: Record<string, {
>     entityId: string,
>     query: {
>       stages: JsonValue[]
>     }
>   }>
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contents?: string | null,
>   path?: string | null
> }[]
> ```

***

### postAuditAppAnalyticsDevExport

`ee.postAuditAppAnalyticsDevExport`

Pro/Enterprise only. Export analytics content as a .tar.gz file for local development.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.postAuditAppAnalyticsDevExport({  });
```

**Input:** *empty object*

The route description specifies a tar.gz file while the OpenAPI response schema describes a JSON body envelope. The adapter follows the explicit tarball description and returns a bounded binary artifact.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### postContentDiagnosticsInvalidate

`ee.postContentDiagnosticsInvalidate`

Pro/Enterprise only. Dismiss the findings with `ids`.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postContentDiagnosticsInvalidate({ "body": { "ids": [1] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ids: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invalidated` | `number[] \| null` | No | — |
| `skipped` | `number[] \| null` | No | — |

***

### postCustomVizPlugin

`ee.postCustomVizPlugin`

Pro/Enterprise only. Register a new custom visualization plugin from an uploaded tar.gz bundle.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postCustomVizPlugin({ "body": { "file": { "filename": "", "size": 20, "tempfile": new Blob(["metabase-test-bundle"]) } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

Metabase multipart file input maps to a Corsair Blob-backed file. The default local upload cap is 20 MiB (configurable to 100 MiB); this is a plugin safety cap, not a provider limit.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   file: {
>     filename: string,
>     size: number,
>     tempfile: custom
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `active \| error \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `identifier` | `string \| null` | No | — |
| `display_name` | `string \| null` | No | — |
| `dev_only` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `bundle_hash` | `string \| null \| null` | No | — |
| `manifest` | `JsonValue \| null` | No | — |
| `warnings` | `object[] \| null` | No | — |
| `dev_bundle_url` | `string \| null \| null` | No | — |
| `metabase_version` | `string \| null \| null` | No | — |
| `icon` | `string \| null \| null` | No | — |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### postCustomVizPluginByIdRefresh

`ee.postCustomVizPluginByIdRefresh`

Pro/Enterprise only. Re-fetch the manifest from the dev server for a dev-only plugin.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postCustomVizPluginByIdRefresh({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `active \| error \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `identifier` | `string \| null` | No | — |
| `display_name` | `string \| null` | No | — |
| `dev_only` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `bundle_hash` | `string \| null \| null` | No | — |
| `manifest` | `JsonValue \| null` | No | — |
| `warnings` | `object[] \| null` | No | — |
| `dev_bundle_url` | `string \| null \| null` | No | — |
| `metabase_version` | `string \| null \| null` | No | — |
| `icon` | `string \| null \| null` | No | — |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### postCustomVizPluginDev

`ee.postCustomVizPluginDev`

Pro/Enterprise only. Register a dev-only custom visualization plugin from a local dev server.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postCustomVizPluginDev({ "body": { "dev_bundle_url": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   dev_bundle_url: string,
>   identifier?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `active \| error \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `identifier` | `string \| null` | No | — |
| `display_name` | `string \| null` | No | — |
| `dev_only` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `bundle_hash` | `string \| null \| null` | No | — |
| `manifest` | `JsonValue \| null` | No | — |
| `warnings` | `object[] \| null` | No | — |
| `dev_bundle_url` | `string \| null \| null` | No | — |
| `metabase_version` | `string \| null \| null` | No | — |
| `icon` | `string \| null \| null` | No | — |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### postDataStudioTablePublishTables

`ee.postDataStudioTablePublishTables`

Pro/Enterprise only. Set collection for each of selected tables and all upstream dependencies recursively.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postDataStudioTablePublishTables({ "body": { "collection_id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collection_id: number,
>   database_ids?: number[],
>   schema_ids?: string[],
>   table_ids?: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_collection` | `Record<string, JsonValue> \| null \| null` | No | — |

***

### postDataStudioTableUnpublishTables

`ee.postDataStudioTableUnpublishTables`

Pro/Enterprise only. Unset collection for each of selected tables and all downstream dependents recursively.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postDataStudioTableUnpublishTables({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_ids?: number[],
>   schema_ids?: string[],
>   table_ids?: number[]
> }
> ```

**Output:** `null`

***

### postGsheetsConnection

`ee.postGsheetsConnection`

Pro/Enterprise only. Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postGsheetsConnection({ "body": { "url": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   url: string
> }
> ```

**Output:** `object \| Record<string, JsonValue>`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   error?: boolean | null,
>   message?: string | null
> } | Record<string, JsonValue> | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   sync_started_at?: number | null,
>   url?: string | null
> } | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   sync_started_at?: number | null,
>   url?: string | null
> } | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   last_sync_at?: number | null,
>   next_sync_at?: number | null,
>   url?: string | null
> } | {
>   created_at?: number | null,
>   created_by_id?: number | null,
>   db_id?: number | null,
>   error_message?: string | null,
>   url?: string | null
> }
> ```

***

### postMfaEnroll

`ee.postMfaEnroll`

Pro/Enterprise only. Start TOTP enrollment for the current user.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postMfaEnroll({ "body": { "password": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   password: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `otpauth_uri` | `string \| null` | No | — |
| `secret` | `string \| null` | No | — |

***

### postMfaEnrollConfirm

`ee.postMfaEnrollConfirm`

Pro/Enterprise only. Confirm TOTP enrollment by verifying a code from the authenticator app.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postMfaEnrollConfirm({ "body": { "code": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   code: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recovery_codes` | `string[] \| null` | No | — |

***

### postMfaRecoveryCodes

`ee.postMfaRecoveryCodes`

Pro/Enterprise only. Regenerate the current user's recovery codes, invalidating the entire previous set.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postMfaRecoveryCodes({ "body": { "code": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   code: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recovery_codes` | `string[] \| null` | No | — |

***

### postRemoteSyncCreateBranch

`ee.postRemoteSyncCreateBranch`

Pro/Enterprise only. Create a new branch from the current remote-sync branch and switches the current remote-sync branch to it.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postRemoteSyncCreateBranch({ "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |

***

### postRemoteSyncCurrentTaskCancel

`ee.postRemoteSyncCurrentTaskCancel`

Pro/Enterprise only. Cancels the current task if one is running

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postRemoteSyncCurrentTaskCancel({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `progress` | `number \| null \| null` | No | — |
| `conflicts` | `string[] \| null \| null` | No | — |
| `last_progress_report_at` | `JsonValue \| null` | No | — |
| `id` | `number \| null` | No | — |
| `last_heartbeat_at` | `JsonValue \| null` | No | — |
| `started_at` | `JsonValue \| null` | No | — |
| `ended_at` | `JsonValue \| null` | No | — |
| `initiated_by` | `number \| null \| null` | No | — |
| `cancelled` | `boolean \| null \| null` | No | — |
| `status` | `running \| successful \| errored \| cancelled \| timed-out \| conflict \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `sync_task_type` | `import \| export \| null` | No | — |
| `version` | `string \| null \| null` | No | — |
| `initiated_by_user` | `object \| null` | No | — |
| `outcome` | `Record<string, JsonValue> \| null \| null` | No | — |

> [accordion] initiated\_by\_user full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   first_name?: string | null | null,
>   id?: number | null,
>   last_name?: string | null | null
> } | null | null
> ```

***

### postRemoteSyncExport

`ee.postRemoteSyncExport`

Pro/Enterprise only. Export the current state of the Remote Sync collection to a Source.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postRemoteSyncExport({ "body": { "branch": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   branch: string,
>   force?: boolean,
>   merge?: boolean,
>   message?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | — |
| `task_id` | `number \| null` | No | — |

***

### postRemoteSyncImport

`ee.postRemoteSyncImport`

Pro/Enterprise only. Import Metabase content from configured Remote Sync source.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postRemoteSyncImport({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   branch?: string,
>   expected_branch?: string,
>   force?: boolean,
>   merge?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null \| null` | No | — |
| `status` | `success \| null` | No | — |
| `task_id` | `number \| null \| null` | No | — |

***

### postRemoteSyncStash

`ee.postRemoteSyncStash`

Pro/Enterprise only. Stashes changes to a new branch, and changes the current branch to it.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postRemoteSyncStash({ "body": { "new_branch": "a", "message": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   message: string,
>   new_branch: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `task_id` | `number \| null` | No | — |

***

### postRemoteSyncTestConnection

`ee.postRemoteSyncTestConnection`

Pro/Enterprise only. Test whether the Remote Sync credentials can reach the git repository.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.postRemoteSyncTestConnection({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   remote-sync-token?: string | null,
>   remote-sync-url?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `success \| null` | No | — |

***

### postReplacementCheckReplaceSource

`ee.postReplacementCheckReplaceSource`

Pro/Enterprise only. Check whether a source entity can be replaced by a target entity.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.postReplacementCheckReplaceSource({ "body": { "source_entity_id": 1, "source_entity_type": "card", "target_entity_id": 1, "target_entity_type": "card" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   source_entity_id: number | number,
>   source_entity_type: card | table | transform,
>   target_entity_id: number | number,
>   target_entity_type: card | table | transform
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `column_mappings` | `object[] \| null` | No | — |
| `errors` | `(cycle-detected \| database-mismatch \| incompatible-implicit-joins \| affects-gtap-policies)[] \| null` | No | — |
| `success` | `boolean \| null` | No | — |

> [accordion] column\_mappings full type
>
> ```ts theme={null}
> {
>   errors?: (column-type-mismatch | missing-primary-key | missing-foreign-key | foreign-key-mismatch)[] | null,
>   source?: {
>     base_type?: string | null | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     id?: number | null | null,
>     name?: string | null,
>     semantic_type?: string | null | null
>   } | null | null,
>   target?: {
>     base_type?: string | null | null,
>     display_name?: string | null,
>     effective_type?: string | null | null,
>     id?: number | null | null,
>     name?: string | null,
>     semantic_type?: string | null | null
>   } | null | null
> }[] | null
> ```

***

### postReplacementReplaceModelWithTransform

`ee.postReplacementReplaceModelWithTransform`

Pro/Enterprise only. Create a transform from a model, execute it, and replace all usages of the model with the output table.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postReplacementReplaceModelWithTransform({ "body": { "card_id": 1, "transform_name": "", "transform_target": { "type": "table", "name": "" } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   card_id: number | number,
>   target_collection_id?: number | number | null,
>   transform_name: string,
>   transform_tag_ids?: number[] | null,
>   transform_target: {
>     database?: number | null,
>     name: string,
>     schema?: string | null,
>     type: table
>   } | {
>     database?: number | null,
>     name: string,
>     schema?: string | null,
>     target-incremental-strategy: {
>       type: append
>     } | {
>       type: merge,
>       unique-key: {
>         field-id?: number | null,
>         name?: string
>       }[]
>     },
>     type: table-incremental
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `run_id` | `number \| null` | No | — |

***

### postReplacementReplaceSource

`ee.postReplacementReplaceSource`

Pro/Enterprise only. Replace all usages of a source entity with a target entity asynchronously.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postReplacementReplaceSource({ "body": { "source_entity_id": 1, "source_entity_type": "card", "target_entity_id": 1, "target_entity_type": "card" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   source_entity_id: number | number,
>   source_entity_type: card | table | transform,
>   target_entity_id: number | number,
>   target_entity_type: card | table | transform
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `run_id` | `number \| null` | No | — |

***

### postReplacementRunsByIdCancel

`ee.postReplacementRunsByIdCancel`

Pro/Enterprise only. Cancel a running source replacement.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postReplacementRunsByIdCancel({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |

***

### postSecurityCenterAcknowledge

`ee.postSecurityCenterAcknowledge`

Pro/Enterprise only. Acknowledge multiple security advisories.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postSecurityCenterAcknowledge({ "body": { "advisory_ids": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   advisory_ids: string[]
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   acknowledged_at?: string | null | null,
>   acknowledged_by?: {
>     common_name?: string | null,
>     email?: string | null,
>     id?: number | null
>   } | null | null,
>   advisory_id?: string | null,
>   match_status?: unknown | active | resolved | not_affected | error | null
> }[]
> ```

***

### postSecurityCenterByAdvisoryIdAcknowledge

`ee.postSecurityCenterByAdvisoryIdAcknowledge`

Pro/Enterprise only. Acknowledge a security advisory.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postSecurityCenterByAdvisoryIdAcknowledge({ "path": { "advisory-id": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   advisory-id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acknowledged_at` | `string \| null \| null` | No | — |
| `acknowledged_by` | `object \| null` | No | — |
| `advisory_id` | `string \| null` | No | — |
| `match_status` | `unknown \| active \| resolved \| not_affected \| error \| null` | No | — |

> [accordion] acknowledged\_by full type
>
> ```ts theme={null}
> {
>   common_name?: string | null,
>   email?: string | null,
>   id?: number | null
> } | null | null
> ```

***

### postSecurityCenterSync

`ee.postSecurityCenterSync`

Pro/Enterprise only. Trigger an async advisory sync + re-evaluation.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postSecurityCenterSync({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | — |

***

### postSecurityCenterTestNotification

`ee.postSecurityCenterTestNotification`

Pro/Enterprise only. Send a test notification through the given Security Center channels.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postSecurityCenterTestNotification({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   email_recipients?: JsonValue[] | null,
>   slack_channel?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |

***

### postSessionManagementRevoke

`ee.postSessionManagementRevoke`

Pro/Enterprise only. Revoke — end — every live session matching the given criteria, which are the filters the list endpoint takes.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postSessionManagementRevoke({ "body": { "user-id": 42 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue \| null` | No | — |

An empty body matches every eligible live session on the instance. Pass a filter such as user-id to end one user's sessions.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `remaining` | `number \| null` | No | — |
| `revoked` | `number \| null` | No | — |
| `user_ids` | `number[] \| null` | No | — |

***

### postSupportAccessGrant

`ee.postSupportAccessGrant`

Pro/Enterprise only. Create a new support access grant.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postSupportAccessGrant({ "body": { "grant_duration_minutes": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   grant_duration_minutes: number,
>   notes?: string | null,
>   ticket_number?: string | null
> }
> ```

**Output:** `JsonValue`

***

### postTenant

`ee.postTenant`

Pro/Enterprise only. Create a new Tenant

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postTenant({ "body": { "name": "a", "slug": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, string | number | boolean | null | (string | number | boolean | null)[]> | null,
>   name: string,
>   slug: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, string> \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_active` | `boolean \| null` | No | — |
| `member_count` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `tenant_collection_id` | `number \| null` | No | — |

***

### postTransformsByIdInspectByLensIdQuery

`ee.postTransformsByIdInspectByLensIdQuery`

Pro/Enterprise only. Execute a query in the context of a transform inspector lens.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.ee.postTransformsByIdInspectByLensIdQuery({ "path": { "id": 1, "lens-id": "a" }, "body": { "query": { "stages": [{ "lib/type": "mbql.stage/native" }] } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   lens-id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   lens_params?: {
>     join_step?: number | null
>   } | null,
>   query: JsonValue | {
>     database: number,
>     type: native,
>     native: JsonValue
>   } | {
>     database: number,
>     type: query,
>     query: JsonValue
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `row_count` | `number \| null` | No | — |
| `error` | `string \| null` | No | — |
| `started_at` | `string \| null` | No | — |
| `database_id` | `number \| null` | No | — |
| `context` | `JsonValue \| null` | No | — |
| `status` | `completed \| failed \| null` | No | — |
| `error_type` | `string \| null` | No | — |
| `running_time` | `number \| null` | No | — |
| `json_query` | `Record<string, JsonValue> \| null` | No | — |
| `average_execution_time` | `number \| null \| null` | No | — |
| `cached` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   insights?: Record<string, JsonValue>[] | null,
>   results_metadata?: {
>     columns?: JsonValue[] | null
>   } | null,
>   download_perms?: string | null,
>   format-rows??: boolean | null,
>   is_sandboxed?: boolean | null,
>   cols?: JsonValue[] | null,
>   sandbox_details?: Record<string, JsonValue>[] | null,
>   results_timezone?: string | null,
>   rows?: JsonValue[][] | null,
>   native_form?: Record<string, JsonValue> | null
> } | null
> ```

***

### postTransformsPythonTestRun

`ee.postTransformsPythonTestRun`

Pro/Enterprise only. Evaluate an ad-hoc python transform on a sample of input data.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postTransformsPythonTestRun({ "body": { "code": "", "source_tables": [{ "alias": "" }] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   code: string,
>   output_row_limit?: (number & number)& number,
>   per_input_row_limit?: (number & number)& number,
>   source_tables: {
>     alias: string,
>     database_id?: number | null,
>     schema?: string | null,
>     table?: string,
>     table_id?: number | null
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | — |
| `logs` | `string \| null` | No | — |
| `output` | `object \| null` | No | — |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null
> } | null
> ```

> [accordion] output full type
>
> ```ts theme={null}
> {
>   cols?: {
>     name?: string | null
>   }[] | null,
>   rows?: JsonValue[] | null
> } | null
> ```

***

### postTransformTest

`ee.postTransformTest`

Pro/Enterprise only. Create a transform test.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.postTransformTest({ "body": { "transform_id": 1, "name": "a", "inputs": [], "expectations": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue` | No | — |

**Output:** `JsonValue`

***

### postTransformTestByIdRun

`ee.postTransformTestByIdRun`

Pro/Enterprise only. Run a transform test, which reading it is enough to do.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.postTransformTestByIdRun({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expectations` | `(JsonValue \| JsonValue)[] \| null` | No | — |
| `status` | `passed \| failed \| error \| null` | No | — |
| `tables` | `Record<string, string> \| null` | No | — |

***

### putAiControlsMcpPermissions

`ee.putAiControlsMcpPermissions`

Pro/Enterprise only. Set the MCP tool policy of the given groups, in one transaction, and return the policy of every group.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putAiControlsMcpPermissions({ "body": { "permissions": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   permissions: {
>     group_id: number,
>     mcp_enabled: boolean,
>     tool_access: Record<string, string>
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |
| `tools` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   mcp_enabled?: boolean | null,
>   tool_access?: Record<string, string> | null
> }[] | null
> ```

> [accordion] tools full type
>
> ```ts theme={null}
> {
>   default_access?: allowed | denied | null,
>   description?: string | null,
>   name?: string | null,
>   scope?: string | null
> }[] | null
> ```

***

### putAiControlsPermissions

`ee.putAiControlsPermissions`

Pro/Enterprise only. Update metabot permissions for all groups.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putAiControlsPermissions({ "body": { "permissions": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   permissions: {
>     group_id: number,
>     perm_type: permission/metabot-nlq | permission/metabot-sql-generation | permission/metabot-other-tools | permission/metabot,
>     perm_value: yes | no
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `advanced` | `boolean \| null` | No | — |
| `permissions` | `object[] \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   group_id?: number | null,
>   perm_type?: permission/metabot | permission/metabot-nlq | permission/metabot-other-tools | permission/metabot-sql-generation | null,
>   perm_value?: yes | no | null
> }[] | null
> ```

***

### putAiControlsUsageGroupByGroupId

`ee.putAiControlsUsageGroupByGroupId`

Pro/Enterprise only. Set or update the metabot usage limit for a specific group.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.putAiControlsUsageGroupByGroupId({ "path": { "group-id": 1 }, "body": { "max_usage": 0 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   group-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   max_usage: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_id` | `number \| null` | No | — |
| `max_usage` | `number \| null \| null` | No | — |

***

### putAiControlsUsageInstance

`ee.putAiControlsUsageInstance`

Pro/Enterprise only. Set or update the instance-wide metabot usage limit.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.putAiControlsUsageInstance({ "body": { "max_usage": 0 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   max_usage: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `max_usage` | `number \| null \| null` | No | — |

***

### putAiControlsUsageTenantByTenantId

`ee.putAiControlsUsageTenantByTenantId`

Pro/Enterprise only. Set or update the metabot usage limit for a specific tenant.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.putAiControlsUsageTenantByTenantId({ "path": { "tenant-id": 1 }, "body": { "max_usage": 0 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tenant-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   max_usage: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `max_usage` | `number \| null \| null` | No | — |
| `tenant_id` | `number \| null` | No | — |

***

### putAppsBySlug

`ee.putAppsBySlug`

Pro/Enterprise only. Enable or disable a data app.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.putAppsBySlug({ "path": { "slug": "a" }, "body": { "enabled": false } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   enabled: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `version` | `number \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `bundle_hash` | `string \| null \| null` | No | — |
| `allowed_hosts` | `string[] \| null` | No | — |
| `outdated` | `boolean \| null` | No | — |
| `resource_collection_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `bundle_path` | `string \| null` | No | — |

***

### putCustomVizPluginById

`ee.putCustomVizPluginById`

Pro/Enterprise only. Update a custom visualization plugin.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putCustomVizPluginById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `active \| error \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `identifier` | `string \| null` | No | — |
| `display_name` | `string \| null` | No | — |
| `dev_only` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `bundle_hash` | `string \| null \| null` | No | — |
| `manifest` | `JsonValue \| null` | No | — |
| `warnings` | `object[] \| null` | No | — |
| `dev_bundle_url` | `string \| null \| null` | No | — |
| `metabase_version` | `string \| null \| null` | No | — |
| `icon` | `string \| null \| null` | No | — |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### putCustomVizPluginByIdBundle

`ee.putCustomVizPluginByIdBundle`

Pro/Enterprise only. Replace the bundle for an existing plugin.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putCustomVizPluginByIdBundle({ "path": { "id": 1 }, "body": { "file": { "filename": "", "size": 20, "tempfile": new Blob(["metabase-test-bundle"]) } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

Replaces a custom-visualization tar.gz bundle using a multipart file part; the output is the documented plugin record.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   file: {
>     filename: string,
>     size: number,
>     tempfile: custom
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `active \| error \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `identifier` | `string \| null` | No | — |
| `display_name` | `string \| null` | No | — |
| `dev_only` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `bundle_hash` | `string \| null \| null` | No | — |
| `manifest` | `JsonValue \| null` | No | — |
| `warnings` | `object[] \| null` | No | — |
| `dev_bundle_url` | `string \| null \| null` | No | — |
| `metabase_version` | `string \| null \| null` | No | — |
| `icon` | `string \| null \| null` | No | — |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### putCustomVizPluginByIdDevUrl

`ee.putCustomVizPluginByIdDevUrl`

Pro/Enterprise only. Set or clear the dev base URL for a plugin (e.g.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putCustomVizPluginByIdDevUrl({ "path": { "id": 1 }, "body": { "dev_bundle_url": "" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   dev_bundle_url: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dev_bundle_url` | `string \| null \| null` | No | — |

***

### putRemoteSyncSettings

`ee.putRemoteSyncSettings`

Pro/Enterprise only. Update Remote Sync related settings.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.putRemoteSyncSettings({ "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   collections?: Record<string, boolean> | null,
>   remote-sync-auto-import?: boolean | null,
>   remote-sync-branch?: string | null,
>   remote-sync-token?: string | null,
>   remote-sync-transforms?: boolean | null,
>   remote-sync-type?: read-only | read-write | null,
>   remote-sync-url?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `task_id` | `number \| null` | No | — |

***

### putSupportAccessGrantByIdRevoke

`ee.putSupportAccessGrantByIdRevoke`

Pro/Enterprise only. Revoke an existing support access grant.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putSupportAccessGrantByIdRevoke({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `JsonValue`

***

### putTenantById

`ee.putTenantById`

Pro/Enterprise only. Update a tenant, can set name, attributes, or whether this tenant is active.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.ee.putTenantById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, string | number | boolean | null | (string | number | boolean | null)[]> | null,
>   is_active?: boolean | null,
>   name?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, string> \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_active` | `boolean \| null` | No | — |
| `member_count` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `tenant_collection_id` | `number \| null` | No | — |

***

### putTransformTestById

`ee.putTransformTestById`

Pro/Enterprise only. Update a transform test.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.ee.putTransformTestById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `JsonValue` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `JsonValue`

***

## Embedding Hub

### getChecklist

`embeddingHub.getChecklist`

Get the setup guide checklist status, indicating which setup steps have been completed.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.embeddingHub.getChecklist({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `checklist` | `object \| null` | No | — |
| `data-isolation-strategy` | `row-column-level-security \| connection-impersonation \| database-routing \| null \| null` | No | — |

> [accordion] checklist full type
>
> ```ts theme={null}
> {
>   enable-tenants?: boolean | null,
>   create-models?: boolean | null,
>   sso-configured?: boolean | null,
>   configure-row-column-security?: boolean | null,
>   create-custom-theme?: boolean | null,
>   create-test-embed?: boolean | null,
>   data-permissions-and-enable-tenants?: boolean | null,
>   embed-production?: boolean | null,
>   create-dashboard?: boolean | null,
>   move-dashboard-to-shared?: boolean | null,
>   configure-ai?: boolean | null,
>   setup-data-segregation-strategy?: boolean | null,
>   create-tenants?: boolean | null,
>   add-data?: boolean | null,
>   sso-auth-manual-tested?: boolean | null
> } | null
> ```

***

## Embedding Sdk

### getReact18Hosts

`embeddingSdk.getReact18Hosts`

The host apps that used the React embedding SDK with React 18 in the last 4 days, newest first, at most 50.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.embeddingSdk.getReact18Hosts({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   host?: string | null | null,
>   id?: number | null,
>   last_seen_at?: string | null
> }[]
> ```

***

## Embed Theme

### deleteById

`embedTheme.deleteById`

Delete an embedding theme.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.embedTheme.deleteById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### get

`embedTheme.get`

Fetch a list of all embedding themes.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.embedTheme.get({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   entity_id?: string | null,
>   id?: number | null,
>   is_default?: boolean | null,
>   name?: string | null,
>   settings?: Record<string, JsonValue> | null,
>   updated_at?: string | null
> }[]
> ```

***

### getById

`embedTheme.getById`

Fetch a single embedding theme by ID.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.embedTheme.getById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | — |
| `entity_id` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_default` | `boolean \| null` | No | — |
| `name` | `string \| null` | No | — |
| `settings` | `Record<string, JsonValue> \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### post

`embedTheme.post`

Create a new embedding theme.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.embedTheme.post({ "body": { "name": "a", "settings": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string,
>   settings: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | — |
| `entity_id` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_default` | `boolean \| null` | No | — |
| `name` | `string \| null` | No | — |
| `settings` | `Record<string, JsonValue> \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### postByIdCopy

`embedTheme.postByIdCopy`

Copy an embedding theme.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.embedTheme.postByIdCopy({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | — |
| `entity_id` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_default` | `boolean \| null` | No | — |
| `name` | `string \| null` | No | — |
| `settings` | `Record<string, JsonValue> \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### postSeedDefaults

`embedTheme.postSeedDefaults`

Seed default embedding themes on first call, using the payloads built by the frontend from the `METABASE_LIGHT_THEME` / `METABASE_DARK_THEME` constants.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.embedTheme.postSeedDefaults({ "body": { "themes": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   themes: {
>     name: string,
>     settings: Record<string, JsonValue>
>   }[]
> }
> ```

**Output:** `null`

***

### putById

`embedTheme.putById`

Update an embedding theme.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.embedTheme.putById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   settings?: Record<string, JsonValue> | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | — |
| `entity_id` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `is_default` | `boolean \| null` | No | — |
| `name` | `string \| null` | No | — |
| `settings` | `Record<string, JsonValue> \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

## Eval Trace

### getBySessionId

`evalTrace.getBySessionId`

Return the captured eval trace as JSONL (one span per line) for `session-id`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.evalTrace.getBySessionId({ "path": { "session-id": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

The JSONL response is returned as a bounded binary artifact rather than passed through JSON decoding.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   session-id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

## Exploration

### deleteById

`exploration.deleteById`

Hard-delete an exploration.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.exploration.deleteById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### getById

`exploration.getById`

Fetch an exploration with its thread, selections, and generated queries.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.exploration.getById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `threads` | `object[] \| null` | No | — |
| `can_delete` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `document` | `object \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `can_restore` | `boolean \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] threads full type
>
> ```ts theme={null}
> {
>   queries?: {
>     exploration_thread_id?: number | null,
>     segment_id?: number | null | null,
>     dimension_id?: string | null | null,
>     row_count?: number | null | null,
>     contextual_interestingness_score?: number | null | null,
>     entity_id?: string | null | null,
>     id?: number | null,
>     interestingness_score?: number | null | null,
>     started_at?: JsonValue | null,
>     card_id?: number | null,
>     position?: number | null,
>     name?: string | null | null,
>     status?: string | null,
>     error_message?: string | null | null,
>     query_type?: string | null,
>     segment_name?: string | null | null,
>     display?: string | null | null,
>     dimension_name?: string | null,
>     finished_at?: JsonValue | null
>   }[] | null | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   blocks?: JsonValue[] | null | null,
>   position?: number | null,
>   status?: pending | running | canceled | empty | failed | completed | forbidden | null,
>   source_page_id?: number | null | null,
>   prompt?: string | null | null,
>   timelines?: {
>     position?: number | null,
>     timeline?: Record<string, JsonValue> | null | null,
>     timeline_id?: number | null
>   }[] | null | null,
>   exploration_id?: number | null,
>   completed_at?: JsonValue | null,
>   canceled_at?: JsonValue | null
> }[] | null | null
> ```

> [accordion] document full type
>
> ```ts theme={null}
> {
>   is_placeholder?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   archived?: boolean | null,
>   updated_at?: string | null,
>   exploration_id?: number | null,
>   created_at?: string | null,
>   creator_id?: number | null,
>   content_type?: string | null
> } | null | null
> ```

***

### getDimensions

`exploration.getDimensions`

Hydrated metrics plus a deduplicated dimension list, for the Exploration data modal.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.exploration.getDimensions({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dimension_groups` | `object[] \| null` | No | — |
| `metrics` | `object[] \| null` | No | — |

> [accordion] dimension\_groups full type
>
> ```ts theme={null}
> {
>   dimension_interestingness?: number | null | null,
>   dimensions?: JsonValue[] | null,
>   name?: string | null
> }[] | null
> ```

> [accordion] metrics full type
>
> ```ts theme={null}
> {
>   dimension_mappings?: {
>     dimension-id?: string | null,
>     table-id?: number | null | null,
>     target?: JsonValue | null,
>     type?: table | null
>   }[] | null | null,
>   collection?: {
>     id?: number | null | null,
>     name?: string | null
>   } | null | null,
>   result_column_name?: string | null | null,
>   id?: number | null,
>   name?: string | null,
>   database_id?: number | null | null,
>   dimension_ids?: JsonValue[] | null,
>   collection_id?: number | null | null,
>   in_library?: boolean | null,
>   description?: string | null | null
> }[] | null
> ```

***

### getMine

`exploration.getMine`

Explorations the current user created or edited, most-recently-touched first, paginated.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.exploration.getMine({  });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   collection?: {
>     id?: number | null,
>     name?: string | null
>   } | null | null,
>   id?: number | null,
>   creator?: {
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   name?: string | null,
>   archived?: boolean | null,
>   updated_at?: string | null,
>   current_user_last_touched_at?: string | null,
>   collection_id?: number | null | null,
>   created_at?: string | null,
>   creator_id?: number | null,
>   description?: string | null | null
> }[] | null
> ```

***

### getQueryById

`exploration.getQueryById`

Stream the result of a single completed exploration query.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.exploration.getQueryById({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

`format=api` and `format=json` return the declared JSON response; `format=csv` and `format=xlsx` return bounded binary artifacts.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   format?: api | csv | json | xlsx
> }
> ```

**Output:** `JsonValue \| object`

> [accordion] Output full type
>
> ```ts theme={null}
> JsonValue | {
>   kind: binary,
>   contentType: string | null,
>   base64: string,
>   size: number,
>   headers: {
>     contentDisposition?: string,
>     contentSecurityPolicy?: string,
>     cacheControl?: string,
>     etag?: string
>   }
> }
> ```

***

### post

`exploration.post`

Metabase POST /api/exploration

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.exploration.post({ "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   blocks?: {
>     dimensions?: {
>       dimension-id: string,
>       display-name?: string | null,
>       effective-type?: string | null,
>       semantic-type?: string | null
>     }[] | null,
>     metrics?: {
>       card_id: number,
>       dimension_mappings?: {
>         dimension-id: string,
>         table-id?: number | null,
>         target: JsonValue,
>         type?: table
>       }[] | null
>     }[] | null
>   }[] | null,
>   collection_id?: number | null,
>   description?: string | null,
>   name: string,
>   prompt?: string | null,
>   timeline_ids?: number[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `threads` | `object[] \| null` | No | — |
| `can_delete` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `document` | `object \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `can_restore` | `boolean \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] threads full type
>
> ```ts theme={null}
> {
>   queries?: {
>     exploration_thread_id?: number | null,
>     segment_id?: number | null | null,
>     dimension_id?: string | null | null,
>     row_count?: number | null | null,
>     contextual_interestingness_score?: number | null | null,
>     entity_id?: string | null | null,
>     id?: number | null,
>     interestingness_score?: number | null | null,
>     started_at?: JsonValue | null,
>     card_id?: number | null,
>     position?: number | null,
>     name?: string | null | null,
>     status?: string | null,
>     error_message?: string | null | null,
>     query_type?: string | null,
>     segment_name?: string | null | null,
>     display?: string | null | null,
>     dimension_name?: string | null,
>     finished_at?: JsonValue | null
>   }[] | null | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   blocks?: JsonValue[] | null | null,
>   position?: number | null,
>   status?: pending | running | canceled | empty | failed | completed | forbidden | null,
>   source_page_id?: number | null | null,
>   prompt?: string | null | null,
>   timelines?: {
>     position?: number | null,
>     timeline?: Record<string, JsonValue> | null | null,
>     timeline_id?: number | null
>   }[] | null | null,
>   exploration_id?: number | null,
>   completed_at?: JsonValue | null,
>   canceled_at?: JsonValue | null
> }[] | null | null
> ```

> [accordion] document full type
>
> ```ts theme={null}
> {
>   is_placeholder?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   archived?: boolean | null,
>   updated_at?: string | null,
>   exploration_id?: number | null,
>   created_at?: string | null,
>   creator_id?: number | null,
>   content_type?: string | null
> } | null | null
> ```

***

### postByIdExploreFurther

`exploration.postByIdExploreFurther`

Start a follow-up investigation scoped to a clicked chart segment.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.exploration.postByIdExploreFurther({ "path": { "id": 1 }, "body": { "page_id": 1, "explore_filters": [{ "operator": "=", "field_ref": ["expression", "a"], "value": "", "display_value": "a" }] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   explore_filters: (
>     {
>       dimension_name?: string | null,
>       display_value: string,
>       field_ref: JsonValue[] | JsonValue[] | JsonValue[],
>       operator: =,
>       value: string | number | boolean | null
>     } | {
>       dimension_name?: string | null,
>       display_value: string,
>       field_ref: JsonValue[] | JsonValue[] | JsonValue[],
>       operator: between,
>       values: JsonValue[]
>     }
>   )[],
>   page_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `threads` | `object[] \| null` | No | — |
| `can_delete` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `document` | `object \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `can_restore` | `boolean \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] threads full type
>
> ```ts theme={null}
> {
>   queries?: {
>     exploration_thread_id?: number | null,
>     segment_id?: number | null | null,
>     dimension_id?: string | null | null,
>     row_count?: number | null | null,
>     contextual_interestingness_score?: number | null | null,
>     entity_id?: string | null | null,
>     id?: number | null,
>     interestingness_score?: number | null | null,
>     started_at?: JsonValue | null,
>     card_id?: number | null,
>     position?: number | null,
>     name?: string | null | null,
>     status?: string | null,
>     error_message?: string | null | null,
>     query_type?: string | null,
>     segment_name?: string | null | null,
>     display?: string | null | null,
>     dimension_name?: string | null,
>     finished_at?: JsonValue | null
>   }[] | null | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   blocks?: JsonValue[] | null | null,
>   position?: number | null,
>   status?: pending | running | canceled | empty | failed | completed | forbidden | null,
>   source_page_id?: number | null | null,
>   prompt?: string | null | null,
>   timelines?: {
>     position?: number | null,
>     timeline?: Record<string, JsonValue> | null | null,
>     timeline_id?: number | null
>   }[] | null | null,
>   exploration_id?: number | null,
>   completed_at?: JsonValue | null,
>   canceled_at?: JsonValue | null
> }[] | null | null
> ```

> [accordion] document full type
>
> ```ts theme={null}
> {
>   is_placeholder?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   archived?: boolean | null,
>   updated_at?: string | null,
>   exploration_id?: number | null,
>   created_at?: string | null,
>   creator_id?: number | null,
>   content_type?: string | null
> } | null | null
> ```

***

### postByIdSummaryAppend

`exploration.postByIdSummaryAppend`

Append a static `cardEmbed` representing a *composite chart* — built from one or more `ExplorationQuery` snapshots combined into a single qp-result — to the exploration's Summary document.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.exploration.postByIdSummaryAppend({ "path": { "id": 1 }, "body": { "exploration_query_ids": [1], "display": "", "visualization_settings": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   display: string,
>   exploration_query_ids: number[],
>   visualization_settings: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `is_placeholder` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `exploration_id` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `content_type` | `string \| null` | No | — |

***

### postThreadByThreadIdCancel

`exploration.postThreadByThreadIdCancel`

Cancel an in-flight exploration thread.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.exploration.postThreadByThreadIdCancel({ "path": { "thread-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   thread-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `canceled_at` | `JsonValue \| null` | No | — |
| `completed_at` | `JsonValue \| null` | No | — |
| `id` | `number \| null` | No | — |

***

### postThreadByThreadIdRestart

`exploration.postThreadByThreadIdRestart`

Re-run one exploration thread in place, keeping its selections: drops the thread's materialized queries and clears the terminal-state gates so the background planner re-claims it.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.exploration.postThreadByThreadIdRestart({ "path": { "thread-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   thread-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `threads` | `object[] \| null` | No | — |
| `can_delete` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `document` | `object \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `can_restore` | `boolean \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] threads full type
>
> ```ts theme={null}
> {
>   queries?: {
>     exploration_thread_id?: number | null,
>     segment_id?: number | null | null,
>     dimension_id?: string | null | null,
>     row_count?: number | null | null,
>     contextual_interestingness_score?: number | null | null,
>     entity_id?: string | null | null,
>     id?: number | null,
>     interestingness_score?: number | null | null,
>     started_at?: JsonValue | null,
>     card_id?: number | null,
>     position?: number | null,
>     name?: string | null | null,
>     status?: string | null,
>     error_message?: string | null | null,
>     query_type?: string | null,
>     segment_name?: string | null | null,
>     display?: string | null | null,
>     dimension_name?: string | null,
>     finished_at?: JsonValue | null
>   }[] | null | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   blocks?: JsonValue[] | null | null,
>   position?: number | null,
>   status?: pending | running | canceled | empty | failed | completed | forbidden | null,
>   source_page_id?: number | null | null,
>   prompt?: string | null | null,
>   timelines?: {
>     position?: number | null,
>     timeline?: Record<string, JsonValue> | null | null,
>     timeline_id?: number | null
>   }[] | null | null,
>   exploration_id?: number | null,
>   completed_at?: JsonValue | null,
>   canceled_at?: JsonValue | null
> }[] | null | null
> ```

> [accordion] document full type
>
> ```ts theme={null}
> {
>   is_placeholder?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   archived?: boolean | null,
>   updated_at?: string | null,
>   exploration_id?: number | null,
>   created_at?: string | null,
>   creator_id?: number | null,
>   content_type?: string | null
> } | null | null
> ```

***

### putById

`exploration.putById`

Update an exploration's metadata, archive state, or move it to a different collection.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.exploration.putById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean,
>   collection_id?: number | null,
>   collection_position?: number | null,
>   description?: string | null,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `threads` | `object[] \| null` | No | — |
| `can_delete` | `boolean \| null` | No | — |
| `id` | `number \| null` | No | — |
| `document` | `object \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `can_restore` | `boolean \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] threads full type
>
> ```ts theme={null}
> {
>   queries?: {
>     exploration_thread_id?: number | null,
>     segment_id?: number | null | null,
>     dimension_id?: string | null | null,
>     row_count?: number | null | null,
>     contextual_interestingness_score?: number | null | null,
>     entity_id?: string | null | null,
>     id?: number | null,
>     interestingness_score?: number | null | null,
>     started_at?: JsonValue | null,
>     card_id?: number | null,
>     position?: number | null,
>     name?: string | null | null,
>     status?: string | null,
>     error_message?: string | null | null,
>     query_type?: string | null,
>     segment_name?: string | null | null,
>     display?: string | null | null,
>     dimension_name?: string | null,
>     finished_at?: JsonValue | null
>   }[] | null | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   blocks?: JsonValue[] | null | null,
>   position?: number | null,
>   status?: pending | running | canceled | empty | failed | completed | forbidden | null,
>   source_page_id?: number | null | null,
>   prompt?: string | null | null,
>   timelines?: {
>     position?: number | null,
>     timeline?: Record<string, JsonValue> | null | null,
>     timeline_id?: number | null
>   }[] | null | null,
>   exploration_id?: number | null,
>   completed_at?: JsonValue | null,
>   canceled_at?: JsonValue | null
> }[] | null | null
> ```

> [accordion] document full type
>
> ```ts theme={null}
> {
>   is_placeholder?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   archived?: boolean | null,
>   updated_at?: string | null,
>   exploration_id?: number | null,
>   created_at?: string | null,
>   creator_id?: number | null,
>   content_type?: string | null
> } | null | null
> ```

***

### putPageByIdStarred

`exploration.putPageByIdStarred`

Set whether an exploration page is starred.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.exploration.putPageByIdStarred({ "path": { "id": 1 }, "body": { "starred": false } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   starred: boolean
> }
> ```

**Output:** `null`

***

### putPagesHidden

`exploration.putPagesHidden`

Set whether one or more exploration pages are hidden from the sidebar.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.exploration.putPagesHidden({ "body": { "page_ids": [], "hidden": false } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   hidden: boolean,
>   page_ids: number[]
> }
> ```

**Output:** `null`

***

## Field

### postTableIds

`field.postTableIds`

Get unique Table IDs for a list of Field IDs.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.field.postTableIds({ "body": { "field_ids": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   field_ids: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `table_ids` | `number[] \| null` | No | — |

***

## Health Inspector

### get

`healthInspector.get`

Get a list of recent health check runs.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.healthInspector.get({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   check_name?: string | null,
>   health?: number | null,
>   message?: string | null,
>   run_at?: string | null
> }[]
> ```

***

## Index

### get

`index.get`

A transform's indexes: those physically in the warehouse, merged with its managed requests.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.index.get({ "query": { "transform-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   transform-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `warehouse_error` | `string \| null \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   is_valid?: boolean | null,
>   key_columns?: string[] | null,
>   access_method?: string | null | null,
>   metabase_managed?: boolean | null,
>   name?: string | null | null,
>   is_unique?: boolean | null,
>   present_in_warehouse?: boolean | null,
>   is_primary?: boolean | null,
>   request?: {
>     index_name?: string | null,
>     structured?: JsonValue | null,
>     transform_id?: number | null,
>     id?: number | null,
>     created_by?: number | null | null,
>     updated_at?: JsonValue | null,
>     status?: create-pending | update-pending | delete-pending | running | succeeded | failed | null,
>     error_message?: string | null | null,
>     created_at?: JsonValue | null,
>     last_executed_at?: JsonValue | null
>   } | null,
>   kind?: string | null,
>   partial_predicate?: string | null | null,
>   include_columns?: (string | null)[] | null
> }[] | null
> ```

***

### getRequestById

`index.getRequestById`

Fetch a single index request (e.g.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.index.getRequestById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `index_name` | `string \| null` | No | — |
| `structured` | `JsonValue \| null` | No | — |
| `transform_id` | `number \| null` | No | — |
| `id` | `number \| null` | No | — |
| `created_by` | `number \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `create-pending \| update-pending \| delete-pending \| running \| succeeded \| failed \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `last_executed_at` | `JsonValue \| null` | No | — |

***

### postRequest

`index.postRequest`

Create an index request on a transform's target table.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.index.postRequest({ "body": { "transform_id": 1, "structured": { "kind": "btree", "name": "a", "columns": [{ "name": "a" }] } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   structured: JsonValue,
>   transform_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `index_name` | `string \| null` | No | — |
| `structured` | `JsonValue \| null` | No | — |
| `transform_id` | `number \| null` | No | — |
| `id` | `number \| null` | No | — |
| `created_by` | `number \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `create-pending \| update-pending \| delete-pending \| running \| succeeded \| failed \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `last_executed_at` | `JsonValue \| null` | No | — |

***

### putRequestById

`index.putRequestById`

Replace the structured definition of an index request, marking it update-pending.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.index.putRequestById({ "path": { "id": 1 }, "body": { "structured": { "kind": "btree", "name": "a", "columns": [{ "name": "a" }] } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   structured: JsonValue
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `index_name` | `string \| null` | No | — |
| `structured` | `JsonValue \| null` | No | — |
| `transform_id` | `number \| null` | No | — |
| `id` | `number \| null` | No | — |
| `created_by` | `number \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `status` | `create-pending \| update-pending \| delete-pending \| running \| succeeded \| failed \| null` | No | — |
| `error_message` | `string \| null \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `last_executed_at` | `JsonValue \| null` | No | — |

***

## Llm

### deleteProvidersByKey

`llm.deleteProvidersByKey`

Delete a provider connection.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.llm.deleteProvidersByKey({ "path": { "key": "openai" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   key: string
> }
> ```

**Output:** `null`

***

### getModels

`llm.getModels`

List the models available from every configured connection, grouped by connection.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.llm.getModels({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   error?: string | null | null,
>   key?: string | null,
>   models?: {
>     display_name?: string | null,
>     id?: string | null
>   }[] | null,
>   name?: string | null,
>   type?: string | null
> }[]
> ```

***

### getProviders

`llm.getProviders`

List the configured provider connections, with their secrets masked.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.llm.getProviders({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   config?: Record<string, string | null> | null,
>   env_fields?: string[] | null,
>   env_vars?: string[] | null,
>   key?: string | null,
>   name?: string | null,
>   source?: db | env | null,
>   type?: string | null,
>   usable?: boolean | null
> }[]
> ```

***

### getProviderTypes

`llm.getProviderTypes`

List the provider types a connection can be created for, with the credential fields each one needs.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.llm.getProviderTypes({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   managed?: boolean | null,
>   singleton?: boolean | null,
>   default_model?: string | null | null,
>   label?: string | null,
>   model_fields?: string[] | null,
>   type?: string | null,
>   fields?: {
>     prefix?: string | null | null,
>     placeholder?: string | null | null,
>     label?: string | null,
>     show_when?: {
>       field?: string | null,
>       value?: string | null
>     } | null | null,
>     key?: string | null,
>     advanced?: boolean | null,
>     docs_url?: string | null | null,
>     required?: boolean | null,
>     type?: text | password | select | segmented | file | null,
>     help?: string | null | null,
>     options?: {
>       label?: string | null,
>       value?: string | null
>     }[] | null | null,
>     default?: string | null | null
>   }[] | null,
>   models?: {
>     display_name?: string | null,
>     id?: string | null
>   }[] | null,
>   requires?: Record<string, string[]> | null,
>   available?: boolean | null,
>   required_any?: string[][] | null
> }[]
> ```

***

### postExtractSources

`llm.postExtractSources`

Parse native query sources and return referenced tables and cards/models.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.llm.postExtractSources({ "body": { "database_id": 1, "sql": "" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   database_id: number,
>   sql: string,
>   template_tags?: Record<string, {
>     card-id?: number,
>     type: string
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `card_ids` | `number[] \| null` | No | — |
| `tables` | `object[] \| null` | No | — |

> [accordion] tables full type
>
> ```ts theme={null}
> {
>   columns?: {
>     database_type?: string | null | null,
>     description?: string | null | null,
>     fk_target?: {
>       field_name?: string | null,
>       table_name?: string | null
>     } | null,
>     id?: number | null,
>     name?: string | null,
>     semantic_type?: string | null | null
>   }[] | null,
>   description?: string | null | null,
>   display_name?: string | null | null,
>   id?: number | null,
>   name?: string | null,
>   schema?: string | null | null
> }[] | null
> ```

***

### postProviders

`llm.postProviders`

Create a provider connection.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.llm.postProviders({ "body": { "type": "" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   config?: Record<string, string | null> | null,
>   key?: string | null,
>   model?: string | null,
>   name?: string | null,
>   type: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `config` | `Record<string, string \| null> \| null` | No | — |
| `env_fields` | `string[] \| null` | No | — |
| `env_vars` | `string[] \| null` | No | — |
| `key` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `source` | `db \| env \| null` | No | — |
| `type` | `string \| null` | No | — |
| `usable` | `boolean \| null` | No | — |

***

### putProvidersByKey

`llm.putProvidersByKey`

Update a provider connection.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.llm.putProvidersByKey({ "path": { "key": "openai" }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   key: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   config?: Record<string, string | null> | null,
>   model?: string | null,
>   name?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `config` | `Record<string, string \| null> \| null` | No | — |
| `env_fields` | `string[] \| null` | No | — |
| `env_vars` | `string[] \| null` | No | — |
| `key` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `source` | `db \| env \| null` | No | — |
| `type` | `string \| null` | No | — |
| `usable` | `boolean \| null` | No | — |

***

## Logger

### getPresets

`logger.getPresets`

Get all known presets.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.logger.getPresets({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   display_name?: string | null,
>   id?: string | null,
>   loggers?: {
>     level?: off | fatal | error | warn | info | debug | trace | null,
>     name?: string | null
>   }[] | null
> }[]
> ```

***

## Measure

### get

`measure.get`

Fetch *all* `Measures`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.measure.get({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   dimension_mappings?: Record<string, JsonValue>[] | null | null,
>   entity_id?: string | null | null,
>   result_column_name?: string | null | null,
>   id?: number | null,
>   creator?: Record<string, JsonValue> | null | null,
>   name?: string | null,
>   archived?: boolean | null,
>   dimensions?: Record<string, JsonValue>[] | null | null,
>   updated_at?: JsonValue | null,
>   table_id?: number | null,
>   definition?: JsonValue | {
>     database: number,
>     type: native,
>     native: JsonValue
>   } | {
>     database: number,
>     type: query,
>     query: JsonValue
>   } | null,
>   created_at?: JsonValue | null,
>   creator_id?: number | null,
>   description?: string | null | null
> }[]
> ```

***

### getById

`measure.getById`

Fetch `Measure` with ID.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.measure.getById({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include-orphaned?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dimension_mappings` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `result_column_name` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `dimensions` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `table_id` | `number \| null` | No | — |
| `definition` | `JsonValue \| object \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] definition full type
>
> ```ts theme={null}
> JsonValue | {
>   database: number,
>   type: native,
>   native: JsonValue
> } | {
>   database: number,
>   type: query,
>   query: JsonValue
> } | null
> ```

***

### getByIdDimensionByDimensionKeyRemapping

`measure.getByIdDimensionByDimensionKeyRemapping`

Fetch remapped value for a specific dimension value.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.measure.getByIdDimensionByDimensionKeyRemapping({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" }, "query": { "value": "" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   value: string
> }
> ```

**Output:** `JsonValue[] \| JsonValue[]`

***

### getByIdDimensionByDimensionKeySearch

`measure.getByIdDimensionByDimensionKeySearch`

Search for values of a dimension that contain the query string.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.measure.getByIdDimensionByDimensionKeySearch({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" }, "query": { "query": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   query: string
> }
> ```

**Output:** `string[][]`

***

### getByIdDimensionByDimensionKeyValues

`measure.getByIdDimensionByDimensionKeyValues`

Fetch values for a dimension of a measure.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.measure.getByIdDimensionByDimensionKeyValues({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `has_more_values` | `boolean \| null` | No | — |
| `values` | `(JsonValue[] \| JsonValue[])[] \| null` | No | — |

***

### post

`measure.post`

Create a new `Measure`.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.measure.post({ "body": { "name": "a", "definition": { "stages": [{ "lib/type": "mbql.stage/native" }] } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   definition: JsonValue | {
>     database: number,
>     type: native,
>     native: JsonValue
>   } | {
>     database: number,
>     type: query,
>     query: JsonValue
>   },
>   description?: string | null,
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dimension_mappings` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `result_column_name` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `dimensions` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `table_id` | `number \| null` | No | — |
| `definition` | `JsonValue \| object \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] definition full type
>
> ```ts theme={null}
> JsonValue | {
>   database: number,
>   type: native,
>   native: JsonValue
> } | {
>   database: number,
>   type: query,
>   query: JsonValue
> } | null
> ```

***

### putById

`measure.putById`

Update a `Measure` with ID.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.measure.putById({ "path": { "id": 1 }, "body": { "revision_message": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   definition?: JsonValue | {
>     database: number,
>     type: native,
>     native: JsonValue
>   } | {
>     database: number,
>     type: query,
>     query: JsonValue
>   } | null,
>   description?: string | null,
>   name?: string | null,
>   revision_message: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dimension_mappings` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `result_column_name` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `creator` | `Record<string, JsonValue> \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `dimensions` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `table_id` | `number \| null` | No | — |
| `definition` | `JsonValue \| object \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] definition full type
>
> ```ts theme={null}
> JsonValue | {
>   database: number,
>   type: native,
>   native: JsonValue
> } | {
>   database: number,
>   type: query,
>   query: JsonValue
> } | null
> ```

***

## Metabot

### getConversations

`metabot.getConversations`

List conversations visible in the current user's history, most-recent first.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metabot.getConversations({  });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   conversation_id?: string | null,
>   created_at?: string | null,
>   forked_from_conversation_id?: string | null | null,
>   last_message_at?: string | null | null,
>   message_count?: number | null,
>   profile_id?: string | null | null,
>   title?: string | null | null,
>   user_id?: number | null | null
> }[] | null
> ```

***

### getConversationsById

`metabot.getConversationsById`

Return a single conversation with its flattened chat messages.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metabot.getConversationsById({ "path": { "id": "00000000-0000-4000-8000-000000000001" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_id` | `number \| null \| null` | No | — |
| `context_window_tokens` | `number \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `conversation_id` | `string \| null` | No | — |
| `state` | `JsonValue \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `messages` | `object[] \| null` | No | — |
| `saved_entities` | `object[] \| null` | No | — |
| `forked_from_conversation_id` | `string \| null \| null` | No | — |

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   contextTokens?: number | null,
>   externalId?: string | null,
>   id?: string | null,
>   parts?: (
>     {
>       id?: string | null,
>       message?: string | null,
>       role?: user | agent | null,
>       type?: text | null
>     } | {
>       args?: string | null | null,
>       id?: string | null,
>       is_error?: boolean | null,
>       name?: string | null,
>       result?: string | null | null,
>       role?: agent | null,
>       status?: started | ended | null,
>       type?: tool_call | null
>     } | {
>       id?: string | null,
>       part?: {
>         data?: JsonValue | null,
>         type?: string | null
>       } | null,
>       role?: agent | null,
>       type?: data_part | null
>     }
>   )[] | null,
>   role?: user | agent | null,
>   status?: {
>     type?: done | null
>   } | {
>     type?: aborted | null
>   } | {
>     type?: in_progress | null
>   } | {
>     contextWindowFull?: boolean | null,
>     finishReason?: length | content-filter | tool-calls | null,
>     type?: incomplete | null
>   } | {
>     error?: string | {
>       data?: JsonValue | null,
>       message?: string | null | null,
>       type?: string | null
>     } | null,
>     type?: errored | null
>   } | null
> }[] | null
> ```

> [accordion] saved\_entities full type
>
> ```ts theme={null}
> {
>   card_id?: number | null,
>   chart_id?: string | null | null
> }[] | null
> ```

***

### getConversationsByIdTitle

`metabot.getConversationsByIdTitle`

Return the title generation status for a conversation.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metabot.getConversationsByIdTitle({ "path": { "id": "00000000-0000-4000-8000-000000000001" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `ready \| pending \| missing \| null` | No | — |
| `title` | `string \| null \| null` | No | — |

***

### getPermissionsUserPermissions

`metabot.getPermissionsUserPermissions`

Return the current user's resolved metabot permissions, taking the most permissive value across all their groups.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metabot.getPermissionsUserPermissions({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `object \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   metabot?: yes | no | null,
>   metabot-nlq?: yes | no | null,
>   metabot-other-tools?: yes | no | null,
>   metabot-sql-generation?: yes | no | null
> } | null
> ```

***

### postConversationsByIdFork

`metabot.postConversationsByIdFork`

Fork a conversation at an assistant message, returning a brand-new conversation that copies the thread from the start up to and including that message.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metabot.postConversationsByIdFork({ "path": { "id": "00000000-0000-4000-8000-000000000001" }, "body": { "message_id": "00000000-0000-4000-8000-000000000001" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   message_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_id` | `number \| null \| null` | No | — |
| `context_window_tokens` | `number \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `conversation_id` | `string \| null` | No | — |
| `state` | `JsonValue \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `messages` | `object[] \| null` | No | — |
| `saved_entities` | `object[] \| null` | No | — |
| `forked_from_conversation_id` | `string \| null \| null` | No | — |

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   contextTokens?: number | null,
>   externalId?: string | null,
>   id?: string | null,
>   parts?: (
>     {
>       id?: string | null,
>       message?: string | null,
>       role?: user | agent | null,
>       type?: text | null
>     } | {
>       args?: string | null | null,
>       id?: string | null,
>       is_error?: boolean | null,
>       name?: string | null,
>       result?: string | null | null,
>       role?: agent | null,
>       status?: started | ended | null,
>       type?: tool_call | null
>     } | {
>       id?: string | null,
>       part?: {
>         data?: JsonValue | null,
>         type?: string | null
>       } | null,
>       role?: agent | null,
>       type?: data_part | null
>     }
>   )[] | null,
>   role?: user | agent | null,
>   status?: {
>     type?: done | null
>   } | {
>     type?: aborted | null
>   } | {
>     type?: in_progress | null
>   } | {
>     contextWindowFull?: boolean | null,
>     finishReason?: length | content-filter | tool-calls | null,
>     type?: incomplete | null
>   } | {
>     error?: string | {
>       data?: JsonValue | null,
>       message?: string | null | null,
>       type?: string | null
>     } | null,
>     type?: errored | null
>   } | null
> }[] | null
> ```

> [accordion] saved\_entities full type
>
> ```ts theme={null}
> {
>   card_id?: number | null,
>   chart_id?: string | null | null
> }[] | null
> ```

***

### postConversationsByIdSavedEntity

`metabot.postConversationsByIdSavedEntity`

Save a Metabot-generated chart from this conversation as a card, stamping the card's origin columns in the same request — used by the inline chart's manual Save button, which runs outside any agent turn.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metabot.postConversationsByIdSavedEntity({ "path": { "id": "00000000-0000-4000-8000-000000000001" }, "body": { "chart_id": "a", "card": { "name": "a", "dataset_query": { "stages": [{ "lib/type": "mbql.stage/native" }] }, "display": "a" } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   card: {
>     collection_id?: number | null,
>     dashboard_id?: number | null,
>     dashboard_tab_id?: number | null,
>     dataset_query: JsonValue | {
>       database: number,
>       type: native,
>       native: JsonValue
>     } | {
>       database: number,
>       type: query,
>       query: JsonValue
>     },
>     description?: string | null,
>     display: string,
>     name: string,
>     visualization_settings?: Record<string, JsonValue> | null
>   },
>   chart_id: string & string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `visualization_settings` | `Record<string, JsonValue> \| null \| null` | No | — |
| `dashboard_tab_id` | `number \| null \| null` | No | — |
| `dataset_query` | `JsonValue \| object \| null` | No | — |
| `metabot_chart_id` | `string \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `display` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `metabot_conversation_id` | `string \| null` | No | — |
| `dashboard_id` | `number \| null \| null` | No | — |

> [accordion] dataset\_query full type
>
> ```ts theme={null}
> JsonValue | {
>   database: number,
>   type: native,
>   native: JsonValue
> } | {
>   database: number,
>   type: query,
>   query: JsonValue
> } | null
> ```

***

### postDocumentGenerateContent

`metabot.postDocumentGenerateContent`

Create a new piece of content to insert into the document.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.metabot.postDocumentGenerateContent({ "body": { "instructions": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   instructions: string,
>   references?: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null \| null` | No | — |
| `draft_card` | `object \| null` | No | — |
| `error` | `string \| null \| null` | No | — |

> [accordion] draft\_card full type
>
> ```ts theme={null}
> {
>   database_id?: number | null,
>   dataset_query?: JsonValue | {
>     database: number,
>     type: native,
>     native: JsonValue
>   } | {
>     database: number,
>     type: query,
>     query: JsonValue
>   } | null,
>   name?: string | null,
>   parameters?: JsonValue[] | null | null,
>   visualization_settings?: Record<string, JsonValue> | null
> } | null | null
> ```

***

### postFeedback

`metabot.postFeedback`

Persist Metabot feedback.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metabot.postFeedback({ "body": { "metabot_id": 1, "message_id": "a", "positive": false } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

The OpenAPI models a JSON response wrapper with status 204, but HTTP 204 responses have no body. The adapter returns and validates null for the successful empty response.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   freeform_feedback?: string | null,
>   issue_type?: string | null,
>   message_id: string,
>   metabot_id: number,
>   positive: boolean
> }
> ```

**Output:** `null`

***

### postMetabotByIdPromptSuggestionsRegenerate

`metabot.postMetabotByIdPromptSuggestionsRegenerate`

Remove any existing prompt suggestions for the Metabot with `id` and generate new ones.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.metabot.postMetabotByIdPromptSuggestionsRegenerate({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   prompt_count?: number | null,
>   status?: generated | null
> } | {
>   status?: no-library-content | null
> } | {
>   status?: ai-produced-no-prompts | null
> }
> ```

***

### postSourceFeedback

`metabot.postSourceFeedback`

Persist Metabot source feedback.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metabot.postSourceFeedback({ "body": { "metabot_id": 1, "message_id": "a", "source_id": 1, "source_type": "table", "positive": false } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

The OpenAPI models a JSON response wrapper with status 204, but HTTP 204 responses have no body. The adapter returns and validates null for the successful empty response.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   message_id: string,
>   metabot_id: number,
>   positive: boolean,
>   source_id: number,
>   source_type: table | card | model
> }
> ```

**Output:** `null`

***

### putSlackSettings

`metabot.putSlackSettings`

Update Metabot Slack settings atomically.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metabot.putSlackSettings({ "body": { "slack-connect-client-id": "a", "slack-connect-client-secret": "a", "metabot-slack-signing-secret": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   metabot-slack-signing-secret: string | null,
>   slack-connect-client-id: string | null,
>   slack-connect-client-secret: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `boolean \| null` | No | — |

***

## Metric

### get

`metric.get`

Get a list of metrics.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.get({  });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   collection?: {
>     id?: number | null | null,
>     name?: string | null
>   } | null | null,
>   collection_id?: number | null | null,
>   description?: string | null | null,
>   id?: number | null,
>   name?: string | null
> }[] | null
> ```

***

### getById

`metric.getById`

Fetch a `Metric` with ID.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.getById({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include-orphaned?: boolean | null
> }
> ```

**Output:** `JsonValue`

***

### getByIdDimension

`metric.getByIdDimension`

List a metric's curated dimensions, and (when `with-addable=true`) the columns still available to add, grouped by source table.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.getByIdDimension({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   with-addable?: boolean | null,
>   include-orphaned?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `addable` | `Record<string, JsonValue>[] \| null` | No | — |
| `added` | `Record<string, JsonValue>[] \| null` | No | — |

***

### getByIdDimensionByDimensionKeyRemapping

`metric.getByIdDimensionByDimensionKeyRemapping`

Fetch remapped value for a specific dimension value.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.getByIdDimensionByDimensionKeyRemapping({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" }, "query": { "value": "" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   value: string
> }
> ```

**Output:** `JsonValue[] \| JsonValue[]`

***

### getByIdDimensionByDimensionKeySearch

`metric.getByIdDimensionByDimensionKeySearch`

Search for values of a dimension that contain the query string.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.getByIdDimensionByDimensionKeySearch({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" }, "query": { "query": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   query: string
> }
> ```

**Output:** `string[][]`

***

### getByIdDimensionByDimensionKeyValues

`metric.getByIdDimensionByDimensionKeyValues`

Fetch values for a dimension of a metric.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.getByIdDimensionByDimensionKeyValues({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `has_more_values` | `boolean \| null` | No | — |
| `values` | `(JsonValue[] \| JsonValue[])[] \| null` | No | — |

***

### postBreakoutValues

`metric.postBreakoutValues`

Fetch distinct breakout dimension values for a metric or measure definition.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.postBreakoutValues({ "body": { "definition": { "expression": ["metric", { "lib/uuid": "a" }, 1] } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   definition: {
>     expression: JsonValue[] | JsonValue[] | number | JsonValue[],
>     filters?: {
>       filter: JsonValue,
>       lib/uuid: string
>     }[] | null,
>     projections?: {
>       id: number,
>       lib/uuid: string,
>       projection: JsonValue[][],
>       type: metric | measure
>     }[] | null
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `col` | `Record<string, JsonValue> \| null` | No | — |
| `values` | `JsonValue[] \| null` | No | — |

***

### postByIdDimensionAdd

`metric.postByIdDimensionAdd`

Add dimensions to a metric.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metric.postByIdDimensionAdd({ "path": { "id": 1 }, "body": { "dimensions": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   dimensions: {
>     description?: string | null,
>     display_name?: string,
>     id: string,
>     mapping_target: JsonValue[]
>   }[]
> }
> ```

**Output:** `Record<string, JsonValue>[]`

***

### postByIdDimensionByDimensionKey

`metric.postByIdDimensionByDimensionKey`

Update a metric dimension's `display_name`, `description`, `default_temporal_unit`, and/or source column.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metric.postByIdDimensionByDimensionKey({ "path": { "id": 1, "dimension-key": "00000000-0000-4000-8000-000000000001" }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number,
>   dimension-key: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   default_temporal_unit?: string,
>   description?: string | null,
>   display_name?: string,
>   source?: {
>     field-id: number
>   } | null
> }
> ```

**Output:** `Record<string, JsonValue>`

***

### postByIdDimensionRemove

`metric.postByIdDimensionRemove`

Remove dimensions (by UUID) from a metric.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metric.postByIdDimensionRemove({ "path": { "id": 1 }, "body": { "dimension_ids": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   dimension_ids: string[]
> }
> ```

**Output:** `Record<string, JsonValue>[]`

***

### postByIdDimensionReorder

`metric.postByIdDimensionReorder`

Persist a new ordering for a metric's dimensions.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metric.postByIdDimensionReorder({ "path": { "id": 1 }, "body": { "dimension_ids": [] } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   dimension_ids: string[]
> }
> ```

**Output:** `Record<string, JsonValue>[]`

***

### postByIdDimensionSetDefault

`metric.postByIdDimensionSetDefault`

Mark exactly one dimension as the metric's default, clearing any previous default.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.metric.postByIdDimensionSetDefault({ "path": { "id": 1 }, "body": { "dimension_id": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   dimension_id: string | null
> }
> ```

**Output:** `Record<string, JsonValue>[]`

***

### postDataset

`metric.postDataset`

Execute a metric or measure-based query and stream the results.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.metric.postDataset({ "body": { "definition": { "expression": ["metric", { "lib/uuid": "a" }, 1] } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   definition: {
>     expression: JsonValue[] | JsonValue[] | number | JsonValue[],
>     filters?: {
>       filter: JsonValue,
>       lib/uuid: string
>     }[] | null,
>     projections?: {
>       id: number,
>       lib/uuid: string,
>       projection: JsonValue[][],
>       type: metric | measure
>     }[] | null
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |
| `row_count` | `number \| null` | No | — |
| `status` | `completed \| completed \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   cols?: JsonValue[] | null,
>   rows?: JsonValue[] | null
> } | null
> ```

***

## Notification

### getAdmin

`notification.getAdmin`

List card-type notifications (alerts) for admin management.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.notification.getAdmin({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   recipient_email?: string,
>   query?: string,
>   creatorless?: boolean | null,
>   last_check_status?: failing | successful,
>   creator_active?: boolean | null,
>   card_id?: number,
>   last_send_status?: failing | successful,
>   channel?: string | string[] | null,
>   active?: boolean | null,
>   sort_column?: id | last_send | last_check | card_name | creator_name | updated_at,
>   creator_id?: number,
>   sort_direction?: asc | desc
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   last_check?: {
>     at?: string | null,
>     error?: string | null | null,
>     status?: failing | successful | null
>   } | null | null,
>   payload_type?: string | null,
>   payload_id?: number | null | null,
>   id?: number | null,
>   last_send?: {
>     at?: string | null,
>     error?: string | null | null,
>     status?: failing | successful | null
>   } | null | null,
>   updated_at?: string | null,
>   created_at?: string | null,
>   active?: boolean | null,
>   creator_id?: number | null | null
> }[] | null
> ```

***

### getAdminById

`notification.getAdminById`

Get a single card-type notification with last\_check, last\_send, check\_history (up to 10 most-recent terminal alert-type TaskRuns) and send\_history (up to 10 most-recent channel-send delivery attempts).

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.notification.getAdminById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `JsonValue`

***

### post

`notification.post`

Create a new notification (alert or subscription), return the created notification. With email or Slack set up, Metabase can send it to its recipients right away.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.notification.post({ "body": { "payload_type": "notification/dashboard", "payload": { "card_id": 1 } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `JsonValue` | No | — |

**Output:** `JsonValue`

***

### postAdminBulk

`notification.postAdminBulk`

Bulk-archive or -change-creator a set of notifications.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.notification.postAdminBulk({ "body": { "notification_ids": [1], "action": "archive" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   action: archive | change-creator,
>   creator_id?: number,
>   notification_ids: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updated` | `number \| null` | No | — |

***

## Oauth

### getAuthorizations

`oauth.getAuthorizations`

List OAuth dynamic client registration events (registered, approved, or denied), newest first.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.oauth.getAuthorizations({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   client-id?: string | null,
>   event-type?: registered | approved | denied | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `Record<string, JsonValue>[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

***

## Osi

### getAiContext

`osi.getAiContext`

Get all ai\_context entries, paginated.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.osi.getAiContext({  });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   ai_context?: {
>     examples?: string[] | null,
>     instructions?: string | null | null,
>     synonyms?: string[] | null
>   } | null,
>   entity_local_id?: number | null,
>   entity_type?: string | null
> }[] | null
> ```

***

### getAiContextByEntityTypeByEntityLocalId

`osi.getAiContextByEntityTypeByEntityLocalId`

Get the ai\_context entry for an entity by its logical `(entity_type, entity_local_id)` key.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.osi.getAiContextByEntityTypeByEntityLocalId({ "path": { "entity-type": "a", "entity-local-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   entity-type: string,
>   entity-local-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ai_context` | `object \| null` | No | — |
| `entity_local_id` | `number \| null` | No | — |
| `entity_type` | `string \| null` | No | — |

> [accordion] ai\_context full type
>
> ```ts theme={null}
> {
>   examples?: string[] | null,
>   instructions?: string | null | null,
>   synonyms?: string[] | null
> } | null
> ```

***

### postAiContextReconcile

`osi.postAiContextReconcile`

Force a reconcile of the library entity index against the application database, blocking until a reconcile covering this call finishes.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.osi.postAiContextReconcile({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `execution` | `object \| null` | No | — |
| `index` | `object \| null` | No | — |

> [accordion] execution full type
>
> ```ts theme={null}
> {
>   ran_ms?: number | null,
>   waited_ms?: number | null
> } | null
> ```

> [accordion] index full type
>
> ```ts theme={null}
> {
>   deleted?: number | null,
>   inserted?: number | null,
>   unchanged?: number | null
> } | null
> ```

***

### putAiContextByEntityTypeByEntityLocalId

`osi.putAiContextByEntityTypeByEntityLocalId`

Create or replace (upsert) the ai\_context for an entity, addressed by its logical key.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.osi.putAiContextByEntityTypeByEntityLocalId({ "path": { "entity-type": "a", "entity-local-id": 1 }, "body": { "ai_context": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   entity-type: string,
>   entity-local-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ai_context: {
>     examples?: string[],
>     instructions?: string | null,
>     synonyms?: string[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ai_context` | `object \| null` | No | — |
| `entity_local_id` | `number \| null` | No | — |
| `entity_type` | `string \| null` | No | — |

> [accordion] ai\_context full type
>
> ```ts theme={null}
> {
>   examples?: string[] | null,
>   instructions?: string | null | null,
>   synonyms?: string[] | null
> } | null
> ```

***

## Permissions

### getInviteGroupIds

`permissions.getInviteGroupIds`

IDs of the permission groups holding a stored read (or read-write) grant on the collection of a shareable item (a `dashboard` or a `question`).

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.permissions.getInviteGroupIds({ "query": { "type": "dashboard", "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   type: dashboard | question,
>   id: number
> }
> ```

**Output:** `number[]`

***

## Preview Embed

### getCardByTokenParamsByParamKeyValues

`previewEmbed.getCardByTokenParamsByParamKeyValues`

Embedded version of api.card filter values endpoint.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.previewEmbed.getCardByTokenParamsByParamKeyValues({ "path": { "token": "<signed embed JWT>", "param-key": "<parameter id from the card>" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   token: string,
>   param-key: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `has_more_values` | `boolean \| null` | No | — |
| `values` | `(JsonValue[] \| JsonValue[])[] \| null` | No | — |

***

## Public

### postDashboardByUuidDashcardByDashcardIdExecuteValues

`public.postDashboardByUuidDashcardByDashcardIdExecuteValues`

Fetches the values for filling in execution parameters.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.public.postDashboardByUuidDashcardByDashcardIdExecuteValues({ "path": { "uuid": "00000000-0000-4000-8000-000000000001", "dashcard-id": 1 }, "body": { "parameters": {  } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   uuid: string,
>   dashcard-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   parameters: Record<string, string | number | boolean | null>
> }
> ```

**Output:** `Record<string, JsonValue>`

***

## Session

### getIllustrationByKey

`session.getIllustrationByKey`

Fetch the uploaded image of a custom illustration setting, e.g.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.session.getIllustrationByKey({ "path": { "key": "a" }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

The uploaded illustration is returned as a bounded binary artifact with its content type preserved.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   key: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   v?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | Yes | — |
| `base64` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `headers` | `object` | Yes | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   contentDisposition?: string,
>   contentSecurityPolicy?: string,
>   cacheControl?: string,
>   etag?: string
> }
> ```

***

### postMfaEnroll

`session.postMfaEnroll`

Complete a two-step login by *enrolling* a second factor for the first time.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.session.postMfaEnroll({ "body": { "enrollment_token": "a", "code": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   code: string,
>   enrollment_token: string,
>   remember?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `recovery_codes` | `string[] \| null` | No | — |

***

### postMfaSendEmailOtp

`session.postMfaSendEmailOtp`

Email a one-time code as a fallback second factor (for a user who lost their authenticator but still has recovery codes disabled or unavailable).

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.session.postMfaSendEmailOtp({ "body": { "challenge_token": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   challenge_token: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true \| null` | No | — |

***

## Slack

### getAppInfo

`slack.getAppInfo`

Returns the Slack app\_id and team\_id.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.slack.getAppInfo({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `app_id` | `string \| null \| null` | No | — |
| `scopes` | `object \| null` | No | — |
| `team_id` | `string \| null \| null` | No | — |

> [accordion] scopes full type
>
> ```ts theme={null}
> {
>   actual?: string[] | null,
>   extra?: string[] | null,
>   missing?: string[] | null,
>   required?: string[] | null
> } | null | null
> ```

***

### getManifest

`slack.getManifest`

Returns the JSON manifest file that should be used to bootstrap new Slack apps

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.slack.getManifest({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `display_information` | `object \| null` | No | — |
| `features` | `object \| null` | No | — |
| `oauth_config` | `object \| null` | No | — |
| `settings` | `object \| null` | No | — |

> [accordion] display\_information full type
>
> ```ts theme={null}
> {
>   background_color?: string | null,
>   description?: string | null,
>   name?: string | null
> } | null
> ```

> [accordion] features full type
>
> ```ts theme={null}
> {
>   app_home?: {
>     home_tab_enabled?: boolean | null,
>     messages_tab_enabled?: boolean | null,
>     messages_tab_read_only_enabled?: boolean | null
>   } | null,
>   assistant_view?: {
>     assistant_description?: string | null
>   } | null,
>   bot_user?: {
>     always_online?: boolean | null,
>     display_name?: string | null
>   } | null,
>   slash_commands?: {
>     command?: string | null,
>     description?: string | null,
>     should_escape?: boolean | null,
>     url?: string | null
>   }[] | null
> } | null
> ```

> [accordion] oauth\_config full type
>
> ```ts theme={null}
> {
>   redirect_urls?: string[] | null,
>   scopes?: {
>     bot?: string[] | null
>   } | null
> } | null
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   event_subscriptions?: {
>     bot_events?: string[] | null,
>     request_url?: string | null
>   } | null,
>   interactivity?: {
>     is_enabled?: boolean | null,
>     request_url?: string | null
>   } | null,
>   org_deploy_enabled?: boolean | null,
>   socket_mode_enabled?: boolean | null,
>   token_rotation_enabled?: boolean | null
> } | null
> ```

***

## Table

### putByIdFieldsOrder

`table.putByIdFieldsOrder`

Reorder fields

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.table.putByIdFieldsOrder({ "path": { "id": 1 }, "body": [] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `number[] \| object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> number[] | {
>   field_order: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true \| null` | No | — |

***

## Task

### getRuns

`task.getRuns`

List task runs with optional filters.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.task.getRuns({  });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null \| null` | No | — |
| `offset` | `number \| null \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   run_type?: alert | sync | fingerprint | subscription | null,
>   entity_id?: number | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   failed_count?: number | null,
>   ended_at?: JsonValue | null,
>   entity_name?: string | null | null,
>   status?: started | success | failed | abandoned | null,
>   task_count?: number | null,
>   success_count?: number | null,
>   entity_type?: dashboard | card | database | null
> }[] | null
> ```

***

### getRunsById

`task.getRunsById`

Get a single task run with all its child tasks.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.task.getRunsById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `run_type` | `alert \| sync \| fingerprint \| subscription \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |
| `entity_id` | `number \| null` | No | — |
| `id` | `number \| null` | No | — |
| `started_at` | `JsonValue \| null` | No | — |
| `failed_count` | `number \| null` | No | — |
| `ended_at` | `JsonValue \| null` | No | — |
| `entity_name` | `string \| null \| null` | No | — |
| `status` | `started \| success \| failed \| abandoned \| null` | No | — |
| `task_count` | `number \| null` | No | — |
| `success_count` | `number \| null` | No | — |
| `entity_type` | `dashboard \| card \| database \| null` | No | — |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   task_details?: Record<string, JsonValue> | null | null,
>   id?: number | null,
>   started_at?: JsonValue | null,
>   ended_at?: JsonValue | null,
>   status?: started | success | failed | unknown | null,
>   logs?: JsonValue | null,
>   task?: string | null,
>   duration?: number | null | null,
>   run_id?: number | null | null
> }[] | null
> ```

***

### getRunsEntities

`task.getRunsEntities`

Get distinct entities that have task runs for a given run type.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.task.getRunsEntities({ "query": { "run-type": "alert", "started-at": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   run-type: alert | sync | fingerprint | subscription,
>   started-at: string
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   entity_id?: number | null,
>   entity_name?: string | null | null,
>   entity_type?: dashboard | card | database | null
> }[]
> ```

***

## Timeline

### get

`timeline.get`

Fetch a list of `Timeline`s.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.timeline.get({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include?: events,
>   archived?: boolean
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }[]
> ```

***

### getById

`timeline.getById`

Fetch the `Timeline` with `id`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.timeline.getById({ "path": { "id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include?: events,
>   archived?: boolean,
>   start?: string,
>   end?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |

***

### post

`timeline.post`

Create a new \[\[Timeline]].

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.timeline.post({ "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   archived?: boolean | null,
>   collection_id?: number | null,
>   default?: boolean | null,
>   description?: string | null,
>   icon?: star | cake | mail | mail_at | warning | bell | cloud | info | note | event | null,
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |

***

## Transform

### deleteById

`transform.deleteById`

Delete a transform.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transform.deleteById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### deleteByIdTable

`transform.deleteByIdTable`

Delete a transform's output table.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transform.deleteByIdTable({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### get

`transform.get`

Get a list of transforms.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.get({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   last-run-start-time?: string | null,
>   last-run-statuses?: (started | succeeded | failed | timeout)[] | null,
>   tag-ids?: number[] | null,
>   database-id?: number | null
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   table?: Record<string, JsonValue> | null | null,
>   owner?: {
>     common_name?: string | null | null,
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   can_read?: boolean | null,
>   source_type?: string | null,
>   entity_id?: string | null | null,
>   last_run?: {
>     message?: string | null | null,
>     user_id?: number | null | null,
>     checkpoint_hi_value?: string | null | null,
>     is_active?: boolean | null | null,
>     transform_id?: number | null,
>     id?: number | null,
>     run_method?: string | null,
>     checkpoint_lo_value?: string | null | null,
>     status?: started | succeeded | failed | timeout | canceled | canceling | null,
>     transform_entity_id?: string | null | null,
>     checkpoint_filter_field_id?: number | null | null,
>     end_time?: JsonValue | null,
>     metered_as?: string | null | null,
>     dag_run_id?: number | null | null,
>     transform_name?: string | null | null,
>     start_time?: JsonValue | null,
>     job_run_id?: number | null | null
>   } | null | null,
>   source_database_id?: number | null | null,
>   id?: number | null,
>   owner_email?: string | null | null,
>   target_db_id?: number | null | null,
>   creator?: {
>     is_qbnewb?: boolean | null,
>     last_login?: JsonValue | null,
>     id?: number | null,
>     email?: string | null,
>     is_data_analyst?: boolean | null,
>     is_superuser?: boolean | null,
>     tenant_id?: JsonValue | null,
>     last_name?: string | null | null,
>     first_name?: string | null | null,
>     date_joined?: JsonValue | null,
>     common_name?: string | null | null
>   } | null,
>   owner_user_id?: number | null | null,
>   name?: string | null,
>   updated_at?: JsonValue | null,
>   source_readable?: boolean | null | null,
>   tag_ids?: number[] | null,
>   table_dependencies?: Record<string, JsonValue>[] | null | null,
>   can_write?: boolean | null,
>   collection_id?: number | null | null,
>   can_execute?: boolean | null,
>   source?: JsonValue | null,
>   requestable_indexes?: Record<string, {
>     description?: JsonValue | null,
>     display-name?: JsonValue | null,
>     fields?: {
>       description?: JsonValue | null,
>       directions?: boolean | null,
>       display-name?: JsonValue | null,
>       name?: string | null,
>       options?: {
>         name?: JsonValue | null,
>         value?: string | null
>       }[] | null,
>       required?: boolean | null,
>       type?: string | boolean | select | integer | columns | null
>     }[] | null,
>     lifecycle?: standalone | inline | null
>   }> | null | null,
>   last_checkpoint_value?: string | null | null,
>   target?: JsonValue | null,
>   created_at?: JsonValue | null,
>   creator_id?: number | null,
>   run_trigger?: string | null | null,
>   target_table_id?: number | null | null,
>   description?: string | null | null
> }[]
> ```

***

### getById

`transform.getById`

Get a specific transform.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.getById({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `table` | `Record<string, JsonValue> \| null \| null` | No | — |
| `owner` | `object \| null` | No | — |
| `can_read` | `boolean \| null` | No | — |
| `source_type` | `string \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `last_run` | `object \| null` | No | — |
| `source_database_id` | `number \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `owner_email` | `string \| null \| null` | No | — |
| `target_db_id` | `number \| null \| null` | No | — |
| `creator` | `object \| null` | No | — |
| `owner_user_id` | `number \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `source_readable` | `boolean \| null \| null` | No | — |
| `tag_ids` | `number[] \| null` | No | — |
| `table_dependencies` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `can_execute` | `boolean \| null` | No | — |
| `source` | `JsonValue \| null` | No | — |
| `requestable_indexes` | `object \| null` | No | — |
| `last_checkpoint_value` | `string \| null \| null` | No | — |
| `target` | `JsonValue \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `run_trigger` | `string \| null \| null` | No | — |
| `target_table_id` | `number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   common_name?: string | null | null,
>   email?: string | null,
>   first_name?: string | null | null,
>   id?: number | null,
>   last_name?: string | null | null
> } | null | null
> ```

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   user_id?: number | null | null,
>   checkpoint_hi_value?: string | null | null,
>   is_active?: boolean | null | null,
>   transform_id?: number | null,
>   id?: number | null,
>   run_method?: string | null,
>   checkpoint_lo_value?: string | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   transform_entity_id?: string | null | null,
>   checkpoint_filter_field_id?: number | null | null,
>   end_time?: JsonValue | null,
>   metered_as?: string | null | null,
>   dag_run_id?: number | null | null,
>   transform_name?: string | null | null,
>   start_time?: JsonValue | null,
>   job_run_id?: number | null | null
> } | null | null
> ```

> [accordion] creator full type
>
> ```ts theme={null}
> {
>   is_qbnewb?: boolean | null,
>   last_login?: JsonValue | null,
>   id?: number | null,
>   email?: string | null,
>   is_data_analyst?: boolean | null,
>   is_superuser?: boolean | null,
>   tenant_id?: JsonValue | null,
>   last_name?: string | null | null,
>   first_name?: string | null | null,
>   date_joined?: JsonValue | null,
>   common_name?: string | null | null
> } | null
> ```

> [accordion] requestable\_indexes full type
>
> ```ts theme={null}
> Record<string, {
>   description?: JsonValue | null,
>   display-name?: JsonValue | null,
>   fields?: {
>     description?: JsonValue | null,
>     directions?: boolean | null,
>     display-name?: JsonValue | null,
>     name?: string | null,
>     options?: {
>       name?: JsonValue | null,
>       value?: string | null
>     }[] | null,
>     required?: boolean | null,
>     type?: string | boolean | select | integer | columns | null
>   }[] | null,
>   lifecycle?: standalone | inline | null
> }> | null | null
> ```

***

### getByIdDagTransforms

`transform.getByIdDagTransforms`

Preview the transforms a DAG reprocess from this transform would run (see `POST /:id/run-dag`), in execution order.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.getByIdDagTransforms({ "path": { "id": 1 }, "query": { "direction": "upstream" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   direction: upstream | downstream
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null
> }[]
> ```

***

### getByIdDependencies

`transform.getByIdDependencies`

Get the dependencies of a specific transform.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.getByIdDependencies({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   table?: Record<string, JsonValue> | null | null,
>   owner?: {
>     common_name?: string | null | null,
>     email?: string | null,
>     first_name?: string | null | null,
>     id?: number | null,
>     last_name?: string | null | null
>   } | null | null,
>   can_read?: boolean | null,
>   source_type?: string | null,
>   entity_id?: string | null | null,
>   last_run?: {
>     message?: string | null | null,
>     user_id?: number | null | null,
>     checkpoint_hi_value?: string | null | null,
>     is_active?: boolean | null | null,
>     transform_id?: number | null,
>     id?: number | null,
>     run_method?: string | null,
>     checkpoint_lo_value?: string | null | null,
>     status?: started | succeeded | failed | timeout | canceled | canceling | null,
>     transform_entity_id?: string | null | null,
>     checkpoint_filter_field_id?: number | null | null,
>     end_time?: JsonValue | null,
>     metered_as?: string | null | null,
>     dag_run_id?: number | null | null,
>     transform_name?: string | null | null,
>     start_time?: JsonValue | null,
>     job_run_id?: number | null | null
>   } | null | null,
>   source_database_id?: number | null | null,
>   id?: number | null,
>   owner_email?: string | null | null,
>   target_db_id?: number | null | null,
>   creator?: {
>     is_qbnewb?: boolean | null,
>     last_login?: JsonValue | null,
>     id?: number | null,
>     email?: string | null,
>     is_data_analyst?: boolean | null,
>     is_superuser?: boolean | null,
>     tenant_id?: JsonValue | null,
>     last_name?: string | null | null,
>     first_name?: string | null | null,
>     date_joined?: JsonValue | null,
>     common_name?: string | null | null
>   } | null,
>   owner_user_id?: number | null | null,
>   name?: string | null,
>   updated_at?: JsonValue | null,
>   source_readable?: boolean | null | null,
>   tag_ids?: number[] | null,
>   table_dependencies?: Record<string, JsonValue>[] | null | null,
>   can_write?: boolean | null,
>   collection_id?: number | null | null,
>   can_execute?: boolean | null,
>   source?: JsonValue | null,
>   requestable_indexes?: Record<string, {
>     description?: JsonValue | null,
>     display-name?: JsonValue | null,
>     fields?: {
>       description?: JsonValue | null,
>       directions?: boolean | null,
>       display-name?: JsonValue | null,
>       name?: string | null,
>       options?: {
>         name?: JsonValue | null,
>         value?: string | null
>       }[] | null,
>       required?: boolean | null,
>       type?: string | boolean | select | integer | columns | null
>     }[] | null,
>     lifecycle?: standalone | inline | null
>   }> | null | null,
>   last_checkpoint_value?: string | null | null,
>   target?: JsonValue | null,
>   created_at?: JsonValue | null,
>   creator_id?: number | null,
>   run_trigger?: string | null | null,
>   target_table_id?: number | null | null,
>   description?: string | null | null
> }[]
> ```

***

### getRun

`transform.getRun`

Get transform runs based on a set of filter params.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.getRun({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   run-methods?: (manual | cron)[] | null,
>   end-time?: string | null,
>   start-time?: string | null,
>   transform-tag-ids?: number[] | null,
>   sort-direction?: asc | desc,
>   user-id?: number | null,
>   statuses?: (started | succeeded | failed | timeout)[] | null,
>   transform-ids?: number[] | null,
>   sort-column?: transform-name | start-time | end-time | status | run-method | transform-tags | duration
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   user_id?: number | null | null,
>   checkpoint_hi_value?: string | null | null,
>   is_active?: boolean | null | null,
>   transform_id?: number | null | null,
>   id?: number | null,
>   transform?: {
>     collection?: Record<string, JsonValue> | null | null,
>     collection_id?: number | null | null,
>     deleted?: boolean | null,
>     id?: number | null,
>     name?: string | null,
>     tag_ids?: number[] | null
>   } | null | null,
>   run_method?: string | null,
>   checkpoint_lo_value?: string | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   transform_entity_id?: string | null | null,
>   checkpoint_filter_field_id?: number | null | null,
>   end_time?: JsonValue | null,
>   metered_as?: string | null | null,
>   dag_run_id?: number | null | null,
>   transform_name?: string | null | null,
>   start_time?: JsonValue | null,
>   job_run_id?: number | null | null
> }[] | null
> ```

***

### getRunByRunId

`transform.getRunByRunId`

Get a transform run by ID.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.getRunByRunId({ "path": { "run-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   run-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null \| null` | No | — |
| `user_id` | `number \| null \| null` | No | — |
| `checkpoint_hi_value` | `string \| null \| null` | No | — |
| `is_active` | `boolean \| null \| null` | No | — |
| `transform_id` | `number \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `transform` | `object \| null` | No | — |
| `run_method` | `string \| null` | No | — |
| `checkpoint_lo_value` | `string \| null \| null` | No | — |
| `status` | `started \| succeeded \| failed \| timeout \| canceled \| canceling \| null` | No | — |
| `transform_entity_id` | `string \| null \| null` | No | — |
| `checkpoint_filter_field_id` | `number \| null \| null` | No | — |
| `end_time` | `JsonValue \| null` | No | — |
| `metered_as` | `string \| null \| null` | No | — |
| `dag_run_id` | `number \| null \| null` | No | — |
| `transform_name` | `string \| null \| null` | No | — |
| `start_time` | `JsonValue \| null` | No | — |
| `job_run_id` | `number \| null \| null` | No | — |

> [accordion] transform full type
>
> ```ts theme={null}
> {
>   collection?: Record<string, JsonValue> | null | null,
>   collection_id?: number | null | null,
>   deleted?: boolean | null,
>   id?: number | null,
>   name?: string | null,
>   tag_ids?: number[] | null
> } | null | null
> ```

***

### getRuns

`transform.getRuns`

Paginated unified run history: every row is a root run — a job run, a manual DAG-reprocess run, or a standalone transform run — never a member run of a job/DAG (those are listed by `GET /run` and the per-run `transform-runs` endpoints).

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transform.getRuns({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   types?: (job | dag | transform)[] | null,
>   statuses?: (started | succeeded | failed | timeout | canceled | canceling)[] | null,
>   run-methods?: (manual | cron)[] | null,
>   start-time?: string | null,
>   end-time?: string | null,
>   transform-ids?: number[] | null,
>   sort-column?: start_time | end_time | null,
>   sort-direction?: asc | desc | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   run_type?: job | dag | transform | null,
>   user_id?: number | null | null,
>   entity_id?: number | null | null,
>   is_active?: boolean | null | null,
>   transform_count?: number | null | null,
>   id?: number | null,
>   run_method?: string | null | null,
>   name?: string | string | null | null,
>   direction?: upstream | downstream | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   end_time?: JsonValue | null,
>   start_time?: JsonValue | null
> }[] | null
> ```

***

### post

`transform.post`

Create a new transform.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transform.post({ "body": { "name": "", "source": { "type": "query", "query": { "stages": [{ "lib/type": "mbql.stage/native" }] } }, "target": { "type": "table", "name": "" } } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   owner_email?: string | null,
>   owner_user_id?: number | null,
>   name: string,
>   tag_ids?: number[],
>   collection_id?: number | null,
>   source: {
>     query: JsonValue | {
>       database: number,
>       type: native,
>       native: JsonValue
>     } | {
>       database: number,
>       type: query,
>       query: JsonValue
>     },
>     source-incremental-strategy?: {
>       checkpoint-filter-field-id?: number,
>       lookback?: {
>         unit: day | hour | millisecond | minute | month | quarter | second | week | year,
>         value: number
>       } | null,
>       type: checkpoint
>     },
>     type: query
>   } | {
>     body: string,
>     source-database?: number | null,
>     source-incremental-strategy?: {
>       checkpoint-filter-field-id?: number,
>       lookback?: {
>         unit: day | hour | millisecond | minute | month | quarter | second | week | year,
>         value: number
>       } | null,
>       type: checkpoint
>     },
>     source-tables: {
>       alias: string,
>       database_id?: number | null,
>       schema?: string | null,
>       table?: string,
>       table_id?: number | null
>     }[],
>     type: python
>   },
>   target: {
>     database?: number | null,
>     name: string,
>     schema?: string | null,
>     type: table
>   } | {
>     database?: number | null,
>     name: string,
>     schema?: string | null,
>     target-incremental-strategy: {
>       type: append
>     } | {
>       type: merge,
>       unique-key: {
>         field-id?: number | null,
>         name?: string
>       }[]
>     },
>     type: table-incremental
>   },
>   run_trigger?: none | global-schedule,
>   description?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `table` | `Record<string, JsonValue> \| null \| null` | No | — |
| `owner` | `object \| null` | No | — |
| `can_read` | `boolean \| null` | No | — |
| `source_type` | `string \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `last_run` | `object \| null` | No | — |
| `source_database_id` | `number \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `owner_email` | `string \| null \| null` | No | — |
| `target_db_id` | `number \| null \| null` | No | — |
| `creator` | `object \| null` | No | — |
| `owner_user_id` | `number \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `source_readable` | `boolean \| null \| null` | No | — |
| `tag_ids` | `number[] \| null` | No | — |
| `table_dependencies` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `can_execute` | `boolean \| null` | No | — |
| `source` | `JsonValue \| null` | No | — |
| `requestable_indexes` | `object \| null` | No | — |
| `last_checkpoint_value` | `string \| null \| null` | No | — |
| `target` | `JsonValue \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `run_trigger` | `string \| null \| null` | No | — |
| `target_table_id` | `number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   common_name?: string | null | null,
>   email?: string | null,
>   first_name?: string | null | null,
>   id?: number | null,
>   last_name?: string | null | null
> } | null | null
> ```

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   user_id?: number | null | null,
>   checkpoint_hi_value?: string | null | null,
>   is_active?: boolean | null | null,
>   transform_id?: number | null,
>   id?: number | null,
>   run_method?: string | null,
>   checkpoint_lo_value?: string | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   transform_entity_id?: string | null | null,
>   checkpoint_filter_field_id?: number | null | null,
>   end_time?: JsonValue | null,
>   metered_as?: string | null | null,
>   dag_run_id?: number | null | null,
>   transform_name?: string | null | null,
>   start_time?: JsonValue | null,
>   job_run_id?: number | null | null
> } | null | null
> ```

> [accordion] creator full type
>
> ```ts theme={null}
> {
>   is_qbnewb?: boolean | null,
>   last_login?: JsonValue | null,
>   id?: number | null,
>   email?: string | null,
>   is_data_analyst?: boolean | null,
>   is_superuser?: boolean | null,
>   tenant_id?: JsonValue | null,
>   last_name?: string | null | null,
>   first_name?: string | null | null,
>   date_joined?: JsonValue | null,
>   common_name?: string | null | null
> } | null
> ```

> [accordion] requestable\_indexes full type
>
> ```ts theme={null}
> Record<string, {
>   description?: JsonValue | null,
>   display-name?: JsonValue | null,
>   fields?: {
>     description?: JsonValue | null,
>     directions?: boolean | null,
>     display-name?: JsonValue | null,
>     name?: string | null,
>     options?: {
>       name?: JsonValue | null,
>       value?: string | null
>     }[] | null,
>     required?: boolean | null,
>     type?: string | boolean | select | integer | columns | null
>   }[] | null,
>   lifecycle?: standalone | inline | null
> }> | null | null
> ```

***

### postByIdCancel

`transform.postByIdCancel`

Cancel the current run for a given transform.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transform.postByIdCancel({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### postByIdResetCheckpoint

`transform.postByIdResetCheckpoint`

Reset the stored checkpoint for an incremental transform.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transform.postByIdResetCheckpoint({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `null`

***

### postByIdRun

`transform.postByIdRun`

Run a transform.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transform.postByIdRun({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `JsonValue \| null` | No | — |
| `run_id` | `number \| null \| null` | No | — |

***

### postByIdRunDag

`transform.postByIdRunDag`

Trigger a DAG-reprocess run starting from a single transform: runs the transform and every transform in its transitive dependency closure.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transform.postByIdRunDag({ "path": { "id": 1 }, "body": { "direction": "upstream" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   direction: upstream | downstream
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dag_run_id` | `number \| null \| null` | No | — |
| `message` | `JsonValue \| null` | No | — |

***

### putById

`transform.putById`

Update a transform.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transform.putById({ "path": { "id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   owner_email?: string | null,
>   owner_user_id?: number | null,
>   name?: string,
>   tag_ids?: number[],
>   collection_id?: number | null,
>   source?: {
>     query: JsonValue | {
>       database: number,
>       type: native,
>       native: JsonValue
>     } | {
>       database: number,
>       type: query,
>       query: JsonValue
>     },
>     source-incremental-strategy?: {
>       checkpoint-filter-field-id?: number,
>       lookback?: {
>         unit: day | hour | millisecond | minute | month | quarter | second | week | year,
>         value: number
>       } | null,
>       type: checkpoint
>     },
>     type: query
>   } | {
>     body: string,
>     source-database?: number | null,
>     source-incremental-strategy?: {
>       checkpoint-filter-field-id?: number,
>       lookback?: {
>         unit: day | hour | millisecond | minute | month | quarter | second | week | year,
>         value: number
>       } | null,
>       type: checkpoint
>     },
>     source-tables: {
>       alias: string,
>       database_id?: number | null,
>       schema?: string | null,
>       table?: string,
>       table_id?: number | null
>     }[],
>     type: python
>   },
>   target?: {
>     database?: number | null,
>     name: string,
>     schema?: string | null,
>     type: table
>   } | {
>     database?: number | null,
>     name: string,
>     schema?: string | null,
>     target-incremental-strategy: {
>       type: append
>     } | {
>       type: merge,
>       unique-key: {
>         field-id?: number | null,
>         name?: string
>       }[]
>     },
>     type: table-incremental
>   },
>   run_trigger?: none | global-schedule,
>   description?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `table` | `Record<string, JsonValue> \| null \| null` | No | — |
| `owner` | `object \| null` | No | — |
| `can_read` | `boolean \| null` | No | — |
| `source_type` | `string \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `last_run` | `object \| null` | No | — |
| `source_database_id` | `number \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `owner_email` | `string \| null \| null` | No | — |
| `target_db_id` | `number \| null \| null` | No | — |
| `creator` | `object \| null` | No | — |
| `owner_user_id` | `number \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `source_readable` | `boolean \| null \| null` | No | — |
| `tag_ids` | `number[] \| null` | No | — |
| `table_dependencies` | `Record<string, JsonValue>[] \| null \| null` | No | — |
| `can_write` | `boolean \| null` | No | — |
| `collection_id` | `number \| null \| null` | No | — |
| `can_execute` | `boolean \| null` | No | — |
| `source` | `JsonValue \| null` | No | — |
| `requestable_indexes` | `object \| null` | No | — |
| `last_checkpoint_value` | `string \| null \| null` | No | — |
| `target` | `JsonValue \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `creator_id` | `number \| null` | No | — |
| `run_trigger` | `string \| null \| null` | No | — |
| `target_table_id` | `number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   common_name?: string | null | null,
>   email?: string | null,
>   first_name?: string | null | null,
>   id?: number | null,
>   last_name?: string | null | null
> } | null | null
> ```

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   user_id?: number | null | null,
>   checkpoint_hi_value?: string | null | null,
>   is_active?: boolean | null | null,
>   transform_id?: number | null,
>   id?: number | null,
>   run_method?: string | null,
>   checkpoint_lo_value?: string | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   transform_entity_id?: string | null | null,
>   checkpoint_filter_field_id?: number | null | null,
>   end_time?: JsonValue | null,
>   metered_as?: string | null | null,
>   dag_run_id?: number | null | null,
>   transform_name?: string | null | null,
>   start_time?: JsonValue | null,
>   job_run_id?: number | null | null
> } | null | null
> ```

> [accordion] creator full type
>
> ```ts theme={null}
> {
>   is_qbnewb?: boolean | null,
>   last_login?: JsonValue | null,
>   id?: number | null,
>   email?: string | null,
>   is_data_analyst?: boolean | null,
>   is_superuser?: boolean | null,
>   tenant_id?: JsonValue | null,
>   last_name?: string | null | null,
>   first_name?: string | null | null,
>   date_joined?: JsonValue | null,
>   common_name?: string | null | null
> } | null
> ```

> [accordion] requestable\_indexes full type
>
> ```ts theme={null}
> Record<string, {
>   description?: JsonValue | null,
>   display-name?: JsonValue | null,
>   fields?: {
>     description?: JsonValue | null,
>     directions?: boolean | null,
>     display-name?: JsonValue | null,
>     name?: string | null,
>     options?: {
>       name?: JsonValue | null,
>       value?: string | null
>     }[] | null,
>     required?: boolean | null,
>     type?: string | boolean | select | integer | columns | null
>   }[] | null,
>   lifecycle?: standalone | inline | null
> }> | null | null
> ```

***

## Transform Dag Run

### getByRunIdTransformRuns

`transformDagRun.getByRunIdTransformRuns`

Get the transform runs that made up a specific DAG run.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformDagRun.getByRunIdTransformRuns({ "path": { "run-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   run-id: number
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   user_id?: number | null | null,
>   checkpoint_hi_value?: string | null | null,
>   is_active?: boolean | null | null,
>   transform_id?: number | null | null,
>   id?: number | null,
>   transform?: Record<string, JsonValue> | null | null,
>   run_method?: string | null,
>   checkpoint_lo_value?: string | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   transform_entity_id?: string | null | null,
>   checkpoint_filter_field_id?: number | null | null,
>   end_time?: JsonValue | null,
>   metered_as?: string | null | null,
>   dag_run_id?: number | null | null,
>   transform_name?: string | null | null,
>   start_time?: JsonValue | null,
>   job_run_id?: number | null | null
> }[]
> ```

***

### postByRunIdCancel

`transformDagRun.postByRunIdCancel`

Cancel an in-progress manual DAG run and request cancellation of its still-running transforms.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transformDagRun.postByRunIdCancel({ "path": { "run-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   run-id: number
> }
> ```

**Output:** `null`

***

## Transform Job

### get

`transformJob.get`

Get all transform jobs.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformJob.get({ "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   last-run-start-time?: string | null,
>   next-run-start-time?: string | null,
>   last-run-statuses?: (started | succeeded | failed | timeout)[] | null,
>   tag-ids?: number[] | null
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   built_in_type?: string | null | null,
>   entity_id?: string | null | null,
>   last_run?: {
>     message?: string | null | null,
>     is_active?: boolean | null | null,
>     id?: number | null,
>     run_method?: string | null,
>     updated_at?: JsonValue | null,
>     status?: started | succeeded | failed | timeout | canceled | null,
>     job_id?: number | null,
>     end_time?: JsonValue | null,
>     job_entity_id?: string | null | null,
>     created_at?: JsonValue | null,
>     job_name?: string | null | null,
>     start_time?: JsonValue | null
>   } | null | null,
>   ui_display_type?: cron/raw | cron/builder | null,
>   next_run?: {
>     start_time?: JsonValue | null
>   } | null | null,
>   id?: number | null,
>   name?: string | string | null,
>   schedule?: string | null,
>   updated_at?: JsonValue | null,
>   tag_ids?: number[] | null,
>   created_at?: JsonValue | null,
>   active?: boolean | null,
>   description?: string | string | null | null
> }[]
> ```

***

### getByJobId

`transformJob.getByJobId`

Get a transform job by ID.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformJob.getByJobId({ "path": { "job-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `built_in_type` | `string \| null \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `last_run` | `object \| null` | No | — |
| `ui_display_type` | `cron/raw \| cron/builder \| null` | No | — |
| `next_run` | `object \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| string \| null` | No | — |
| `schedule` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `tag_ids` | `number[] \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `description` | `string \| string \| null \| null` | No | — |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   is_active?: boolean | null | null,
>   id?: number | null,
>   run_method?: string | null,
>   updated_at?: JsonValue | null,
>   status?: started | succeeded | failed | timeout | canceled | null,
>   job_id?: number | null,
>   end_time?: JsonValue | null,
>   job_entity_id?: string | null | null,
>   created_at?: JsonValue | null,
>   job_name?: string | null | null,
>   start_time?: JsonValue | null
> } | null | null
> ```

> [accordion] next\_run full type
>
> ```ts theme={null}
> {
>   start_time?: JsonValue | null
> } | null | null
> ```

***

### getByJobIdRuns

`transformJob.getByJobIdRuns`

Get paginated run history for a transform job.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformJob.getByJobIdRuns({ "path": { "job-id": 1 }, "query": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   limit?: number,
>   offset?: number,
>   status?: started | succeeded | failed | timeout | canceled | null,
>   run-method?: manual | cron | null,
>   start-time?: string | null,
>   sort-column?: start_time | end_time | null,
>   sort-direction?: asc | desc | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `offset` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   is_active?: boolean | null | null,
>   id?: number | null,
>   run_method?: string | null,
>   updated_at?: JsonValue | null,
>   status?: started | succeeded | failed | timeout | canceled | null,
>   job_id?: number | null,
>   end_time?: JsonValue | null,
>   job_entity_id?: string | null | null,
>   created_at?: JsonValue | null,
>   job_name?: string | null | null,
>   start_time?: JsonValue | null
> }[] | null
> ```

***

### getByJobIdRunsByRunIdTransformRuns

`transformJob.getByJobIdRunsByRunIdTransformRuns`

Get the transform runs that made up a specific job run.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformJob.getByJobIdRunsByRunIdTransformRuns({ "path": { "job-id": 1, "run-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number,
>   run-id: number
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   user_id?: number | null | null,
>   checkpoint_hi_value?: string | null | null,
>   is_active?: boolean | null | null,
>   transform_id?: number | null | null,
>   id?: number | null,
>   transform?: Record<string, JsonValue> | null | null,
>   run_method?: string | null,
>   checkpoint_lo_value?: string | null | null,
>   status?: started | succeeded | failed | timeout | canceled | canceling | null,
>   transform_entity_id?: string | null | null,
>   checkpoint_filter_field_id?: number | null | null,
>   end_time?: JsonValue | null,
>   metered_as?: string | null | null,
>   dag_run_id?: number | null | null,
>   transform_name?: string | null | null,
>   start_time?: JsonValue | null,
>   job_run_id?: number | null | null
> }[]
> ```

***

### getByJobIdTransforms

`transformJob.getByJobIdTransforms`

Get the transforms of job specified by the job's ID.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformJob.getByJobIdTransforms({ "path": { "job-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   source_type?: string | null,
>   entity_id?: string | null | null,
>   scheduled?: boolean | null,
>   id?: number | null,
>   creator?: {
>     is_qbnewb?: boolean | null,
>     last_login?: JsonValue | null,
>     id?: number | null,
>     email?: string | null,
>     is_data_analyst?: boolean | null,
>     is_superuser?: boolean | null,
>     tenant_id?: string | null | null,
>     last_name?: string | null | null,
>     first_name?: string | null | null,
>     date_joined?: JsonValue | null,
>     common_name?: string | null | null
>   } | null,
>   name?: string | null,
>   updated_at?: JsonValue | null,
>   dependency?: boolean | null,
>   collection_id?: number | null | null,
>   source?: JsonValue | null,
>   target?: JsonValue | null,
>   created_at?: JsonValue | null,
>   creator_id?: number | null,
>   run_trigger?: string | null | null,
>   description?: string | null | null
> }[]
> ```

***

### post

`transformJob.post`

Create a new transform job.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transformJob.post({ "body": { "name": "a", "schedule": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name: string,
>   schedule: string,
>   tag_ids?: number[],
>   ui_display_type?: cron/raw | cron/builder
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `built_in_type` | `string \| null \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `last_run` | `object \| null` | No | — |
| `ui_display_type` | `cron/raw \| cron/builder \| null` | No | — |
| `next_run` | `object \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| string \| null` | No | — |
| `schedule` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `tag_ids` | `number[] \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `description` | `string \| string \| null \| null` | No | — |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   is_active?: boolean | null | null,
>   id?: number | null,
>   run_method?: string | null,
>   updated_at?: JsonValue | null,
>   status?: started | succeeded | failed | timeout | canceled | null,
>   job_id?: number | null,
>   end_time?: JsonValue | null,
>   job_entity_id?: string | null | null,
>   created_at?: JsonValue | null,
>   job_name?: string | null | null,
>   start_time?: JsonValue | null
> } | null | null
> ```

> [accordion] next\_run full type
>
> ```ts theme={null}
> {
>   start_time?: JsonValue | null
> } | null | null
> ```

***

### postByJobIdRun

`transformJob.postByJobIdRun`

Run a transform job manually.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transformJob.postByJobIdRun({ "path": { "job-id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   run_all?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_run_id` | `number \| null \| null` | No | — |
| `message` | `JsonValue \| null` | No | — |

***

### postByJobIdRunsByRunIdCancel

`transformJob.postByJobIdRunsByRunIdCancel`

Cancel an in-progress job run and request cancellation of its still-running transforms.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transformJob.postByJobIdRunsByRunIdCancel({ "path": { "job-id": 1, "run-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number,
>   run-id: number
> }
> ```

**Output:** `null`

***

### putActive

`transformJob.putActive`

Activate or deactivate every transform job.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transformJob.putActive({ "body": { "active": false } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   active: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `failed` | `number \| null` | No | — |
| `updated` | `number \| null` | No | — |

***

### putByJobId

`transformJob.putByJobId`

Update a transform job.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transformJob.putByJobId({ "path": { "job-id": 1 }, "body": {  } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   job-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   active?: boolean,
>   description?: string | null,
>   name?: string,
>   schedule?: string,
>   tag_ids?: number[],
>   ui_display_type?: cron/raw | cron/builder
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `built_in_type` | `string \| null \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `last_run` | `object \| null` | No | — |
| `ui_display_type` | `cron/raw \| cron/builder \| null` | No | — |
| `next_run` | `object \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| string \| null` | No | — |
| `schedule` | `string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `tag_ids` | `number[] \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `description` | `string \| string \| null \| null` | No | — |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   message?: string | null | null,
>   is_active?: boolean | null | null,
>   id?: number | null,
>   run_method?: string | null,
>   updated_at?: JsonValue | null,
>   status?: started | succeeded | failed | timeout | canceled | null,
>   job_id?: number | null,
>   end_time?: JsonValue | null,
>   job_entity_id?: string | null | null,
>   created_at?: JsonValue | null,
>   job_name?: string | null | null,
>   start_time?: JsonValue | null
> } | null | null
> ```

> [accordion] next\_run full type
>
> ```ts theme={null}
> {
>   start_time?: JsonValue | null
> } | null | null
> ```

***

## Transform Tag

### deleteByTagId

`transformTag.deleteByTagId`

Delete a transform tag.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.transformTag.deleteByTagId({ "path": { "tag-id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tag-id: number
> }
> ```

**Output:** `null`

***

### get

`transformTag.get`

Get a list of all transform tags.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.transformTag.get({  });
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   built_in_type?: string | null | null,
>   can_run?: boolean | null,
>   created_at?: JsonValue | null,
>   entity_id?: string | null | null,
>   id?: number | null,
>   name?: string | string | null,
>   updated_at?: JsonValue | null
> }[]
> ```

***

### post

`transformTag.post`

Create a new transform tag.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transformTag.post({ "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `built_in_type` | `string \| null \| null` | No | — |
| `can_run` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |

***

### putByTagId

`transformTag.putByTagId`

Update a transform tag.

**Risk:** `write`

```ts theme={null}
await corsair.metabase.api.transformTag.putByTagId({ "path": { "tag-id": 1 }, "body": { "name": "a" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tag-id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `built_in_type` | `string \| null \| null` | No | — |
| `can_run` | `boolean \| null` | No | — |
| `created_at` | `JsonValue \| null` | No | — |
| `entity_id` | `string \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `name` | `string \| string \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |

***

## User

### getCurrent

`user.getCurrent`

Fetch the current `User`.

**Risk:** `read`

```ts theme={null}
await corsair.metabase.api.user.getCurrent({  });
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `object \| null` | No | — |
| `has_model` | `boolean \| null` | No | — |
| `login_attributes` | `Record<string, JsonValue> \| null \| null` | No | — |
| `sso_source` | `string \| null \| null` | No | — |
| `jwt_attributes` | `Record<string, JsonValue> \| null \| null` | No | — |
| `is_qbnewb` | `boolean \| null` | No | — |
| `is_active` | `boolean \| null` | No | — |
| `last_login` | `JsonValue \| null` | No | — |
| `tenant_collection_id` | `number \| null \| null` | No | — |
| `id` | `number \| null` | No | — |
| `email` | `string \| null` | No | — |
| `group_ids` | `number[] \| null` | No | — |
| `is_data_analyst` | `boolean \| null` | No | — |
| `locale` | `string \| null \| null` | No | — |
| `updated_at` | `JsonValue \| null` | No | — |
| `first_login` | `JsonValue \| null` | No | — |
| `is_superuser` | `boolean \| null` | No | — |
| `tenant_id` | `number \| null \| null` | No | — |
| `custom_homepage` | `object \| null` | No | — |
| `last_name` | `string \| null \| null` | No | — |
| `is_installer` | `boolean \| null` | No | — |
| `attributes` | `Record<string, JsonValue> \| null` | No | — |
| `first_name` | `string \| null \| null` | No | — |
| `date_joined` | `JsonValue \| null` | No | — |
| `has_invited_second_user` | `boolean \| null` | No | — |
| `has_used_password` | `boolean \| null` | No | — |
| `personal_collection_id` | `number \| null \| null` | No | — |
| `common_name` | `string \| null \| null` | No | — |
| `has_question_and_dashboard` | `boolean \| null` | No | — |
| `can_write_any_collection` | `boolean \| null` | No | — |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   can_access_subscription?: boolean | null,
>   can_create_native_queries?: boolean | null,
>   can_access_setting?: boolean | null,
>   is_data_analyst?: boolean | null,
>   is_group_manager?: boolean | null,
>   can_access_monitoring?: boolean | null,
>   can_access_data_model?: boolean | null,
>   can_access_db_details?: boolean | null,
>   can_create_queries?: boolean | null,
>   can_access_transforms?: boolean | null
> } | null
> ```

> [accordion] custom\_homepage full type
>
> ```ts theme={null}
> {
>   dashboard_id?: number | null
> } | null | null
> ```

***

### postByIdPasswordResetUrl

`user.postByIdPasswordResetUrl`

Generate a password reset URL for a user.

**Risk:** `destructive`

```ts theme={null}
await corsair.metabase.api.user.postByIdPasswordResetUrl({ "path": { "id": 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `password_reset_url` | `string \| null` | No | — |

***


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