PermuteDocs
Go to Permute

Actions · actionDefinitionGet

Get action definitions

Requires action admin permission. Returns draft and published code, contracts, policies, and pinned source bindings.

GET/v1/actions/{actionId}/definition
betaapiKeyworkspace

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

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.actions.definition('actn_abcdefghijklmnopqrstuvwx');

Response

json
{
  "data": {
    "draft": null,
    "published": null
  }
}