Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Should one setup versioning for API databases as he does for API URLs?

API starts from api.domain.com/v1/ and eventually evolves to api.domain.com/v2/.

Is it good practice to setup separate databases for each API version?

 api.domain.com/v1/ will use database api_v1
 api.domain.com/v2/ will use database api_v2
share|improve this question

1 Answer 1

You probably have the same data the api provides access to. So I think it is pretty impossible to use two databases. An API always should abstract the underlying business logic and database so changes in an API reflect only possibilities to interact with the business logic. Versioning of APIs is a good thing but requires good estimate of what might or surely will change in the future to avoid bigger problems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.