A
A
Anrek2021-12-23 11:37:45
Backend
Anrek, 2021-12-23 11:37:45

How to correctly name the updated request in the backend?

Good afternoon!

I already have a working GET request for "/product/search".
But in the second version of the backend, I changed a lot of things and I want to leave the old one so that it responds to clients with the old version and add a new one with the same meaning, but generally different.

Question: Is version #2 of the query okay to name something like "/product/search/new" ? or are there any accepted conventions how to tag requests in this case? What is this new version - and the old one with the same name can be simply deleted after a while?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-12-23
@Anrek

It is correct to name it, for example, /api/v2/product/search/so that you already have a built-in versioning scheme and do not think about it in the future.
However, if the clients are under your control, then you can call them whatever you like.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question