provider orgs GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}
@utdk/github /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}
Get route stats by actor
Get API request count statistics for an actor broken down by route within a specified time frame.
org path required
The organization name. The name is not case sensitive.
string
actor_type path required
The type of the actor
enum: installation, classic_pat, fine_grained_pat, oauth_app…
actor_id path required
The ID of the actor
integer
min_timestamp query required
The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
string
max_timestamp query
The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
string
page query
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
integer
per_page query
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
integer
direction query
The direction to sort the results by.
enum: asc, desc
sort query
The property to sort the results by.
array
api_route_substring query
Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search.
string

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

apiInsights.getRouteStatsByActor
GET/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}
Get API request count statistics for an actor broken down by route within a specified time frame.

Parameters

required

The organization name. The name is not case sensitive.

required

The type of the actor

required

The ID of the actor

required

The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.

The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.

The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."

The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."

The direction to sort the results by.

The property to sort the results by.

Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.apiInsights.getRouteStatsByActor({
  "page": 1,
  "per_page": 30,
  "direction": "desc"
})