GET/organizations/{organizationId}/policy-history
Page organization policy history
Operation organizations.policyHistory.get
Description
Pages the organization's signed policy history up to an exact head, with public group policy snapshots, so clients can verify and display what changed and who signed it. Any organization member may call it. A 202 asks the client to retry the identical request after the server prepares that history.
Authentication
Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
organizationId | path | string | required
|
stateHash | query | string | required
|
beforeVersion | query | integer | optional
|
Responses
200 OK
application/jsonOrganizationPolicyHistoryResponse
A page of an organization's signed policy history up to an exact head. Signed evidence only; clients resolve display names themselves.
5 fields
organizationIdstringrequired- not empty
stateHashstringrequired- not empty
The organization head the history ends at.
beforeVersionintegerrequired- at least 2
nextBeforeVersionintegerrequirednullable- at least 2
Cursor for the next page, or null on the last page.
Other fields are allowed.
202 Accepted
application/jsonPrincipalHistoryPreparationResponse
A 202: the operation rolled back while the server prepares principal history. Retry the identical request.
3 fields
codestringrequired- always
principal_history_preparation_pending
- always
committedbooleanrequired- always
false
- always
progressTokenstringrequired- exactly 64 characters
- lowercase hexadecimal
Changes when preparation advances; clients stop after three identical tokens in a row.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 409 | Conflict |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|
Additional rules
The server also enforces these rules, which the schema above cannot express.
A 503 with code principal_history_preparation_unavailable requires committed:false; other 503 responses do not guarantee rollback.