Six Stars

Rest Service Versioning

I started off with a simple REST service using TalendESB. Standard tRestRequest/ tRestResponse components. Couple of GET and POST requests. The service has been deployed and has been serving 25 clients without issues. Now, I have run into a design challenge...

 

I have to make a couple of changes on the service which will impact all the clients. It will take some time before all clients are updated with the latest code so that the correct calls are made. 

 

My question is: How can I push my new code while making sure that the clients without updates work fine? Or more importantly, how should I use versions in my service URLs ? How should I make my code backward compatible?

 

I know I should I have thought about this earlier before deployment, but, with my team, it was a service needed ASAP and I did not give much thoughts on this problem.

 

Any suggestions? Any thoughts?

 

Thank you.

  • ESB
1 REPLY
Nine Stars

Re: Rest Service Versioning

I sure - there are no universal solution

depending from changes - it possible or not. For example if You add new column and it mandatory, or add check constraints ... it could not work

my variant (working for me) - same as You can found on many api

 

  • /services/V0/clients/GET
  • /services/V0/clients/PUT
  • /services/V1/clients/GET
  • end etc

version in URL allow have more than 1 version of same service active

 

if version of services - have more deeper structural changes, good idea to think about new database for service as well

in this case:

  • old version continue work with old version
  • new will work with new
  • some other processes will sync changes

 

 

-----------