Skip to main content

Visualisation des informations sur l'API dans votre organisation

Vous pouvez visualiser l'activité de l'API REST pour l'ensemble de votre organisation ou pour des applications et des utilisateurs spécifiques.

Qui peut utiliser cette fonctionnalité ?

Organization owners and users with the "View organization API insights" permission.

Your organization must be on a GitHub Enterprise Cloud plan.

About API insights

As a GitHub Enterprise Cloud organization owner, you and your designated users can view REST API activity for your entire organization or specific apps and users. This helps you understand the sources of your REST API activity and manage against your primary rate limits, giving you visibility into the timeframe, apps, and API endpoints involved. To learn more about primary rate limits, see Rate limits for the REST API.

Note

Currently, this feature supports only the core category of REST API endpoints and primary rate limits. API activity for search, GitHub Actions (using the GITHUB_TOKEN secret), and secondary rate-limiting are not supported. For information about API categories, see REST API endpoints for rate limits. To learn more about primary and secondary rate limits, see Rate limits for the REST API.

Enabling access to API insights

Organization owners can create custom organization roles to allow people to view API insights for their organization. To provide users with access, select the View organization API insights permission when creating a custom organization role. Then assign the custom role to an organization member or team. For more information, see About custom organization roles.

Warning

Granting access to organization non-owners will allow them to view API insights for all users and apps in the organization, so privacy should be considered.

Understanding API insights aggregation

The time period selection feature allows you to view API insights over predefined periods or a custom period, as detailed in the following table. By default, data is presented in Coordinated Universal Time (UTC). You can change the data displayed from UTC to your browser's time zone in the "Period" drop down menu at the top-right of the page.

PeriodDescription
Last 30 minutesData from the last 30 minutes to when the page is viewed.
Last 1 hourData from the last 1 hour to when the page is viewed.
Last 3 hoursData from the last 3 hours to when the page is viewed.
Last 12 hoursData from the last 12 hours to when the page is viewed.
Last 24 hours(Default) Data from the last 24 hours to when the page is viewed.
Last 7 daysData from the last 7 days to when the page is viewed.
Last 31 daysData from the last 31 days to when the page is viewed.
CustomData from a custom date and time range that you provide. Custom ranges must begin within the last 31 days.

Viewing API insights for an organization

  1. In the upper-right corner of GitHub, select your profile photo, then click Your organizations.

  2. Click the name of your organization.

  3. Under your organization name, click Insights.

    Screenshot of the horizontal navigation bar for an organization. A tab, labeled with a graph icon and "Insights," is outlined in dark orange.

  4. In the "Insights" navigation menu, click REST API.

  5. Optionally, to select a time period to view API insights for, choose an option from the Period drop down menu at the top-right of the page. For more information, see Understanding API insights aggregation.

  6. Optionally, to switch between displaying dates and times in Coordinated Universal Time (UTC) or the local time zone used by your browser, select "UTC" or "Local" from the Period drop down menu at the top-right of the page.

  7. Optionally, to select how granularly to display REST API requests on the chart, choose an option from the Interval drop down menu at the top-right of the page. Large intervals show summaries of the API activity on the chart while smaller intervals show greater detail for the selected time period. The chart does not automatically update to show new activity.

The selected period and interval automatically become part of the page URL so that if you share the URL with someone, they will see the same view.

Viewing API insights for an organization's apps and users

The "Actors" table displays GitHub Apps and users that made REST API requests in the current organization within the selected time period. The table does not automatically update to show new activity.

  1. First, view API insights for an organization using the steps above in Viewing API insights for an organization.
  2. Filter the apps and users displayed in the "Actors" table.
    1. To filter by name, enter the first few letters of the name in the search field above the "Actors" table. Then press enter.
    2. To filter by type of actor (app or user), choose an option from the Type drop down menu above the top-right of the "Actors" table.
    3. To filter by type of request (all or primary-rate-limited), choose an option from the Requests drop down menu above the top-right of the "Actors" table.

Viewing API insights for a specific app or user in an organization

  1. First, view API insights for an organization using the steps above in Viewing API insights for an organization.
  2. Optionally, select an app in the "Actors" table to display its REST API activity and any primary-rate-limiting. The resulting view will be specific to the selected app and will display the API endpoints it accessed.
  3. Optionally, select a user in the "Actors" table to display their personal REST API activity. The resulting view will be specific to the selected user and will display API activity of their personal access tokens and requests made by OAuth apps on their behalf. Both contribute to a user’s personal primary rate limit. For information about primary rate limits for users, and OAuth apps that act on their behalf, see Rate limits for the REST API.
    1. Optionally, in the user-specific view, click on a personal access token or OAuth app to view its REST API activity made on behalf of the user.