Bird
0
0

You manage a REST API and want to smoothly phase out an old endpoint. Which combination of headers should you use to clearly communicate deprecation and removal dates to clients?

hard📝 Application Q15 of 15
Rest API - Versioning Strategies
You manage a REST API and want to smoothly phase out an old endpoint. Which combination of headers should you use to clearly communicate deprecation and removal dates to clients?
AUse <code>Deprecation</code> header with a boolean value and no Sunset header
BUse only <code>Sunset</code> header with the removal date, no Deprecation needed
CUse <code>Deprecation</code> with a date when deprecation starts, and <code>Sunset</code> with the removal date
DUse <code>Retry-After</code> header to indicate when the endpoint will be removed
Step-by-Step Solution
Solution:
  1. Step 1: Identify headers for deprecation communication

    The Deprecation header signals when the endpoint is deprecated, and the Sunset header signals when it will be removed.
  2. Step 2: Evaluate other options

    Using only Sunset misses early warning; boolean Deprecation is invalid; Retry-After is unrelated to deprecation.
  3. Final Answer:

    Use Deprecation with a date when deprecation starts, and Sunset with the removal date -> Option C
  4. Quick Check:

    Deprecation + Sunset = clear deprecation communication [OK]
Quick Trick: Use Deprecation date + Sunset removal date headers [OK]
Common Mistakes:
  • Skipping Deprecation header for early warning
  • Using boolean instead of date in Deprecation
  • Confusing Retry-After with deprecation headers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes