Конечные точки REST API для выставления счетов предприятия
Используйте REST API для получения сведений о выставлении счетов для экземпляра GitHub Enterprise Server.
Примечание.
These endpoints only support authentication using a personal access token (classic). For more information, see Managing your personal access tokens.
The manage_billing:enterprise scope is required for personal access tokens (classic) to access these endpoints.
Внимание
The API currently supports adding or removing up to 50 resources in a single operation.
Примечание.
Data for the detailed usage report is available only through the GitHub web interface and cannot be obtained via the REST API /usage endpoint. The REST API only provides access to summarized billing information.
Get GitHub Advanced Security active committers for an enterprise
Gets the GitHub Advanced Security active committers for an enterprise per repository. The authenticated user must be an enterprise admin or billing manager.
Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository.
The total number of repositories with committer information is tracked by the total_count field.
Подробные маркеры доступа для "Get GitHub Advanced Security active committers for an enterprise
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Enterprise administration" enterprise permissions (write)
Параметры для "Get GitHub Advanced Security active committers for an enterprise"
| Имя., Тип, Description |
|---|
accept string Setting to |
| Имя., Тип, Description |
|---|
enterprise string Обязательное полеThe slug version of the enterprise name. |
| Имя., Тип, Description |
|---|
advanced_security_product string The security product to get GitHub Advanced Security active committers for. For standalone Code Scanning or Secret Protection products, this parameter is required to specify which product you want committer information for. For other plans this parameter cannot be used. Возможные значения: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." По умолчанию.: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." По умолчанию.: |
Коды состояния http-ответа для "Get GitHub Advanced Security active committers for an enterprise"
| Код состояния | Description |
|---|---|
200 | Success |
Примеры кода для "Get GitHub Advanced Security active committers for an enterprise"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/settings/billing/advanced-securitySuccess
Status: 200{
"total_advanced_security_committers": 2,
"total_count": 2,
"maximum_advanced_security_committers": 4,
"purchased_advanced_security_committers": 4,
"repositories": [
{
"name": "octocat-org/Hello-World",
"advanced_security_committers": 2,
"advanced_security_committers_breakdown": [
{
"user_login": "octocat",
"last_pushed_date": "2021-11-03",
"last_pushed_email": "octocat@github.com"
},
{
"user_login": "octokitten",
"last_pushed_date": "2021-10-25",
"last_pushed_email": "octokitten@github.com"
}
]
},
{
"name": "octocat-org/server",
"advanced_security_committers": 1,
"advanced_security_committers_breakdown": [
{
"user_login": "octokitten",
"last_pushed_date": "2021-10-26",
"last_pushed_email": "octokitten@github.com"
}
]
}
]
}