List the revisions of a policy
Returns every revision of one policy, newest first, paginated with a
cursor. The order is fixed, so there is no sorting.
The lookup is scoped to the project in project_id: a policy of another
project answers not found exactly as an unknown id does.
AuthorizationBearer <token>Scope: policy.read
policy_id*stringThe identifier of the policy, shared by all of its revisions.
^pol_[a-zA-Z0-9_-]+$project_id*stringThe unique identifier of the project
^[a-zA-Z0-9_-]+$limit?integerMaximum number of items to return.
1 <= value <= 10020page_token?stringToken for fetching the next page of results.
Obtain this value from next_page_token in the previous response.
Omit to start from the beginning.
Its format is opaque and may change between releases.
The revisions were returned.
application/json- response
Paginated list of the revisions of one policy, newest first.
revisions*array<>next_page_token?|Token to pass as page_token in the next request to fetch the following
page. Absent when there are no more results.
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 policyRevisions = await client.listPolicyRevisions("string", { project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });{ "revisions": [ { "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" } ], "next_page_token": "string"}Was this helpful?