PermuteDocs
Go to Permute

Operations · operationsGet

Get an operation

Inspect an operation’s instructions, inputs, and revision state.

GET/v1/operations/{operationId}
betaapiKeyworkspace

When to use

Inspect an operation’s instructions, inputs, and revision state.

For agents

Check codeStale before running. Read handler code separately with getSource.

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.get('oper_revenue123');

Response

json
{
  "data": {
    "id": "oper_revenue123",
    "name": "Revenue by customer",
    "kind": "dataTable",
    "instructions": "Sum revenue by customer.",
    "dataSourceIds": [
      "data_abc123"
    ],
    "parentDataFlowId": "oper_flow123",
    "status": "draft",
    "codeStale": false,
    "draft": {
      "revisionId": "rvsn_code123",
      "sequence": 1
    },
    "published": null
  }
}