| title | Versions | GitHub API |
|---|
There are two stable versions of the GitHub API: beta and v3. There are just a few differences between these two versions.
By default, all requests receive the beta version. Soon, v3 will become the default version. (Check out the blog post for details.) We encourage you to request a specific version via the Accept header.
The v3 API is stable and unchangeable. Please file a support issue if you have problems.
Some v3 functionality is deprecated and will be removed in the next major version of the API.
The v3 media type differs from the beta media type in just a few places:
For Gists, the v3 media type renames the user attribute to owner.
When an issue is not a pull request, the v3 media type omits the pull_request attribute.
For Repositories, the v3 media type omits the master_branch attribute. API clients should use the default_branch attribute to obtain the repository's default branch.
For User Emails, the v3 media type returns an array of hashes (instead of an array of strings).
The following functionality is deprecated. For backwards compatibility purposes, v3 will continue to provide this functionality. However, this deprecated functionality will be removed in the next major version of the API.
The recommendations below will help you prepare your application for the next major version of the API.
-
Method: /gists/:id/fork : Recommendation: Use /gists/:id/forks (plural) instead.
-
Method: /legacy/issues/search/:owner/:repository/:state/:keyword : Recommendation: Use v3 Issue Search API instead.
-
Method: /legacy/repos/search/:keyword : Recommendation: Use v3 Repository Search API instead.
-
Method: /legacy/user/search/:keyword : Recommendation: Use v3 User Search API instead.
-
Method: /legacy/user/email/:email : Recommendation: Use v3 User Search API instead.
-
Method: /repos/:owner/:repo/hooks/:id/test : Recommendation: Use /repos/:owner/:repo/hooks/:id/tests (plural) instead.
-
Query parameters when POSTing to /repos/:owner/:repo/forks : Recommendation: Use JSON to POST to this method instead.
-
Query parameter value: Passing "watchers" as the value for the "sort" parameter in a GET request to /repos/:owner/:repo/forks : Recommendation: Use stargazers as the value instead.
-
Pull Request attribute: merge_commit_sha : Recommendation: Do not use this attribute.
-
Rate Limit attribute: rate : Recommendation: Use resources["core"] instead.
-
Repository attribute: forks : Recommendation: Use fork_count instead.
-
Repository attribute: master_branch : Recommendation: Use default_branch instead.
-
Repository attribute: open_issues : Recommendation: Use open_issues_count instead.
-
Repository attribute: public : Recommendation: When creating a repository, use the private attribute to indicate whether the repository should be public or private. Do not use the public attribute.
-
Repository attribute: watchers : Recommendation: Use watchers_count instead.
-
User attribute: bio : Recommendation: Do not use this attribute. It is obsolete.
The beta API is now stable and unchangeable. Please file a support issue if you have problems.
Starting April 15, 2014, the beta version will no longer be the default version. However, we expect to continue supporting the beta version for a while. We will eventually retire the beta version, but we have no official retirement date to annouce at the moment. When the time comes, rest assured that we'll announce the retirement with plenty of notice.
gravatar_urlis being deprecated in favor ofavatar_urlfor all responses that include users or orgs. A default size is no longer included in the URL.- Creating new gists (both anonymously and with an authenticated user)
should use
POST /gistsfrom now on.POST /users/:user/gistsis no longer supported.
- Removed support for PUT verb on update requests. Use POST or PATCH instead.
- Removed
.jsonextension from all URLs. - No longer using the X-Next or X-Last headers. Pagination info is returned in the Link header instead.
- JSON-P response has completely changed to a more consistent format.
- Starring gists now uses PUT verb (instead of POST) and returns 204.
We removed support for API v2 on June 12, 2012.
We removed support for API v1 on June 12, 2012.