api_insights_summary_stats
Creates, updates, deletes, gets or lists an api_insights_summary_stats resource.
Overview
| Name | api_insights_summary_stats |
| Type | Resource |
| Id | github.orgs.api_insights_summary_stats |
Fields
The following fields are returned by SELECT queries:
- get_summary_stats_by_actor
- get_summary_stats_by_user
- get_summary_stats
Response
| Name | Datatype | Description |
|---|---|---|
rate_limited_request_count | integer (int64) | The total number of requests that were rate limited within the queried time period |
total_request_count | integer (int64) | The total number of requests within the queried time period |
Response
| Name | Datatype | Description |
|---|---|---|
rate_limited_request_count | integer (int64) | The total number of requests that were rate limited within the queried time period |
total_request_count | integer (int64) | The total number of requests within the queried time period |
Response
| Name | Datatype | Description |
|---|---|---|
rate_limited_request_count | integer (int64) | The total number of requests that were rate limited within the queried time period |
total_request_count | integer (int64) | The total number of requests within the queried time period |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_summary_stats_by_actor | select | org, min_timestamp, actor_type, actor_id | max_timestamp | 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_user | select | org, user_id, min_timestamp | max_timestamp | Get overall statistics of API requests within the organization for a user. |
get_summary_stats | select | org, min_timestamp | max_timestamp | Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
actor_id | integer | The ID of the actor |
actor_type | string | The type 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. |
org | string | The organization name. The name is not case sensitive. |
user_id | string | The ID of the user to query for stats |
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. |
SELECT examples
- get_summary_stats_by_actor
- get_summary_stats_by_user
- get_summary_stats
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.
SELECT
rate_limited_request_count,
total_request_count
FROM github.orgs.api_insights_summary_stats
WHERE org = '{{ org }}' -- required
AND min_timestamp = '{{ min_timestamp }}' -- required
AND actor_type = '{{ actor_type }}' -- required
AND actor_id = '{{ actor_id }}' -- required
AND max_timestamp = '{{ max_timestamp }}'
;
Get overall statistics of API requests within the organization for a user.
SELECT
rate_limited_request_count,
total_request_count
FROM github.orgs.api_insights_summary_stats
WHERE org = '{{ org }}' -- required
AND user_id = '{{ user_id }}' -- required
AND min_timestamp = '{{ min_timestamp }}' -- required
AND max_timestamp = '{{ max_timestamp }}'
;
Get overall statistics of API requests made within an organization by all users and apps within a specified time frame.
SELECT
rate_limited_request_count,
total_request_count
FROM github.orgs.api_insights_summary_stats
WHERE org = '{{ org }}' -- required
AND min_timestamp = '{{ min_timestamp }}' -- required
AND max_timestamp = '{{ max_timestamp }}'
;