Policies Api Get Policy Pending Changes
Compares the Policy's enabled rules compiled now with its published snapshot. Read-only. Requires the ADMIN or SECURITY_OPERATOR role.
Policy id
2
200 OK successful response envelope. The changes pending publication for the Policy
{
"policyId": 2,
"policyName": "Production Policy",
"hasUnpublishedChanges": true,
"isNeverPublished": false,
"hasNetChanges": true,
"publishedVersion": 2,
"publishedRuleCount": 6,
"stagedRuleCount": 6,
"changes": [
{
"changeType": "RULE_CHANGED",
"ruleId": 7,
"ruleName": "Audit Shell Spawn",
"ruleType": "PATH_FILE_CMD",
"action": "AUDIT",
"isBuiltIn": false,
"policyId": 2,
"policyName": "Production Policy",
"fromRevision": 1,
"toRevision": 2,
"fromPosition": 2,
"toPosition": 2,
"changedAspects": [
"ACTION"
],
"fromAction": "BLOCK",
"toAction": "AUDIT"
}
]
}
Identifier of the Policy
Current name of the Policy
The Policy's stored flag: a Rule or attachment change not yet published. It can be true while hasNetChanges is false
publishedVersion is 0 and changes is empty
True when changes is not empty. For a Policy that was never published, true when it stages at least one rule
The Policy's published version; 0 when never published
Number of rules in the Policy's published snapshot; 0 when never published
Number of rules publishing the Policy would store now
Differences between the Policy's published snapshot and the rules it stages now, ordered as in the Group's changes. Empty when the Policy was never published
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.
403 Forbidden: FORBIDDEN
{
"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
"ApiErrorResponse Object"
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}/pending-changes