Facturación
La API de REST permite obtener información de facturación para una empresa.
Acerca de la facturación
Puedes obtener información de facturación para una empresa. Para obtener más información, vea «Administración de GitHub Enterprise».
Get GitHub Actions billing for an organization
Gets the summary of the free and paid GitHub Actions minutes used.
Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
Access tokens must have the repo or admin:org scope.
Parámetros para "Get GitHub Actions billing for an organization"
| Encabezados |
|---|
| Nombre, Tipo, Descripción |
accept string Setting to |
| Parámetros de la ruta de acceso |
| Nombre, Tipo, Descripción |
org string RequeridoThe organization name. The name is not case sensitive. |
Códigos de estado de respuesta HTTP para "Get GitHub Actions billing for an organization"
| status code | Descripción |
|---|---|
200 | OK |
Ejemplos de código para "Get GitHub Actions billing for an organization"
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/ORG/settings/billing/actionsResponse
Status: 200{
"total_minutes_used": 305,
"total_paid_minutes_used": 0,
"included_minutes": 3000,
"minutes_used_breakdown": {
"UBUNTU": 205,
"MACOS": 10,
"WINDOWS": 90
}
}Get GitHub Packages billing for an organization
Gets the free and paid storage used for GitHub Packages in gigabytes.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
Access tokens must have the repo or admin:org scope.
Parámetros para "Get GitHub Packages billing for an organization"
| Encabezados |
|---|
| Nombre, Tipo, Descripción |
accept string Setting to |
| Parámetros de la ruta de acceso |
| Nombre, Tipo, Descripción |
org string RequeridoThe organization name. The name is not case sensitive. |
Códigos de estado de respuesta HTTP para "Get GitHub Packages billing for an organization"
| status code | Descripción |
|---|---|
200 | OK |
Ejemplos de código para "Get GitHub Packages billing for an organization"
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/ORG/settings/billing/packagesResponse
Status: 200{
"total_gigabytes_bandwidth_used": 50,
"total_paid_gigabytes_bandwidth_used": 40,
"included_gigabytes_bandwidth": 10
}Get shared storage billing for an organization
Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
Access tokens must have the repo or admin:org scope.
Parámetros para "Get shared storage billing for an organization"
| Encabezados |
|---|
| Nombre, Tipo, Descripción |
accept string Setting to |
| Parámetros de la ruta de acceso |
| Nombre, Tipo, Descripción |
org string RequeridoThe organization name. The name is not case sensitive. |
Códigos de estado de respuesta HTTP para "Get shared storage billing for an organization"
| status code | Descripción |
|---|---|
200 | OK |
Ejemplos de código para "Get shared storage billing for an organization"
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/ORG/settings/billing/shared-storageResponse
Status: 200{
"days_left_in_billing_cycle": 20,
"estimated_paid_storage_for_month": 15,
"estimated_storage_for_month": 40
}Get GitHub Actions billing for a user
Gets the summary of the free and paid GitHub Actions minutes used.
Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
Access tokens must have the user scope.
Parámetros para "Get GitHub Actions billing for a user"
| Encabezados |
|---|
| Nombre, Tipo, Descripción |
accept string Setting to |
| Parámetros de la ruta de acceso |
| Nombre, Tipo, Descripción |
username string RequeridoThe handle for the GitHub user account. |
Códigos de estado de respuesta HTTP para "Get GitHub Actions billing for a user"
| status code | Descripción |
|---|---|
200 | OK |
Ejemplos de código para "Get GitHub Actions billing for a user"
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/USERNAME/settings/billing/actionsResponse
Status: 200{
"total_minutes_used": 305,
"total_paid_minutes_used": 0,
"included_minutes": 3000,
"minutes_used_breakdown": {
"UBUNTU": 205,
"MACOS": 10,
"WINDOWS": 90
}
}Get GitHub Packages billing for a user
Gets the free and paid storage used for GitHub Packages in gigabytes.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
Access tokens must have the user scope.
Parámetros para "Get GitHub Packages billing for a user"
| Encabezados |
|---|
| Nombre, Tipo, Descripción |
accept string Setting to |
| Parámetros de la ruta de acceso |
| Nombre, Tipo, Descripción |
username string RequeridoThe handle for the GitHub user account. |
Códigos de estado de respuesta HTTP para "Get GitHub Packages billing for a user"
| status code | Descripción |
|---|---|
200 | OK |
Ejemplos de código para "Get GitHub Packages billing for a user"
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/USERNAME/settings/billing/packagesResponse
Status: 200{
"total_gigabytes_bandwidth_used": 50,
"total_paid_gigabytes_bandwidth_used": 40,
"included_gigabytes_bandwidth": 10
}Get shared storage billing for a user
Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
Access tokens must have the user scope.
Parámetros para "Get shared storage billing for a user"
| Encabezados |
|---|
| Nombre, Tipo, Descripción |
accept string Setting to |
| Parámetros de la ruta de acceso |
| Nombre, Tipo, Descripción |
username string RequeridoThe handle for the GitHub user account. |
Códigos de estado de respuesta HTTP para "Get shared storage billing for a user"
| status code | Descripción |
|---|---|
200 | OK |
Ejemplos de código para "Get shared storage billing for a user"
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/USERNAME/settings/billing/shared-storageResponse
Status: 200{
"days_left_in_billing_cycle": 20,
"estimated_paid_storage_for_month": 15,
"estimated_storage_for_month": 40
}