Skip to main content
Skip to content
REST API はバージョン化されました。 詳細については、「API のバージョン管理について」を参照してください。

API Insights の REST API エンドポイント

REST API を使用して、organization 内の API 使用状況の統計情報を表示します。

Get route stats by actor

Get API request count statistics for an actor broken down by route within a specified time frame.

Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

"Get route stats by actor" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "API Insights" organization permissions (read)

"Get route stats by actor" のパラメーター

ヘッダー
名前, タイプ, 説明
accept string

Setting to application/vnd.github+json is recommended.

パスパラメーター
名前, タイプ, 説明
org string 必須

The organization name. The name is not case sensitive.

actor_type string 必須

The type of the actor

次のいずれかにできます: installation, classic_pat, fine_grained_pat, oauth_app, github_app_user_to_server

actor_id integer 必須

The ID of the actor

クエリ パラメーター
名前, タイプ, 説明
min_timestamp string 必須

The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

max_timestamp string

The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

デフォルト: 1

per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

デフォルト: 30

direction string

The direction to sort the results by.

デフォルト: desc

次のいずれかにできます: asc, desc

sort array

The property to sort the results by.

api_route_substring string

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

"Get route stats by actor" の HTTP 応答状態コード

状態コード説明
200