Using Versions with Azure APIM

Versions are similar to Revisions, but they are different in their own sense as well. The benefit of working with versions is that developers can separate what is currently running (in maintenance mode) and work on new features, without one disturbing the other – making everyone happy.

To create a version, you simply right-click on the API and select “Add Version”

From here you give the version an identifier and name.

Of note here, once you start versioning your APIs, you can assign different versions to different products. In the event that I was building a new product, I could assign the new version only to that product and not have any other product see it until complete. When creating the version, you have the options of path, header or query string for how you want to differentiate the version of the API calls.

After creating my 1.0 version, you’ll see that a baseline version called “Original” was created.

Toggling back to my Original version, you’ll see my new method “ById” is not associated to that version of the API.

Now when it comes to testing my API, you’ll see that it now has a version indicator in the path (as I did above) when being called.

From there, everything else operates AS IS and APIM handles all other functionality within the routing requests and returning results making the experience seamless.

Over time, if you want to deprecate versions you can easily delete them after you’ve let users know.