latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-216381,9552.9 MB

f2cf3228f366

App Entitlement

Count Grants For User By App

CountGrantsForUserByApp returns, for a user, the number of grants held per application. Use it to size or filter an access graph before calling SearchGraph: counts are computed directly from grant bindings and are an upper bound on what SearchGraph will render for the same user and app filter (SearchGraph applies additional filters that this count does not).

post/api/v1/search/graph/counts

Request body

appIdsstring[] nullable

Restrict the count to these applications. Empty counts grants across all applications the user has access to.

userIdstring

The user whose grants to count.

Response

CountGrantsForUserByApp response. Grant counts are computed directly from grant bindings and are an upper bound on what SearchGraph renders for the same user and app filter — SearchGraph applies additional filters that these counts do not.

appCountinteger

The number of applications represented in app_grant_counts.

band'GRAPH_SIZE_BAND_UNSPECIFIED' | 'GRAPH_SIZE_BAND_NORMAL' | 'GRAPH_SIZE_BAND_SUMMARIZED' | 'GRAPH_SIZE_BAND_TOO_LARGE'

Advisory size classification for the user's access graph. See GraphSizeBand.

totalGrantsstring int64

The sum of grant_count across all app_grant_counts.