Lotu Radar About

Look up a resource’s cost center with the GitHub REST API

GitHub Changelog Developers & Open Source Score 9/10

Summary

You can now use the GitHub REST API to find which cost center a user, organization, repository, or enterprise team belongs to. Previously, you had to list every cost center… The post Look up a resource’s cost center with the GitHub REST API appeared first on The GitHub Blog .

Original Text

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> You can now use the GitHub REST API to find which cost center a user, organization, repository, or enterprise team belongs to. Previously, you had to list every cost center and scan its resources.

Pass the resource type and name to the new endpoint. The response includes the cost center’s ID and name. If the resource doesn’t belong to a cost center, the memberships array is empty.

Access depends on your role:

Enterprise owners, billing managers, and GitHub Apps with read access to enterprise billing can look up any resource in the enterprise.

Organization owners and users with custom roles that include read access to enterprise billing can only look up the resources and cost centers they can already see.

To get started, see Get cost center membership for a resource in the REST API documentation.

The post Look up a resource’s cost center with the GitHub REST API appeared first on The GitHub Blog.

Developer ToolsGitHubSoftware

Lotu Radar provides attributed news summaries and links to the original publisher. Full reporting and copyright remain with the source.