このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2023-01-18. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise にアップグレードします。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせく� さい。
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.
管理統計
管理統計 API は、インストールに関するさまざまなメトリクスを提供します。
認証されたサイト管理者のみが使用できます。 通常のユーザーは、アクセスしようとすると 404 応答を受け取ります。
Get all statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/all
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/allResponse
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 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/comments
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/commentsResponse
Status: 200Get gist statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/gists
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/gistsResponse
Status: 200Get hooks statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/hooks
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/hooksResponse
Status: 200Get issue statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/issues
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/issuesResponse
Status: 200Get milestone statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/milestones
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/milestonesResponse
Status: 200Get organization statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/orgs
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/orgsResponse
Status: 200Get pages statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/pages
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/pagesResponse
Status: 200Get pull request statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/pulls
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/pullsResponse
Status: 200Get repository statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/repos
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/reposResponse
Status: 200Get users statistics
HTTP 応答状態コード
| status code | 説明 |
|---|---|
200 | OK |
コード サンプル
get/enterprise/stats/users
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/stats/usersResponse
Status: 200