Skip to main content
Мы публикуем частые обновления нашей документации, и перевод этой страницы может все еще выполняться. Актуальные сведения см. в документации на английском языке.
В настоящее время GitHub AE находится в ограниченном выпуске.

Недавно мы перенесли некоторые из документации по REST API. Если вы не можете найти то, что ищете, попробуйте страницу REST API Действия.

Статистика для администраторов

Используйте REST API для получения различных метрик об установке.

About admin stats

These endpoints are only available to authenticated site administrators. Normal users will receive a 404 response.

Get all statistics

Примеры кода для "Get all statistics"

get/enterprise/stats/all
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://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

Примеры кода для "Get comment statistics"

get/enterprise/stats/comments
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/comments

Response

Get gist statistics

Примеры кода для "Get gist statistics"

get/enterprise/stats/gists
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/gists

Response

Get hooks statistics

Примеры кода для "Get hooks statistics"

get/enterprise/stats/hooks
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/hooks

Response

Get issue statistics

Примеры кода для "Get issue statistics"

get/enterprise/stats/issues
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/issues

Response

Get milestone statistics

Примеры кода для "Get milestone statistics"

get/enterprise/stats/milestones
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/milestones

Response

Get organization statistics

Примеры кода для "Get organization statistics"

get/enterprise/stats/orgs
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/orgs

Response

Get pages statistics

Примеры кода для "Get pages statistics"

get/enterprise/stats/pages
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/pages

Response

Get pull request statistics

Примеры кода для "Get pull request statistics"

get/enterprise/stats/pulls
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/pulls

Response

Get repository statistics

Примеры кода для "Get repository statistics"

get/enterprise/stats/repos
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/repos

Response

Get users statistics

Примеры кода для "Get users statistics"

get/enterprise/stats/users
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/enterprise/stats/users

Response