Does GitHub REST API support any bulk / batch operations? #151245
Replies: 1 comment
-
As far as I know, the GitHub REST API doesn't support bulk or batch operations. Each request is handled individually, which can be a challenge when performing multiple operations, especially with rate limits. To work around this, you can use strategies like caching responses, queuing requests, and following GitHub's best practices—like making authenticated requests, avoiding too many concurrent requests, and adding pauses between mutative requests. (GitHub API Best Practices) If you need to perform multiple operations efficiently, the GitHub GraphQL API might be a better option since it allows retrieving and modifying multiple resources in a single request. Another alternative is using third-party solutions like erasys/batch-api, which act as a proxy to bundle multiple API calls. However, this adds extra complexity since you’d need to deploy and manage additional infrastructure. So in short—GitHub REST API doesn’t support batch requests, but you can use GraphQL or external batching tools to achieve similar results. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I found a discussion on StackOverflow where one of the GitHub developers confirmed that there was no support for batch operations in 2014.
I haven't managed to find any bulk/batch operations supported in the latest version of the GitHub REST API (2022-11-28).
Could someone confirm this (i.e., that there are no bulk/batch operations supported in the latest version of the GitHub REST API as of 2022-11-28)?
Thank you!
Note: I did not find any relevant matches for the keyword searches "batch" or "bulk" in GitHub OpenAPI specification: https://github.com/github/rest-api-description/blob/main/descriptions/api.github.com/api.github.com.2022-11-28.yaml.
Beta Was this translation helpful? Give feedback.
All reactions