PermuteDocs
Go to Permute

Operations · operationsRun

Run an operation or data flow

Runs saved code through the existing sandbox. Data flows execute their dependency graph. Draft runs do not deliver notifications. Poll runs to inspect completion and errors.

POST/v1/operations/{operationId}/runs
betaapiKeyworkspace

When to use

Test saved draft code or execute published code.

For agents

Data Flows execute their dependency graph. Individual operations use existing prerequisite outputs. Poll listRuns with the returned workflowId and inspect node failures before publishing.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);

const result = await client.operations.run('oper_revenue123', {
  "version": "draft"
});

Request body

json
{
  "version": "draft"
}

Response

json
{
  "data": {
    "workflowId": "wkfl_run123",
    "runId": "oprn_run123"
  }
}