When to create an v2 api versus a v1?

Options

I have created and used both v1 and v2 types of rest apis, but I am still not clear on their major differences. Can someone please explain why they both exist, and in which cases one should be preferred over the other? I am specifically talking about when you are creating them, which type should you create in which instances and why.

Thanks

Comments

  • It is actually provided in the implementation notes from OT.OT's cgi has an in inherent difficulty when it comes to consuming the JSON as a data input that is why we jump over hoops to create a fake json body parameter and such like .That is a devloper hearsay I do not know what is the actual problem.I tend to book mark the oldest REST v1 when it was introduced more or less .I tend to think that v1 is more expensive to CS as well as on the wire but again it is a choice,in v2 you may end up doing more calls to get the esame thing done .

  • Thank you for taking the time to reply.

    If you are creating your own API though, not using one that OT created, does it matter if you create a v1 or v2 type? I guess this is more of an oscript question. What is the difference on the oscript side between a v1 or v2 API?

  • v1 is essentially in maintenance mode as we are not adding any new features or endpoints and are only supplying bug fixes and correcting security issues to that version of the API. It is strongly recommended that you only add new endpoints to the latest version of the API in order to take advantage of all of the latest features, benefits and advancements. Creating and endpoint in v2 is done in a manner that's similar to what was done previously, so it shouldn't take any more development effort in creating a v2 endpoint.

  • Can you elaborate on what the "features, benefits and advancements" are of v2 endpoints over v1 endpoints?

    Thank you.