/v1/resources/{resourceId}/publishWhen to use
Publish a tested operation, Data Flow or write-sync definition.
For agents
Read the version token after testing. For write syncs, include runId from a completed preview of the exact draft, captured by the same API key: publication starts external delivery immediately and enables captures every 24 hours. Operation and Data Flow publication enables the configured schedule without starting a run; publish children through their parent 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
}
}
}