'410 Gone' or '404 Not Found' for deprecated endpoint ?

50 views
Skip to first unread message

Ikenna Nwaiwu

unread,
Feb 22, 2021, 9:57:03 AMFeb 22
to API Craft

Hello all, 

I am deprecating and removing a REST endpoint. Ideally, do I 

1. Return '404 Not Found' when clients hit that endpoint ?
2. Or return '410 Gone' with an IETF Deprecation Header and Link https://tools.ietf.org/id/draft-dalal-deprecation-header-00.html 

Your thoughts appreciated. Thanks. 

Kind regards,
Ikenna

Erik Wilde

unread,
Feb 23, 2021, 3:36:07 AMFeb 23
to api-...@googlegroups.com, Ikenna Nwaiwu
hello ikenna.

On 2021-02-22 15:57, Ikenna Nwaiwu wrote:
> I am deprecating and removing a REST endpoint. Ideally, do I
>
> 1. Return '404 Not Found' when clients hit that endpoint ?
> 2. Or return '410 Gone' with an IETF Deprecation Header and
> Link https://tools.ietf.org/id/draft-dalal-deprecation-header-00.html
>
> Your thoughts appreciated. Thanks.

in most cases, deprecation is meant as "still operational, but not
recommended to use anymore". removing is a different thing. here's a
brief video i created a while ago:

https://www.youtube.com/watch?v=twfufQn1mD0

cheers

dret.

--
erik wilde | mailto:erik....@dret.net |
| http://dret.net/netdret |
| http://twitter.com/dret |

sune jakobsson

unread,
Feb 23, 2021, 6:01:55 AMFeb 23
to api-...@googlegroups.com, Ikenna Nwaiwu
410 if it is "gone" for a time period, but eventually 404. If there is an alternative, you could return 303

Sune

--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/api-craft/70f536b4-678d-6f92-990d-8e220901a13d%40dret.net.

Ikenna Nwaiwu

unread,
Feb 23, 2021, 8:05:00 AMFeb 23
to Api-...@googlegroups.com


Thanks for the clarification and the video Eric 👍. Subscribed. 
Thank you Sune 👍. 

Kind regards, 
Ikenna 
Reply all
Reply to author
Forward
0 new messages