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

Preview a governed invocation

Normalize the input, resolve the exact target, read the provider (never write), and return a typed, execution-bound preview: environment and target, the exact change (field summaries and text diffs), expected impact against current impact limits, material preconditions with the time they were observed, expiry, and the adapter’s guarantees and limitations. Pass its id as previewId when invoking; any material difference is refused. For a declared action the preview is the normalized request itself, with every secret still a {{secret:NAME}} reference. Anlyon does not read an API it has no adapter for before the write, and the preview lists what a declared action does not guarantee.

POST/api/v2/actions/{ref}/previews
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
refstringrequired

Action name or public action identifier.

min length 1 · max length 100
Header parameters
X-Request-Idstring

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

max length 128
Request body
requiredapplication/json
inputobject
ttlSecondsinteger
min 60 · max 604800 · default: 3600
runIdstring

Resolve the action version this run's agent pins.

max length 80
Responses
201

Preview returned.

successbooleanrequired
Allowed:true
dataActionPreviewrequired
Show properties
idstringrequired
actionobjectrequired
Show properties
idstringrequired
namestringrequired
versionIdstringrequired
adapterobjectrequired
Show properties
typestringrequired
versionstringrequired
environmentobjectrequired
Show properties
idstringrequired
namestringrequired
kindstringrequired
targetobjectrequired
requestobjectrequired

The exact normalized request that will be dispatched.

impactImpactQuantity[]required
Show properties
Array of ImpactQuantity
dimensionstringrequired

money, resource_mutations, or a workspace-declared unit such as emails.

matches ^[a-z][a-z0-9_]{0,31}$
currencystring

Present for money.

matches ^[a-z]{3}$
amountintegerrequired

Integer minor units for money. A count for every other dimension.

min 0
boundstringrequired
Allowed:exactupper_bound
blocksPreviewBlock[]required
Show properties
Array of PreviewBlock
typestringrequired
Allowed:fieldstext_diffimpactlimitations
titlestringrequired
fieldsobject[]
Show properties
Array of object
labelstringrequired
valuestringrequired
pathstring
beforestring
afterstring
truncatedboolean
quantitiesImpactQuantity[]
itemsobject[]
Show properties
Array of object
kindstringrequired
Allowed:guaranteefreshnessunsupportedirreversible
textstringrequired
preconditionsobjectrequired

Material preconditions; part of the binding.

capabilitiesobjectrequired

The adapter's declared guarantees.

allowancesobject[]required

Applicable impact limits at preview time. Dispatch rechecks.

evidenceObservedAtstring<date-time>required
expiresAtstring<date-time>required
expiredbooleanrequired
requestDigeststringrequired
bindingDigeststringrequired

SHA-256 over the canonical request, target, versions, preconditions, scope and expiry. What an approval agrees to.

supersedesstring | nullrequired
effectIdstring | nullrequired

The effect executing this preview, once one is admitted.

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
Bodyapplication/json
Request
curl -X POST 'https://api.anlyon.com/api/v2/actions/string/previews' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {},
  "ttlSeconds": 3600,
  "runId": "string"
}'
Response
{
  "success": true,
  "data": {
    "id": "prv_01JABCDEF",
    "action": {
      "id": "string",
      "name": "string",
      "versionId": "string"
    },
    "adapter": {
      "type": "string",
      "version": "string"
    },
    "environment": {
      "id": "string",
      "name": "string",
      "kind": "string"
    },
    "target": {},
    "request": {},
    "impact": [
      {
        "dimension": "money",
        "currency": "usd",
        "amount": 0,
        "bound": "exact"
      }
    ],
    "blocks": [
      {
        "type": "fields",
        "title": "string",
        "fields": [
          {
            "label": "string",
            "value": "string"
          }
        ],
        "path": "string",
        "before": "string",
        "after": "string",
        "truncated": true,
        "quantities": [
          {
            "dimension": "money",
            "currency": "usd",
            "amount": 0,
            "bound": "exact"
          }
        ],
        "items": [
          {
            "kind": "guarantee",
            "text": "string"
          }
        ]
      }
    ],
    "preconditions": {},
    "capabilities": {},
    "allowances": [
      {}
    ],
    "evidenceObservedAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "expired": true,
    "requestDigest": "string",
    "bindingDigest": "string",
    "supersedes": "string",
    "effectId": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}