Policies Api List Policy Rules
Returns the Rules attached to the Policy in evaluation order. Accessible to every authenticated role.
Policy id
3
200 OK successful response envelope. The Rules attached to the Policy
[
{
"policyId": 3,
"ruleId": 31,
"ruleName": "Require MFA for SSH",
"ruleType": "MFA",
"action": "MFA_REQUIRED",
"ruleRank": "CUSTOM_LOCAL",
"isBuiltIn": false,
"isEnabled": true,
"description": "Asks the Production Operators for a second factor",
"matchData": "{\"user_group_ids\":[1]}",
"revision": 1,
"updatedAt": "2026-01-12T08:00:00Z",
"sequence": 1
},
{
"policyId": 3,
"ruleId": 12,
"ruleName": "Block Unapproved Scripts",
"ruleType": "PATH_FILE_CMD",
"action": "BLOCK",
"ruleRank": "CUSTOM_LOCAL",
"isBuiltIn": false,
"isEnabled": true,
"description": "Blocks scripts executed from the temporary directory",
"matchData": "{\"target_path\":\"/tmp/\",\"match_mode\":\"PREFIX\",\"allowed_ops\":[\"EXECUTE\"],\"is_directory_recursive\":true}",
"revision": 1,
"updatedAt": "2026-01-15T09:30:00Z",
"sequence": 2
},
{
"policyId": 3,
"ruleId": 7,
"ruleName": "Audit Shell Spawn",
"ruleType": "PATH_FILE_CMD",
"action": "AUDIT",
"ruleRank": "CUSTOM_LOCAL",
"isBuiltIn": false,
"isEnabled": true,
"description": "Records every shell started by a service account",
"matchData": "{\"process_path\":\"/bin/sh\",\"match_mode\":\"EXACT\",\"allowed_ops\":[\"EXECUTE\"]}",
"revision": 1,
"updatedAt": "2026-01-10T08:00:00Z",
"sequence": 3
}
]
A Rule attached to a Policy, in evaluation order.
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}/rules