Rules Api List Rule Ids

Rules Api List Rule Ids
List the ids of the Rules that match a filter

Ids of the Rules that match the same filters as the Rules list, with no page parameters, so a client can select every match across pages. Returns at most 500 ids (the most Rules one Policy can have attached) in the requested order, and truncated is true when more match. With assignable=true retired Rules are left out, because a Policy refuses them with 409 RULE_RETIRED. Read-only. Accessible to every authenticated role.

Request
URI
GET
https://{api_host}/api/v1/rules/ids
COPY
Query Parameters
string
search
Optional

Case-insensitive substring search matching name, description, or the match data of a user-defined rule (a built-in rule's body is never searched)

search example
shell
string
ruleType
Optional

Filter by rule type code (for example PATH_FILE_CMD, HASH, PUBLISHER_SIGNING, MFA, ANTI_TAMPER, VIB_REPUTATION)

ruleType example
PATH_FILE_CMD
action
Optional

Filter by action

action example
ALLOW
ruleRank
Optional

Filter by evaluation rank; case-insensitive

ruleRank example
CUSTOM_LOCAL
boolean
isBuiltIn
Optional

true for Built-in, false for Custom

boolean
isEnabled
Optional

Filter by enabled or disabled status

isEnabled example
true
boolean
assignable
Optional
Constraints: default: false

When true, retired Rules are left out because a Policy cannot take them (default false)

assignable example
true
sortBy
Optional
Constraints: default: name

Field to sort by; decides which ids are kept when the list is cut at 500

sortBy example
name
sortOrder
Optional
Constraints: default: ASC

Sort direction

sortOrder example
ASC

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The ids of the matching Rules

Returns RuleIdsDto of type(s) application/json
{
    "ids": [
        7,
        12,
        31
    ],
    "total": 3,
    "limit": 500,
    "truncated": false
}
array of integer
ids
Required  

Ids of the matching Rules in the requested order (default name ascending, then id), at most limit of them

integer As int64 As int64
total
Required  

Number of Rules that match the filter, whether or not they are all in ids

integer As int32 As int32
limit
Required  

The most ids returned: the most Rules one Policy can have attached, as for SyncRulesRequest.ruleIdsInOrder

boolean
truncated
Required  

True when total is greater than the number of ids returned, so the list was cut at limit


400

400 Bad Request: INVALID_SORT or INVALID_FILTER

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.


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