POST
/v1/data-flows/{dataFlowId}/commandsbetaapiKeyworkspace
When to use
Add or edit operations, wire inputs, publish, or delete a flow.
For agents
Uses the editor’s commands and permissions. Fetch the flow after each command. Publishing requires a successful current run; deleting a flow requires admin access and removes its owned operations.
Example
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.dataFlows.command('oper_flow123', {
"command": {
"type": "addTransform",
"expectedRevision": 2,
"input": {
"name": "Revenue by customer",
"instruction": "Sum revenue by customer.",
"inputIds": [
"data_abc123"
]
}
}
});Request body
{
"command": {
"type": "addTransform",
"expectedRevision": 2,
"input": {
"name": "Revenue by customer",
"instruction": "Sum revenue by customer.",
"inputIds": [
"data_abc123"
]
}
}
}Response
{
"data": {
"dataFlowId": "oper_flow123",
"deleted": false
}
}