Docs

Get a policy revision

GET
/policies/revisions/{revision_id}

Reads one revision of a policy, newest or not.

The lookup is scoped to the project in project_id: a revision of another project answers not found exactly as an unknown id does.

Authorization

headerAuthorizationBearer <token>

Scope: policy.read

Path Parameters

revision_id*string

The identifier of the policy revision.

Match^polrev_[a-zA-Z0-9_-]+$

Query Parameters

project_id*string

The unique identifier of the project

Match^[a-zA-Z0-9_-]+$

Response Body

The revision was retrieved.

application/json
  1. response

One revision of a project's auth.factor.password.set policy (ADR 066). id is shared by every revision of the operation's policy; revision_id names this revision.

id*policy-id

The identifier of a policy, shared by all of its revisions.

Match^pol_[a-zA-Z0-9_-]+$
revision_id*policy-revision-id

The identifier of one immutable revision of a policy.

Match^polrev_[a-zA-Z0-9_-]+$
project_id*project-id

The project the policy belongs to.

Match^[a-zA-Z0-9_-]+$
operation*"auth.factor.password.set"

The operation the policy guards.

Value in"auth.factor.password.set"
config*

The settings of an auth.factor.password.set policy. Every setting is optional; a setting left out switches its rule off, and {} switches every rule off. There are no defaults. The bounds are technical limits, not recommendations; the server's template checks the same bounds.

created_at*string

When the operation's policy was first published.

Formatdate-time
updated_at*string

When this revision was published.

Formatdate-time
Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const policyRevision = await client.getPolicyRevision("string", { project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });
Example Response
{  "id": "string",  "revision_id": "string",  "project_id": "string",  "operation": "auth.factor.password.set",  "config": {    "min_length": 1,    "max_length": 1,    "history_depth": 1  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

Was this helpful?