3 ms·
This is how a good API would handle the change. Deprecate the first URL, do a redirect to the new one for a period of time, then remove the original endpoints.
by FuzzyDunlop 15y ago
This is how a good API would handle the change. Deprecate the first URL, do a redirect to the new one for a period of time, then remove the original endpoints.
Same concept as deprecating code. You don't wipe it out straight away because you have no idea what else might rely on it or how fast they are to react (within reason).
As for the arguments about not using HTTP request methods - they're standard, and are implemented uniformly everywhere (for the best part). Your API isn't standard, but if all APIs use HTTP and its request methods correctly, you only need to learn the general HTTP spec to generally understand all APIs.
Resources and URL structure afterwards is a matter of opinion. What may seem RESTful to me might not be to someone else.