Restore a preserved policy as a new active revision
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/organizations/{organization}/projects/{project}/guardrails/rollback
Requires workspace write access. Revalidates the selected policy under the current supported schema. Prior revisions remain unchanged; stale expected revisions conflict.
Operation: post--api-v1-organizations--organization--projects--project--guardrails-rollback.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "adminBearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X POST "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/guardrails/rollback" \ -H "Authorization: Bearer $NIU_ADMIN_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
Section titled “Parameters”organization
Section titled “organization”Location: path. Required.
{ "type": "string", "format": "uuid"}project
Section titled “project”Location: path. Required.
{ "type": "string", "format": "uuid"}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "type": "object", "additionalProperties": false, "required": [ "expected_revision", "target_revision" ], "properties": { "expected_revision": { "type": "integer", "minimum": 1 }, "target_revision": { "type": "integer", "minimum": 1 } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”New revision and restored_from_revision.
HTTP 400
Section titled “HTTP 400”Invalid target or unsupported stored policy.
HTTP 401
Section titled “HTTP 401”Authentication required.
HTTP 403
Section titled “HTTP 403”Workspace write access required.
HTTP 404
Section titled “HTTP 404”Target revision absent in this workspace.
HTTP 409
Section titled “HTTP 409”Active revision changed.
Behavior and supported scope
Section titled “Behavior and supported scope”Requires workspace write access. Revalidates the selected policy under the current supported schema. Prior revisions remain unchanged; stale expected revisions conflict.