Docs
Live demo
GET/api/v2/policies/facets
access:readAPI token

Retrieve facet value counts and view counts for the policies list filters. Each facet is counted over the rows that match the search and every other facet, without its own filter, so a count says how many rows picking that value keeps. Views count the searched rows without facet filters. Total counts the rows that match every filter

Parameters

Query14 optional
subject_idstringquery

Filter by subject ID (UUID)

target_idstringquery

Filter by target ID (UUID)

target_id[]array of stringquery

Filter by any of these target IDs (UUIDs), in addition to target_id

id[]array of string · uuidquery

Only the rules with these IDs (UUIDs), up to 100. Names rules by ID in one request

max items 100
subject_id[]array of string · uuidquery

Only the rules of these subjects (person, group or service account IDs), up to 100

max items 100
searchstringquery

Search subject display names, target names and rule IDs (case-insensitive)

max length 200
last_apply_status[]array of stringquery

Filter by last apply statuses, as returned in last_apply_status

subject_kind[]array of stringquery

Filter by subject kinds (user, group, service)

latest_plan_risk[]array of stringquery

Filter by latest plan risks (critical, high, medium, low)

binding[]array of stringquery

Filter by binding kind (direct, inherited)

engine[]array of stringquery

Filter by target engines (postgres, kubernetes, mysql, clickhouse, mongodb)

templatestringquery

Filter by the name of the access template the rule was made from

max length 200
temporarybooleanquery

When true, only rules with a TTL (I17), the ones that end by themselves at their expires_at

exclude_applicationsbooleanquery

When true, rules that only grant sign-in to applications (on the application engine or with app:// resources only) are left out

Responses

200

OK

ListFacetsResponse · 3 fields
totalintegerrequired

Rows that match the search and every filter.

facetsmap of string → array of ListFacetValueResponserequired

Values with counts per facet, ordered by count descending.

viewsmap of string → integerrequired

Rows per named view, counted under the search without facet filters.

Common errors: 400 401 403 429 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close