Skip to main content
Publicamos atualizações frequentes em nossa documentação, e a tradução desta página ainda pode estar em andamento. Para obter as informações mais recentes, acesse a documentação em inglês. Se houver problemas com a tradução desta página, entre em contato conosco.

Esta versão do GitHub Enterprise foi descontinuada em 2022-06-03. Nenhum lançamento de patch será feito, mesmo para questões críticas de segurança. Para obter melhor desempenho, melhorar a segurança e novos recursos, upgrade to the latest version of GitHub Enterprise. Para ajuda com a atualização, contact GitHub Enterprise support.

We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the Actions REST API page.

Estatísticas de admin

A API de Estatísticas Administrativas fornece uma variedade de métricas sobre sua instalação.

Só está disponível para administradores do site autenticados. Usuários normais receberão uma mensagem 404 se tentarem acessá-la.

Get all statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/all
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/all

Response

Status: 200
{ "repos": { "total_repos": 212, "root_repos": 194, "fork_repos": 18, "org_repos": 51, "total_pushes": 3082, "total_wikis": 15 }, "hooks": { "total_hooks": 27, "active_hooks": 23, "inactive_hooks": 4 }, "pages": { "total_pages": 36 }, "orgs": { "total_orgs": 33, "disabled_orgs": 0, "total_teams": 60, "total_team_members": 314 }, "users": { "total_users": 254, "admin_users": 45, "suspended_users": 21 }, "pulls": { "total_pulls": 86, "merged_pulls": 60, "mergeable_pulls": 21, "unmergeable_pulls": 3 }, "issues": { "total_issues": 179, "open_issues": 83, "closed_issues": 96 }, "milestones": { "total_milestones": 7, "open_milestones": 6, "closed_milestones": 1 }, "gists": { "total_gists": 178, "private_gists": 151, "public_gists": 25 }, "comments": { "total_commit_comments": 6, "total_gist_comments": 28, "total_issue_comments": 366, "total_pull_request_comments": 30 } }

Get comment statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/comments
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/comments

Response

Status: 200

Get gist statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/gists
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/gists

Response

Status: 200

Get hooks statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/hooks
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/hooks

Response

Status: 200

Get issue statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/issues
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/issues

Response

Status: 200

Get milestone statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/milestones
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/milestones

Response

Status: 200

Get organization statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/orgs
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/orgs

Response

Status: 200

Get pages statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/pages
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/pages

Response

Status: 200

Get pull request statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/pulls
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/pulls

Response

Status: 200

Get repository statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/repos
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/repos

Response

Status: 200

Get users statistics

HTTP response status codes

Status codeDescrição
200

OK

Amostras de código

get/enterprise/stats/users
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/enterprise/stats/users

Response

Status: 200