Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Browse immutable workspace policy revision metadata

Generated from the checked-in source. Do not edit this reference by hand.

GET /api/v1/organizations/{organization}/projects/{project}/guardrails/history

Workspace read access required. Newest first, at most 100 records per page. Excludes policy content, internal actor identifiers and credentials. Active reflects the workspace head at the time of each page read. Cache-Control is no-store.

Operation: listWorkspaceGuardrailHistory.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"adminBearerAuth": []
}
]

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.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/guardrails/history" \
-H "Authorization: Bearer $NIU_ADMIN_TOKEN"

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional. Exclusive cursor returned as next_cursor.

JSON
{
"type": "integer",
"minimum": 1
}

No request body is declared.

Revision metadata, including rollback attribution. An empty workspace returns an empty array.

Content type: application/json.

JSON
{
"type": "object",
"required": [
"data",
"next_cursor"
],
"properties": {
"next_cursor": {
"type": [
"integer",
"null"
],
"minimum": 1
},
"data": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"revision",
"policy_name",
"active",
"actor_name",
"activated_at",
"restored_from_revision"
],
"properties": {
"revision": {
"type": "integer",
"minimum": 1
},
"policy_name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"actor_name": {
"type": "string"
},
"activated_at": {
"type": "string",
"format": "date-time"
},
"restored_from_revision": {
"type": [
"integer",
"null"
],
"minimum": 1
}
}
}
}
}
}

Invalid history cursor. Errors do not echo submitted values.

Authentication required, including malformed query requests.

Workspace read access required.

Workspace read access required. Newest first, at most 100 records per page. Excludes policy content, internal actor identifiers and credentials. Active reflects the workspace head at the time of each page read. Cache-Control is no-store.