Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Read one policy version

One retained version, for example the exact version an approval or invocation decision recorded. Readable after the policy is deleted. Scoped to the credential environment.

GET/api/v2/approval-policies/{policyId}/versions/{version}
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Path parameters
policyIdstringrequired

Public approval-policy id (apol_xxx).

versionintegerrequired
min 1
Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Responses
200

The retained version.

successbooleanrequired
Allowed:true
dataApprovalPolicyVersionrequired
Show properties
policyIdstringrequired
versionintegerrequired
operationstringrequired
Allowed:createdupdateddeletedbaseline
snapshotobjectrequired

Immutable database row snapshot with snake_case field names. A deletion tombstone carries the next version number.

contentHashstringrequired

SHA-256 of PostgreSQL snapshot jsonb text encoded as UTF-8. An integrity digest, not a signature.

actorobject | nullrequired
Show properties
typestringrequired
Allowed:api_keyuserunknown
idstringrequired
changeNotestring | nullrequired
createdAtstring<date-time>required
400

Bad Request - Invalid input data

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/approval-policies/string/versions/1' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "success": true,
  "data": {
    "policyId": "string",
    "version": 0,
    "operation": "created",
    "snapshot": {},
    "contentHash": "string",
    "actor": {
      "type": "api_key",
      "id": "string"
    },
    "changeNote": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}