Sign in
Log inSign up

How to change a REST endpoint path in production

Ben Goosman's photo
Ben Goosman
·Mar 27, 2020

Instead of immediately changing the old one, which would break all your clients, do the following

  1. Add the new path as a new endpoint which calls everything the old endpoint called, but with the new functionality. Separating the service code into a new class helps with this a lot, to minimize duplication of code. (Separation of Concerns)
  2. Check the new endpoint into production.
  3. Change the client to use the new endpoint.
  4. As soon as no clients are using the old endpoint, you can safely remove it.
Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct