Skip to main content

Automatizando relatórios de uso com a API REST

Saiba como automatizar relatórios sobre o uso de recursos pagos usando a API REST.

Quem pode usar esse recurso?

Enterprise owners, organization owners, and billing managers

A nova plataforma de cobrança está disponível para todos os usuários.

You can automatically pull data from GitHub to populate the business systems you use to monitor costs and usage using the REST API. If you haven't used the GitHub REST API before, see Using the REST API.

Overview of endpoints

You need to use different endpoints to gather data depending on your account type and the information level you want.

AccountReportAccessEndpointMore information
UsersPremium request consumption, with details of quota and billed usageAccount holder/users/{username}/settings/billing/premium_request/usageBilling usage
UsersUsage data for all paid productsAccount holder/users/{username}/settings/billing/usage/summaryBilling usage
OrganizationsPremium request consumption, with details of quota and billed usageOrganization owners and billing managers/organizations/{org}/settings/billing/premium_request/usageBilling usage
OrganizationsUsage data for all paid productsOrganization owners and billing managers/organizations/{org}/settings/billing/usage/summaryBilling usage
EnterprisesPremium request consumption, with details of quota and billed usageEnterprise owners and billing managers/enterprises/{enterprise}/settings/billing/premium_request/usageBilling usage
EnterprisesUsage data for all paid productsEnterprise owners and billing managers/enterprises/{enterprise}/settings/billing/usage/summary