GET
/v1/actions/{actionId}/definitionbetaapiKeyworkspace
When to use
Read draft and published action code, contracts, and source bindings before editing.
For agents
Requires action admin permission. Pass the current draft revisionId and sequence as expectedDraft when saving; use null only when no draft exists.
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.actions.definition('actn_abcdefghijklmnopqrstuvwx');Response
{
"data": {
"draft": null,
"published": null
}
}