Rules Api List Rule Policies

Rules Api List Rule Policies
List the Policies a Rule is attached to

Every Policy the Rule is attached to. Accessible to every authenticated role.

Request
URI
GET
https://{api_host}/api/v1/rules/{id}/policies
COPY
Path Parameters
integer
id
Required  

Id of the catch-all rule the administrator authored

id example
12

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The Policies the Rule is attached to

[
    {
        "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"
    }
]
array of object
Optional

A Policy.


400

400 Bad Request: INVALID_ARGUMENT when the id path variable is not a number

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

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

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

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

404 Not Found: RULE_NOT_FOUND

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/rules/{id}/policies