Policies Api List Policies
Lists Policies, paginated, searchable and sortable. Accessible to every authenticated role.
Zero-based page index (default 0). A negative page answers 400 INVALID_PAGINATION; it is not clamped.
Number of items per page (default 20, 1 to 100). A value outside 1 to 100 answers 400 INVALID_PAGINATION; it is not clamped.
20
Case-insensitive substring search matching policy name or description
baseline
Field to sort by. A secondary sort on policyId is always applied.
name
Sort direction
ASC
200 OK successful response envelope. A page of Policies
{
"items": [
{
"policyId": 1,
"name": "Baseline Policy",
"description": "Default protections for every group",
"createdBy": 1,
"createdByUsername": "alice.example",
"updatedBy": 1,
"updatedByUsername": "alice.example",
"groupCount": 2,
"ruleCount": 14,
"pendingGroupCount": 0,
"publishedVersion": 3,
"hasUnpublishedChanges": false,
"createdAt": "2026-01-02T08:00:00Z",
"updatedAt": "2026-01-10T14:00:00Z"
},
{
"policyId": 2,
"name": "Production Policy",
"description": "Stricter rules for production hosts",
"createdBy": 2,
"createdByUsername": "bob.example",
"updatedBy": 2,
"updatedByUsername": "bob.example",
"groupCount": 1,
"ruleCount": 6,
"pendingGroupCount": 1,
"publishedVersion": 2,
"hasUnpublishedChanges": true,
"createdAt": "2026-01-05T10:00:00Z",
"updatedAt": "2026-01-15T09:35:00Z"
},
{
"policyId": 3,
"name": "Staging Policy",
"description": "Protections for pre-production staging hosts",
"createdBy": 1,
"createdByUsername": "alice.example",
"updatedBy": 1,
"updatedByUsername": "alice.example",
"groupCount": 0,
"ruleCount": 3,
"pendingGroupCount": 0,
"publishedVersion": 0,
"hasUnpublishedChanges": true,
"createdAt": "2026-01-16T08:00:00Z",
"updatedAt": "2026-01-16T08:10:00Z"
}
],
"page": 0,
"pageSize": 20,
"totalItems": 3,
"totalPages": 1
}
Array of items for the current page
Zero-based current page number
Number of items requested per page
Total number of items matching filter criteria
Total number of available pages
400 Bad Request: INVALID_PAGINATION or INVALID_SORT
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
curl -H 'Authorization: <value>' https://{api_host}/api/v1/policies