You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add API version deprecation policy, Deprecation/Sunset headers, and end of support information (#61005)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/rest/about-the-rest-api/api-versions.md
+38-5Lines changed: 38 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ curl {% data reusables.rest-api.version-header %} https://api.github.com/zen
36
36
37
37
Requests without the `X-GitHub-Api-Version` header will default to use the `{{ defaultRestApiVersion }}` version.
38
38
39
-
If you specify an API version that is no longer supported, you will receive a `400` error.
39
+
If you specify an API version that is no longer supported, you will receive a `410 Gone` response.
40
40
41
41
## Upgrading to a new API version
42
42
@@ -46,12 +46,45 @@ When you update your integration to specify the new API version in the `X-GitHub
46
46
47
47
Once your integration is updated, test your integration to verify that it works with the new API version.
48
48
49
+
## API version {% data variables.release-phases.closing_down %}
50
+
51
+
API versions are supported for 24 months after a newer API version is released.
52
+
53
+
While a version is within its support window but approaching {% data variables.release-phases.closing_down %}, {% data variables.product.github %} includes the following headers in API responses to help you prepare for migration:
54
+
55
+
*`Deprecation` — The date when the API version will be {% data variables.release-phases.closing_down %}, formatted as an HTTP date per [RFC 7231](https://tools.ietf.org/html/rfc7231#section-7.1.1.1). For example: `Wed, 27 Nov 2019 14:34:29 GMT`. <!-- markdownlint-disable-line GHD046 -->
56
+
*`Sunset` — The date when the API version will be completely removed ({% data variables.release-phases.retired %}), after which requests will return a `410 Gone` response. Follows [RFC 8594](https://tools.ietf.org/html/rfc8594). For example: `Fri, 27 Nov 2020 14:34:29 GMT`. <!-- markdownlint-disable-line GHD046 -->
57
+
58
+
After the support window ends:
59
+
60
+
* Requests that specify a {% data variables.release-phases.closing_down %} API version receive a `410 Gone` response.
61
+
* Requests that do not specify an API version default to the next oldest supported version, not the {% data variables.release-phases.closing_down %} version. If you rely on unversioned requests, you may observe behavioral changes as older versions are removed from support.
62
+
63
+
For more information on migrating to a newer API version, see [AUTOTITLE](/rest/about-the-rest-api/breaking-changes).
64
+
65
+
## Exceptions to standard versioning
66
+
67
+
In rare cases, {% data variables.product.github %} may make changes outside the normal API versioning cadence. These are exceptional interventions that do not alter the standard versioning guarantees for most integrators.
68
+
69
+
### Security, availability, and reliability issues
70
+
71
+
Critical security vulnerabilities, data exposure risks, or severe reliability issues may require changes outside the normal release schedule. {% data variables.product.github %} may release an unscheduled API version, backport fixes to supported versions, or in rare cases, introduce a breaking change to an existing version to protect users and platform integrity.
72
+
73
+
{% data variables.product.github %} will communicate such changes through release notes, changelogs, and direct communication explaining what changed and why. Where feasible, advance notice will be provided. Immediate action may be taken without advance notice when required.
74
+
75
+
### Low-usage services
76
+
77
+
For certain services with very low usage, {% data variables.product.github %} may deprecate functionality outside the standard versioning process. In these cases, {% data variables.product.github %} will communicate the intent and reach out to affected integrators directly.
78
+
49
79
## Supported API versions
50
80
51
-
The following REST API versions are currently supported:
81
+
The following REST API versions are currently supported.
52
82
53
-
{% for apiVersion in allVersions[currentVersion].apiVersions %}
54
-
{{ apiVersion }}
55
-
{% endfor %}
83
+
| API version | End of support date |
84
+
| --- | --- |
85
+
{%- for apiVersion in allVersions[currentVersion].apiVersions %}
You can also make an API request to get all of the supported API versions. For more information, see [AUTOTITLE](/rest/meta/meta#get-all-api-versions).
Copy file name to clipboardExpand all lines: data/reusables/rest-api/about-api-versions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
The {% data variables.product.github %} REST API is versioned. The API version name is based on the date when the API version was released. For example, the API version `{{ initialRestVersioningReleaseDate }}` was released on {{ initialRestVersioningReleaseDateLong }}.
2
2
3
-
Breaking changes are changes that can potentially break an integration. We will provide advance notice before releasing breaking changes. Breaking changes include:
3
+
Breaking changes are changes that can potentially break an integration. Breaking changes will be released in a new API version. We will provide advance notice before releasing breaking changes. Breaking changes include:
0 commit comments