Skip to main content

Доступ к отчетам для экземпляра

Отчеты можно скачать с информацией о пользователях, организациях и репозиториях на ваш экземпляр GitHub Enterprise Server.

Кто может использовать эту функцию?

Enterprise owners can download reports for a GitHub Enterprise Server instance.

About reports for GitHub Enterprise Server

If you need to get information about the users, organizations, and repositories on your GitHub Enterprise Server instance, you can fetch data using the REST API. For more information, see About the REST API.

The REST API might not provide all of the data that you want, and requires some technical expertise to use. Alternatively, you can reports containing overviews of users, organizations, and repositories on your instance.

Downloading reports using the web UI

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
  2. In the left sidebar, click Reports.
  3. Next to the report you want to download, click Download.

You can download CSV files that report the following information:

  • All users
  • All active users
  • All dormant users
  • All users who have been suspended
  • All organizations
  • All repositories

Downloading reports programmatically

You can also access reports programmatically via standard HTTP authentication and a personal access token (classic). You must use a personal access token (classic) with the site_admin scope. For more information, see Managing your personal access tokens.

For example, you can download the "all users" report using curl:

curl --remote-name \
     --location \
     --user 'USERNAME:TOKEN' \
     http(s)://HOSTNAME/stafftools/reports/all_users.csv

To access the other reports programmatically, replace all_users with active_users, dormant_users, suspended_users, all_organizations, or all_repositories.

Note

The initial curl request will return an HTTP 202 response if there are no cached reports available. Your instance will generate a report in the background. You can send a second request to download the report. You can use a password or an OAuth token with the site_admin scope in place of a password.

User reports

KeyDescription
created_atWhen the user account was created (as an ISO 8601 timestamp)
idAccount ID for the user or organization
loginAccount's login name
emailAccount's primary email address
roleWhether the account is an admin or an ordinary user
suspended?Whether the account has been suspended
last_logged_ipMost recent IP address to log into the account
reposNumber of repositories owned by the account
ssh_keysNumber of SSH keys registered to the account
org_membershipsNumber of organizations to which the account belongs
dormant?Whether the account is dormant
last_activeWhen the account was last active (as an ISO 8601 timestamp)
raw_loginRaw login information (in JSON format)
2fa_enabled?Whether the user has enabled two-factor authentication

Organization reports

KeyDescription
idOrganization ID
created_atWhen the organization was created
loginOrganization's login name
emailOrganization's primary email address
ownersNumber of organization owners
membersNumber of organization members
teamsNumber of organization teams
reposNumber of organization repositories
2fa_required?Whether the organization requires two-factor authentication

Repository reports

KeyDescription
created_atWhen the repository was created
owner_idID of the repository's owner
owner_typeWhether the repository is owned by a user or an organization
owner_nameName of the repository's owner
idRepository ID
nameRepository name
visibilityWhether the repository is public or private
readable_sizeRepository's size in a human-readable format
raw_sizeRepository's size as a number
collaboratorsNumber of repository collaborators
fork?Whether the repository is a fork
deleted?Whether the repository has been deleted