Docs
Live demo
POST/api/v2/access-templates/preview
access:manageAPI token

Preview the effects of applying an access template without making changes (dry-run)

Pass the target ID as instance_id.

Request body application/json · PreviewTemplateRequest

Preview request

Required1 of 5 fields
instance_idstringrequired

Target to preview against. Its engine must match the template engine

Optional4 fields
template_bodymap of string → any

Inline template body. Mutually exclusive with template_name and template_version

template_namestring

Saved access template to preview. Requires template_version

max length 100
template_versioninteger

Version of the saved template. Required together with template_name

min 1
variable_overridesmap of string → any

Responses

200

OK

PreviewTemplateResponse · 4 fields
dry_runboolean
impact_summaryImpactSummary
3 fields
create_countinteger
grant_countinteger
revoke_countinteger
operationsarray of OperationResponse
5 fields
privilegestring
reasonstring
scopestring
sqlstring
targetstring
truncatedboolean
400

Bad Request - the request does not name exactly one template source, or the template, its variables or the target type cannot produce a preview

403

Forbidden - the caller's organization role cannot change access

404

Not Found - the target or the template name and version do not exist

422

Unprocessable Entity - Future objects stay on for a PostgreSQL template body while one of its rows names its objects by name or by a name mask. Field_errors names the switch Also when Principal doesn't manage the target of the rule or template (before v7.3 that answer was 403 authorization.denied).

Common errors: 401 409 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close