# Orchestrations

> SDK methods for the Orchestrations module, accessed via `soat.orchestrations`. See the [Orchestrations module docs](/docs/modules/orchestrations) for permissions and data model, and each method's REST page for the full request/response schema.

# Orchestrations

SDK methods for the Orchestrations module, accessed via `soat.orchestrations`. See the [Orchestrations module docs](/docs/modules/orchestrations) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.orchestrations.createOrchestration()`

Create an orchestration

- Method: `POST`
- Path: `/api/v1/orchestrations`

```ts
await soat.orchestrations.createOrchestration({
  body: { name, nodes, edges, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/create-orchestration)

### `soat.orchestrations.listOrchestrations()`

List orchestrations

- Method: `GET`
- Path: `/api/v1/orchestrations`

```ts
await soat.orchestrations.listOrchestrations({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/list-orchestrations)

### `soat.orchestrations.validateOrchestration()`

Validate an orchestration graph

- Method: `POST`
- Path: `/api/v1/orchestrations/validate`

```ts
await soat.orchestrations.validateOrchestration({
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/validate-orchestration)

### `soat.orchestrations.getQueueStats()`

Get orchestration queue stats

- Method: `GET`
- Path: `/api/v1/orchestrations/queue/stats`

```ts
await soat.orchestrations.getQueueStats();
```

→ [Request & response schema](/docs/api/orchestrations/get-queue-stats)

### `soat.orchestrations.getOrchestration()`

Get an orchestration

- Method: `GET`
- Path: `/api/v1/orchestrations/{orchestration_id}`

```ts
await soat.orchestrations.getOrchestration();
```

→ [Request & response schema](/docs/api/orchestrations/get-orchestration)

### `soat.orchestrations.updateOrchestration()`

Update an orchestration

- Method: `PATCH`
- Path: `/api/v1/orchestrations/{orchestration_id}`

```ts
await soat.orchestrations.updateOrchestration({
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/update-orchestration)

### `soat.orchestrations.deleteOrchestration()`

Delete an orchestration

- Method: `DELETE`
- Path: `/api/v1/orchestrations/{orchestration_id}`

```ts
await soat.orchestrations.deleteOrchestration();
```

→ [Request & response schema](/docs/api/orchestrations/delete-orchestration)

### `soat.orchestrations.listOrchestrationVersions()`

List an orchestration's graph versions

- Method: `GET`
- Path: `/api/v1/orchestrations/{orchestration_id}/versions`

```ts
await soat.orchestrations.listOrchestrationVersions({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/list-orchestration-versions)

### `soat.orchestrations.getOrchestrationVersion()`

Fetch an archived orchestration version

- Method: `GET`
- Path: `/api/v1/orchestrations/{orchestration_id}/versions/{version}`

```ts
await soat.orchestrations.getOrchestrationVersion({
  path: { version },
});
```

→ [Request & response schema](/docs/api/orchestrations/get-orchestration-version)

### `soat.orchestrations.restoreOrchestrationVersion()`

Restore an archived orchestration graph

- Method: `POST`
- Path: `/api/v1/orchestrations/{orchestration_id}/versions/{version}/restore`

```ts
await soat.orchestrations.restoreOrchestrationVersion({
  path: { version },
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/restore-orchestration-version)

### `soat.orchestrations.startOrchestrationRun()`

Start an orchestration run

- Method: `POST`
- Path: `/api/v1/orchestration-runs`

```ts
await soat.orchestrations.startOrchestrationRun({
  body: { orchestration_id, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/start-orchestration-run)

### `soat.orchestrations.listOrchestrationRuns()`

List orchestration runs

- Method: `GET`
- Path: `/api/v1/orchestration-runs`

```ts
await soat.orchestrations.listOrchestrationRuns({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/list-orchestration-runs)

### `soat.orchestrations.cancelOrchestrationRun()`

Cancel an orchestration run

- Method: `POST`
- Path: `/api/v1/orchestration-runs/{orchestration_run_id}/cancel`

```ts
await soat.orchestrations.cancelOrchestrationRun();
```

→ [Request & response schema](/docs/api/orchestrations/cancel-orchestration-run)

### `soat.orchestrations.pauseOrchestrationRun()`

Pause an orchestration run

- Method: `POST`
- Path: `/api/v1/orchestration-runs/{orchestration_run_id}/pause`

```ts
await soat.orchestrations.pauseOrchestrationRun({
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/pause-orchestration-run)

### `soat.orchestrations.submitHumanInput()`

Submit human input

- Method: `POST`
- Path: `/api/v1/orchestration-runs/{orchestration_run_id}/human-input`

```ts
await soat.orchestrations.submitHumanInput({
  body: { node_id, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/orchestrations/submit-human-input)

### `soat.orchestrations.resumeOrchestrationRun()`

Resume an orchestration run

- Method: `POST`
- Path: `/api/v1/orchestration-runs/{orchestration_run_id}/resume`

```ts
await soat.orchestrations.resumeOrchestrationRun();
```

→ [Request & response schema](/docs/api/orchestrations/resume-orchestration-run)

### `soat.orchestrations.getOrchestrationRun()`

Get an orchestration run

- Method: `GET`
- Path: `/api/v1/orchestration-runs/{orchestration_run_id}`

```ts
await soat.orchestrations.getOrchestrationRun();
```

→ [Request & response schema](/docs/api/orchestrations/get-orchestration-run)
