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. Dashboard values contain source and its data contract.

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.

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": []
    }
  }
}