Official support for looking up resources by ID #24515
-
Hello! Is there a way to look up users, repositories, and organizations by their unchanging ID? There are the endpoints mentioned in https://stackoverflow.com/a/30579888, but none of them are attested in API documentation. They do seem to appear in the official Ruby client, however:
(edited down because as a new user I can only post two links) Will those endpoints be made official and documented? Alternatively, is there a way to look up these resources by ID in the GraphQL API? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
👋 @aterweele, welcome to the GitHub Support Community. We appreciate you asking these questions here!
aterweele:
We can’t speak to specific timelines for if or when endpoints will be made official and documented. That said, we checked internally with our team and have an open issue discussing this. For now, we recommend following http://github.blog/ and GitHub API Changes | GitHub Developer Guide for the latest updates to GitHub.com and our API respectively. If you have any other notes to share about your use case, would you mind submitting this through our official product feedback form so that our product team can track your request? That’s the best place to share requests like these in consideration for future iterations of GitHub features.
Yes, but I think some additional context is warranted. As you observed, the GitHub REST API can resolve a repository by its database ID. It can also resolve an organization or a user account by its database ID. The GitHub GraphQL API’s query root exposes the following fields:
A node ID and database ID effectively point to the same resource, but their values are formatted differently. Let’s use
The response exposes its
Here’s a GraphQL query for fetching it by its node ID:
That |
Beta Was this translation helpful? Give feedback.
👋 @aterweele, welcome to the GitHub Support Community. We appreciate you asking these questions here!
We can’t speak to specific timelines for if or when endpoints will be made official and documented. That said, we checked internally with our team and have an open issue discussing this. For now, we recommend following http://github.blog/ and GitHub API Changes | GitHub Developer Guide for the latest updates to GitHub.com and our API respectively.
If you have any other notes to share about your use case, would you mind submitting this through our official product feedback form so that our product team can track your requ…