Skip to main content
POST
GetUsageReport

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Body

application/json

The RateLimitServiceGetUsageReportRequest message.

endTime
string<date-time> | null
groupBy
enum<string>

How requests are combined into entries. Defaults to GROUP_BY_API_KEY.

Available options:
GROUP_BY_UNSPECIFIED,
GROUP_BY_API_KEY,
GROUP_BY_USER
kinds
enum<string>[] | null

Only count requests made with API keys of these kinds. Requests made from a browser session have no kind and are excluded when this is set. When empty, all requests are counted.

Available options:
API_KEY_KIND_UNSPECIFIED,
API_KEY_KIND_PERSONAL,
API_KEY_KIND_DEVICE,
API_KEY_KIND_SERVICE_PRINCIPAL,
API_KEY_KIND_WORKLOAD_FEDERATION,
API_KEY_KIND_CONNECTED_APP,
API_KEY_KIND_CONNECTOR,
API_KEY_KIND_FUNCTION,
API_KEY_KIND_OTHER_SYSTEM
maxEntries
integer<int32>

The maximum number of entries to return, from 1 to 100. Defaults to 25 when 0.

sortBy
enum<string>

The order of the entries. Defaults to SORT_BY_REQUESTS.

Available options:
SORT_BY_UNSPECIFIED,
SORT_BY_REQUESTS,
SORT_BY_THROTTLED
startTime
string<date-time> | null
throttledOnly
boolean

Only include entries with at least one throttled request.

Response

200 - application/json

Successful response

The RateLimitServiceGetUsageReportResponse message.

entries
Rate Limit Consumer · object[] | null

The top entries in sort_by order, at most max_entries of them. Ranking happens over every matching consumer before truncation.

totalConsumers
string<int64>

The number of consumers that match the filters, including those beyond max_entries.

totalRequests
string<int64>

Served requests summed over every matching consumer, including those beyond max_entries.

totalThrottled
string<int64>

Throttled requests summed over every matching consumer, including those beyond max_entries.

windowEnd
string<date-time> | null
windowStart
string<date-time> | null