{"meta":{"title":"Конечные точки REST API для статистики администратора","intro":"Используйте REST API для получения различных метрик о установке.","product":"REST API","breadcrumbs":[{"href":"/ru/enterprise-cloud@latest/rest","title":"REST API"},{"href":"/ru/enterprise-cloud@latest/rest/enterprise-admin","title":"Администрирование предприятия"},{"href":"/ru/enterprise-cloud@latest/rest/enterprise-admin/admin-stats","title":"Статистика для администраторов"}],"documentType":"article"},"body":"# Конечные точки REST API для статистики администратора\n\nИспользуйте REST API для получения различных метрик о установке.\n\n> \\[!NOTE]\n> Эти конечные точки поддерживают проверку подлинности только с помощью personal access token (classic). Дополнительные сведения см. в разделе [Управление личными маркерами доступа](/ru/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## Get GitHub Enterprise Server statistics\n\n```\nGET /enterprise-installation/{enterprise_or_org}/server-statistics\n```\n\nReturns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days.\nTo use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see \"Enabling Server Statistics for your enterprise\" in the GitHub Enterprise Server documentation.\nOAuth app tokens and personal access tokens (classic) need:\n\nthe read:enterprise scope if you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics\nthe read:org scope if you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise_or_org`** (string) (required)\n  The slug version of the enterprise name or the login of an organization.\n\n* **`date_start`** (string)\n  A cursor, as given in the Link header. If specified, the query only searches for events after this cursor.\n\n* **`date_end`** (string)\n  A cursor, as given in the Link header. If specified, the query only searches for events before this cursor.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprise-installation/ENTERPRISE_OR_ORG/server-statistics\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `server_id`: string\n* `collection_date`: string\n* `schema_version`: string\n* `ghes_version`: string\n* `host_name`: string\n* `github_connect`: object:\n  * `features_enabled`: array of string\n* `ghe_stats`: object:\n  * `comments`: object:\n    * `total_commit_comments`: integer\n    * `total_gist_comments`: integer\n    * `total_issue_comments`: integer\n    * `total_pull_request_comments`: integer\n  * `gists`: object:\n    * `total_gists`: integer\n    * `private_gists`: integer\n    * `public_gists`: integer\n  * `hooks`: object:\n    * `total_hooks`: integer\n    * `active_hooks`: integer\n    * `inactive_hooks`: integer\n  * `issues`: object:\n    * `total_issues`: integer\n    * `open_issues`: integer\n    * `closed_issues`: integer\n  * `milestones`: object:\n    * `total_milestones`: integer\n    * `open_milestones`: integer\n    * `closed_milestones`: integer\n  * `orgs`: object:\n    * `total_orgs`: integer\n    * `disabled_orgs`: integer\n    * `total_teams`: integer\n    * `total_team_members`: integer\n  * `pages`: object:\n    * `total_pages`: integer\n  * `pulls`: object:\n    * `total_pulls`: integer\n    * `merged_pulls`: integer\n    * `mergeable_pulls`: integer\n    * `unmergeable_pulls`: integer\n  * `repos`: object:\n    * `total_repos`: integer\n    * `root_repos`: integer\n    * `fork_repos`: integer\n    * `org_repos`: integer\n    * `total_pushes`: integer\n    * `total_wikis`: integer\n  * `users`: object:\n    * `total_users`: integer\n    * `admin_users`: integer\n    * `suspended_users`: integer\n* `dormant_users`: object:\n  * `total_dormant_users`: integer\n  * `dormancy_threshold`: string\n* `actions_stats`: object:\n  * `number_of_repos_using_actions`: integer\n  * `percentage_of_repos_using_actions`: string\n* `packages_stats`: object:\n  * `registry_enabled`: boolean\n  * `registry_v2_enabled`: boolean\n  * `ecosystems`: array of objects:\n    * `name`: string, enum: `npm`, `maven`, `docker`, `nuget`, `rubygems`, `containers`\n    * `enabled`: string, enum: `TRUE`, `FALSE`, `READONLY`\n    * `published_packages_count`: integer\n    * `private_packages_count`: integer\n    * `public_packages_count`: integer\n    * `internal_packages_count`: integer\n    * `user_packages_count`: integer\n    * `organization_packages_count`: integer\n    * `daily_download_count`: integer\n    * `daily_update_count`: integer\n    * `daily_delete_count`: integer\n    * `daily_create_count`: integer"}