Table: github_rate_limit - Query GitHub Rate Limits using SQL
GitHub Rate Limits are a part of the GitHub API that sets the maximum number of requests that a user can make within an hour. These limits are designed to prevent abuse and ensure fair usage of the GitHub API. They apply to authenticated and unauthenticated users, and vary depending on the type of authentication used.
Table Usage Guide
The github_rate_limit
table provides insights into the rate limits set by GitHub for API usage. As a developer or system administrator, you can use this table to monitor your application's API usage, ensuring it stays within the prescribed limits to avoid service disruption. This table is also useful for planning and optimizing the distribution of API requests to maximize efficiency and avoid hitting the rate limit.
Examples
List rate limit of rest apis
Explore the usage of your REST APIs by identifying the remaining and maximum allowed requests. This is beneficial to avoid hitting rate limits and ensuring smooth operation of your services.
select core_limit, core_remaining, search_limit, search_remainingfrom github_rate_limit;
select core_limit, core_remaining, search_limit, search_remainingfrom github_rate_limit;
Schema for github_rate_limit
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
core_limit | bigint | The number of requests per hour the client is currently limited to. | |
core_remaining | bigint | The number of remaining requests the client can make this hour. | |
core_reset | timestamp with time zone | The time at which the current rate limit will reset. | |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
search_limit | bigint | The number of requests per hour the client is currently limited to. | |
search_remaining | bigint | The number of remaining requests the client can make this hour. | |
search_reset | timestamp with time zone | The time at which the current rate limit will reset. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- github
You can pass the configuration to the command with the --config
argument:
steampipe_export_github --config '<your_config>' github_rate_limit