Deprecation
Notation follows the APIs index.
Deprecation announces that an API should no longer be called, tells callers what they should be calling, instead, and, ideally, how much time they have to migrate.
- Every deprecated API
MUSTbe markeddeprecated: truein the service's OpenAPI spec and thedescriptionfieldMUSTname the replacement. - Every response from a deprecated API
MUSTinclude theDeprecationandSunsetheaders andSHOULDinclude aLinkheader naming the replacement.
Learn more about the Deprecation and Sunset headers.
Example
Deprecation: @1688169599
Sunset: Sun, 30 Jun 2024 23:59:59 GMT
Link: </api/v2/groups>; rel="successor-version"
| Header | Description |
|---|---|
Deprecation | When the operation became deprecated, as an HTTP structured field date - @ followed by seconds since the Unix epoch. |
Sunset | When it will stop working, as an HTTP date. It MUST be a real date, and it MUST NOT pass without either removal or a published extension. |
Link | Points at the replacement. |
Deprecation is defined by RFC 9745, Sunset by
RFC 8594, and Link by
RFC 8288.