What is wrong with this deprecation communication?
medium
A. The Sunset date is before the Deprecation date, which is illogical
B. The Deprecation header is missing a reason message
C. The Sunset header should not be used with Deprecation
D. The dates are in the wrong format
Solution
Step 1: Compare the Deprecation and Sunset dates
The Deprecation date is 2024-05-01, but the Sunset date is 2024-04-30, which is before deprecation starts.
Step 2: Understand logical order
Deprecation should start before Sunset (removal). Having Sunset before Deprecation is illogical and confusing.
Final Answer:
The Sunset date is before the Deprecation date, which is illogical -> Option A
Quick Check:
Sunset must be after Deprecation [OK]
Hint: Sunset date must be after Deprecation date [OK]
Common Mistakes:
Ignoring date order
Thinking reason message is mandatory
Assuming Sunset and Deprecation can't coexist
5. 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
A. Use Deprecation header with a boolean value and no Sunset header
B. Use only Sunset header with the removal date, no Deprecation needed
C. Use Deprecation with a date when deprecation starts, and Sunset with the removal date
D. Use Retry-After header to indicate when the endpoint will be removed
Solution
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.
Step 2: Evaluate other options
Using only Sunset misses early warning; boolean Deprecation is invalid; Retry-After is unrelated to deprecation.
Final Answer:
Use Deprecation with a date when deprecation starts, and Sunset with the removal date -> Option C
Quick Check:
Deprecation + Sunset = clear deprecation communication [OK]
Hint: Use Deprecation date + Sunset removal date headers [OK]