Get updates to your emailSubscribe
Today, an updated version of "The Sunset HTTP Header" specification (currently an Internet draft) was published. The
Sunset HTTP header field indicates that a URI is likely to become unresponsive at a specified point in the future. It also defines a
sunset link relation type that allows linking to resources providing information about an upcoming resource or service sunset.
Sunset header field can be used in a variety of scenarios:
Temporary Resources: Some resources may have a limited lifetime by definition. For example, a pending order represented by a resource may already list all the details of the order, but may only exist for a limited time unless it is confirmed and only then becomes permanent. In such a case, the service managing the pending order can make this limited lifetime explicit, allowing clients to understand that the pending order, unless confirmed, will disappear at some point in time.
Migration: If resources are changing identity because a service migrates them, then this may be known in advance. While it may not yet be appropriate to use HTTP redirect status codes (3xx), it may be interesting for clients to learn about the service's plan to take down the original resource.
Retention: There are many cases where regulation or legislation require that resources are kept available for a certain amount of time. However, in many cases there also is a requirement for those resources to be permanently deleted after some period of time. Since the deletion of the resource in this scenario is governed by well-defined rules, it could be made explicit for clients interacting with the resource.
Deprecation: For Web APIs one standard scenario is that an API or specific subsets of an API may get deprecated. If this is planned in advance, then for the time before the actual deprecation is rolled out, the resources that will be affected by the deprecation can make the date of their deprecation known. This allows consumers of the API to be notified of the upcoming deprecation.
If you are already using the
Sunset header field, consider adding your implementation to the list of known implementations. If you have questions or comments about the draft, the GitHub repo is a good place to raise them.
An expert in protocol design and structured data, Erik Wilde consults with organizations to help them get the most out of APIs and microservices. Erik has been involved in the development of innovative technologies since the advent of the Web and is active in the IETF and W3C communities. He obtained his PhD from ETH Zurich and served as Associate Adjunct Professor at Berkeley before working at EMC, Siemens and now CA Technologies.