POST
/v1/resources/{resourceId}/publishbetaapiKeyworkspace
When to use
Publish a successfully tested operation or Data Flow.
For agents
Run and inspect the current draft first, then read its version token and publish. Publication enables the configured schedule and delivery without starting a run. Publish children through their parent Data Flow. Dashboard source has no separate publish action.
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 history = await client.revisions.list('oper_revenue123');
const result = await client.revisions.publish('oper_revenue123', { expectedVersion: history.version });Request body
{
"expectedVersion": "opaque-version-token"
}Response
{
"data": {
"resourceId": "oper_revenue123",
"version": "opaque-version-token",
"draft": {
"revisionId": "rvsn_code123",
"sequence": 1
},
"published": {
"revisionId": "rvsn_code123",
"sequence": 1
},
"capabilities": {
"history": true,
"restore": true,
"publish": true
}
}
}