PermuteDocs
Go to Permute

Versioning · resourceRevisionsGet

Read a complete historical revision

Returns the logical value of a revision belonging to this resource. Operation values contain source, instructions, source IDs, and dependency operation IDs. Write-sync values contain the directional definition. Dashboard values contain source and its data contract. App values contain settings, source with build instructions, and the compiled site manifest; app revision reads require write permission and file bytes are stored separately. Database values contain managed table schemas. Business action values contain code, contracts, and selected sources pinned to schema revisions.

GET/v1/resources/{resourceId}/revisions/{revisionId}
betaapiKeyworkspace

When to use

Inspect the complete saved value before choosing a revision to restore.

For agents

Revisions belong to one resource. A revision ID from another resource is rejected. Write-sync values contain the JSON definition; runtime enablement, record links and delivery attempts are not versioned.

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.revisions.get('oper_revenue123', 'rvsn_code123');

Response

json
{
  "data": {
    "id": "rvsn_code123",
    "parentRevisionId": null,
    "dependencyRevisionIds": [],
    "actor": {
      "type": "apiKey",
      "id": "apik_agent123"
    },
    "message": "Saved operation source.",
    "createdAt": "2026-09-11T12:00:00.000Z",
    "resourceId": "oper_revenue123",
    "value": {
      "source": "async function handler(event) { return {}; } module.exports = { handler };",
      "instructions": "Calculate revenue",
      "referencedDataSourceIds": [],
      "resolvedDataSourceIds": [],
      "dependencyOperationIds": []
    }
  }
}