API Insights에 대한 REST API 엔드포인트
REST API를 사용하여 조직의 API 사용량에 대한 통계를 볼 수 있습니다.
Get route stats by actor
Get API request count statistics for an actor broken down by route within a specified time frame.
"Get route stats by actor"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get route stats by actor"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
actor_type string RequiredThe type of the actor 다음 중 하나일 수 있습니다.: |
actor_id integer RequiredThe ID of the actor |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
direction string The direction to sort the results by. 기본값: 다음 중 하나일 수 있습니다.: |
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 | OK |
"Get route stats by actor"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/route-stats/ACTOR_TYPE/ACTOR_ID?min_timestamp=MIN_TIMESTAMP"
Response
Get subject stats
Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps.
"Get subject stats"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get subject stats"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
direction string The direction to sort the results by. 기본값: 다음 중 하나일 수 있습니다.: |
sort array The property to sort the results by. |
subject_name_substring string Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. |
"Get subject stats"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get subject stats"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/subject-stats?min_timestamp=MIN_TIMESTAMP"
Response
Status: 200
[
{
"subject_type": "installation",
"subject_id": 954453,
"subject_name": "GitHub Actions",
"integration_id": 124345,
"total_request_count": 544665,
"rate_limited_request_count": 13,
"last_request_timestamp": "2024-09-18T15:43:03Z",
"last_rate_limited_timestamp": "2024-09-18T06:30:09Z"
}
]
Get summary stats
Get overall statistics of API requests made within an organization by all users and apps within a specified time frame.
"Get summary stats"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get summary stats"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
"Get summary stats"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get summary stats"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/summary-stats?min_timestamp=MIN_TIMESTAMP"
Response
Get summary stats by user
Get overall statistics of API requests within the organization for a user.
"Get summary stats by user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get summary stats by user"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
user_id string RequiredThe ID of the user to query for stats |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
"Get summary stats by user"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get summary stats by user"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/summary-stats/users/USER_ID?min_timestamp=MIN_TIMESTAMP"
Response
Get summary stats by actor
Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user.
"Get summary stats by actor"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get summary stats by actor"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
actor_type string RequiredThe type of the actor 다음 중 하나일 수 있습니다.: |
actor_id integer RequiredThe ID of the actor |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
"Get summary stats by actor"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get summary stats by actor"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/summary-stats/ACTOR_TYPE/ACTOR_ID?min_timestamp=MIN_TIMESTAMP"
Response
Get time stats
Get the number of API requests and rate-limited requests made within an organization over a specified time period.
"Get time stats"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get time stats"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
timestamp_increment string RequiredThe increment of time used to breakdown the query results (5m, 10m, 1h, etc.) |
"Get time stats"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get time stats"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/time-stats?min_timestamp=MIN_TIMESTAMP×tamp_increment=TIMESTAMP_INCREMENT"
Response
Status: 200
[
{
"timestamp": "2024-09-11T15:00:00Z",
"total_request_count": 34225,
"rate_limited_request_count": 0
},
{
"timestamp": "2024-09-11T15:05:00Z",
"total_request_count": 10587,
"rate_limited_request_count": 18
},
{
"timestamp": "2024-09-11T15:10:00Z",
"total_request_count": 43587,
"rate_limited_request_count": 14
},
{
"timestamp": "2024-09-11T15:15:00Z",
"total_request_count": 19463,
"rate_limited_request_count": 4
},
{
"timestamp": "2024-09-11T15:20:00Z",
"total_request_count": 60542,
"rate_limited_request_count": 3
},
{
"timestamp": "2024-09-11T15:25:00Z",
"total_request_count": 55872,
"rate_limited_request_count": 23
}
]
Get time stats by user
Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period.
"Get time stats by user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get time stats by user"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
user_id string RequiredThe ID of the user to query for stats |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
timestamp_increment string RequiredThe increment of time used to breakdown the query results (5m, 10m, 1h, etc.) |
"Get time stats by user"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get time stats by user"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/time-stats/users/USER_ID?min_timestamp=MIN_TIMESTAMP×tamp_increment=TIMESTAMP_INCREMENT"
Response
Status: 200
[
{
"timestamp": "2024-09-11T15:00:00Z",
"total_request_count": 34225,
"rate_limited_request_count": 0
},
{
"timestamp": "2024-09-11T15:05:00Z",
"total_request_count": 10587,
"rate_limited_request_count": 18
},
{
"timestamp": "2024-09-11T15:10:00Z",
"total_request_count": 43587,
"rate_limited_request_count": 14
},
{
"timestamp": "2024-09-11T15:15:00Z",
"total_request_count": 19463,
"rate_limited_request_count": 4
},
{
"timestamp": "2024-09-11T15:20:00Z",
"total_request_count": 60542,
"rate_limited_request_count": 3
},
{
"timestamp": "2024-09-11T15:25:00Z",
"total_request_count": 55872,
"rate_limited_request_count": 23
}
]
Get time stats by actor
Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period.
"Get time stats by actor"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get time stats by actor"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
actor_type string RequiredThe type of the actor 다음 중 하나일 수 있습니다.: |
actor_id integer RequiredThe ID of the actor |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
timestamp_increment string RequiredThe increment of time used to breakdown the query results (5m, 10m, 1h, etc.) |
"Get time stats by actor"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get time stats by actor"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/time-stats/ACTOR_TYPE/ACTOR_ID?min_timestamp=MIN_TIMESTAMP×tamp_increment=TIMESTAMP_INCREMENT"
Response
Status: 200
[
{
"timestamp": "2024-09-11T15:00:00Z",
"total_request_count": 34225,
"rate_limited_request_count": 0
},
{
"timestamp": "2024-09-11T15:05:00Z",
"total_request_count": 10587,
"rate_limited_request_count": 18
},
{
"timestamp": "2024-09-11T15:10:00Z",
"total_request_count": 43587,
"rate_limited_request_count": 14
},
{
"timestamp": "2024-09-11T15:15:00Z",
"total_request_count": 19463,
"rate_limited_request_count": 4
},
{
"timestamp": "2024-09-11T15:20:00Z",
"total_request_count": 60542,
"rate_limited_request_count": 3
},
{
"timestamp": "2024-09-11T15:25:00Z",
"total_request_count": 55872,
"rate_limited_request_count": 23
}
]
Get user stats
Get API usage statistics within an organization for a user broken down by the type of access.
"Get user stats"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "API Insights" organization permissions (read)
"Get user stats"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
user_id string RequiredThe ID of the user to query for stats |
속성, 형식, 설명 |
---|
min_timestamp string RequiredThe minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: |
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: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
direction string The direction to sort the results by. 기본값: 다음 중 하나일 수 있습니다.: |
sort array The property to sort the results by. |
actor_name_substring string Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. |
"Get user stats"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get user stats"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/ORG/insights/api/user-stats/USER_ID?min_timestamp=MIN_TIMESTAMP"
Response
Status: 200
[
{
"actor_type": "oauth_app",
"actor_id": 954453,
"actor_name": "GitHub Actions",
"oauth_application_id": 1245,
"total_request_count": 544665,
"rate_limited_request_count": 13,
"last_request_timestamp": "2024-09-18T15:43:03Z",
"last_rate_limited_timestamp": "2024-09-18T06:30:09Z"
}
]