Policies Api Get Policy
Returns one Policy by id with its name, description, the number of Groups and Rules attached, the number of attached Groups with pending changes, the published version, whether it has unpublished changes, and who created and last updated it. An unknown id returns 404 POLICY_NOT_FOUND. Accessible to every authenticated role.
Policy id
1
200 OK successful response envelope. The Policy
{
"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"
}
Identifier of the Policy, assigned by the server when the Policy is created
Policy name, stored trimmed, at most 255 characters, and different from every other Policy's name ignoring case
Free text, stored trimmed, at most 2,000 characters; a whitespace-only text is stored as an empty string. Null when none was given
Identifier of the user who created the Policy. Null when no user is recorded
Username of createdBy; absent when createdBy is absent or the user no longer exists
Identifier of the user who last edited the Policy's name or description (the creator until then). Null when no user is recorded
Username of updatedBy; absent when updatedBy is absent or the user no longer exists
Number of Groups the Policy is attached to
Number of Rules attached to the Policy
Number of attached Groups whose hasPendingChanges flag is set. Read it as 'N attached groups have unpublished changes', never as 'this policy changed'.
Number of times the Policy has been published; 0 means never published
True when a Rule or attachment change has not been published to the Policy's snapshot
When the Policy was created, as an ISO 8601 date-time with offset; never changes
When the Policy was last updated, as an ISO 8601 date-time with offset
400 Bad Request: INVALID_ARGUMENT when the id path variable is not a number
{
"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.
404 Not Found: POLICY_NOT_FOUND
{
"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/{id}