Requesting partial responses from GitHub API (selecting output/response fields) #21862
-
Does the GitHub API provide a way of requesting partial responses by selecting/limiting the fields returned in an API call? APIs like Blogger and Google Drive allow one to specify a set of fields that should be included in the response (e.g. via the Does the GitHub API provide a similar functionality (e.g. retrieving a list of repos that only contains the repo names, excluding all other fields like As an example, if I request my own repos using the URL https://api.github.com/users/janakaud/repos I receive a huge response (148 KB deflated):
which contains a whole lot of fields that I am not interested in. I’m expecting to obtain a more compact, filtered response instead, such as:
or, even better:
TIA :slight_smile: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @janakaud, THe v3 rest api does not provide this, but the v4 GraphQL api is a lot more flexible in this regard. |
Beta Was this translation helpful? Give feedback.
-
@seveas thanks for the insight! Although it’s unfortunate (I have no way of migrating right now); I believe it being available in v4 means that it won’t become available in v3, even in the future |
Beta Was this translation helpful? Give feedback.
Hi @janakaud,
THe v3 rest api does not provide this, but the v4 GraphQL api is a lot more flexible in this regard.