API Management | Versions & Revisions in Azure API Management

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to the channel today in this session we are going to learn how do you create revisions and versions in the api management let's first of all understand what is the api version and revisions api versions allows you to create multiple versions of the same api for different versions of the same apis and different version can be used together at the same time consider a scenario wherein you have a single api created and now you are adding some enhancement or modifications to existing api that could contain some breaking changes so you might want to publish those changes as part of the new version like considering you might the advantage of having the version in place is you can have multiple version as i said so it might possible some of the customer who are okay to use previous version they can use the same version without affecting any of the their own functionality and whereas the customer who are looking for the new enhancement they can use the new version with the specified version parameters while calling the apis the version can be defined in the api management with three different types as it is suggested here it can be configured with the pass path base or it can be configured with query string or the request header type will check that all the options available in the azure portal while defining the revision what you can do is you can create the multiple revisions to the same api and select a single a particular reason as an online reason and the other reason as an offline reason and by providing the url parameter with the specific release and value the developers or the user can test the user functionality and once they are happy with the the changes they can publish the change publish that particular reason as a online revision well take a look at with the help of demonstration if that's going to be confusing just for the clear understanding or just for the difference of the understanding between these two concepts reason you can think of use the reason when you are in a development phase when you are trying to you know add some enhancements to your api but you are not at the stage of publishing that changes and if you want to test those before it gets deployed onto the production to the end customer then use the revision api versioning is basically a offering where you can have multiple copies with different features on those so that your customers can use either of the version using the let's jump into the developer portal wherein we are going to define the api versions and revisions i want to the developer portal where i have the api management which we have created as part of this series in our previous videos now let's see how do you create a version in the api management so if i select the api click on the these three dots here you get an option to create a version or a revision let's first of all add a version here you need to specify the version identifier the versioning scheme you need to choose so default is the path based versioning it means whatever identifier you are specifying here that will be added to your api path with the slash then the name of the identifier like this so let's say if i say 1.0 then it will be added like this you have some other options as well like header and query string so if you choose header it will be required to pass the same version identifier will require to pass as an header value and if you choose a query string then you need to pass the query string that's simply to understand let's put a name api specifically name api version name here just for the identification choose a product so that this particular version will be applicable on the product now we have two versions of the same api one is the original version and the other one is the version mode.0 you can also use the developer portal to test different version of your api let's login to the developer portal and test our different version of the api this is my developer portal i'll navigate back to the products select the conference product and here you can see that this version is already available api you can see that i have a drop down wherein i got a multiple version so from here i can select a specific version which i am what i want to test let's say if you have multiple version created then the drop down will have the values of those versions so i can go ahead and try the value from here i can press my api from here from the developer portal and you can see that i am getting the same response which is the 200 response for my api with the specified version value pass in the so this is how you can use the versions of your api now let's look at how do you create our revisions of the api now let's check how do you create a revision of a api to create a revision there are two options either you click on these three dots on any of the version and then add revisions once you add a revision it will ask you to provide a description once you provide the description your reason will be ready i'll click cancel and i'll show you other option so from the this dashboard if you go to this particular tab revision you'll see the number of revisions available to this particular api version so i can go ahead and add a new revision so let's say let's consider scenario where i have a api in version 1.0 i would like to test some of the enhancement which i have made here and the enhancement i would like to test with the help of revision so i'll go ahead and create a revision provided description subtesting here you can see that the revision has got the value by default so this is what the value which is going to be used in this particular and you can see that this revision is currently online so i can go to the api design panel so what i'll do is i'll create an api policy from the policy section and i will add a rate limit policy here into this particular revision just for our testing so i've used the rate limit policy so at the moment i have applied a rate limit policy on my current revision and i'm expecting this rape limit policy is not applicable on to the previous version so if i go back back to the testing panel and test the api this time i'm going to use my postman let's test our revision api from the postman let's see if it is working mind you we have the reason configured with the rate limit policy let's see if we get the same response and you can see that our policy is working fine absolutely and as per the policy we have got too many response error because we have tried we are trying to hit the apis multiple time then it's is it it is expected now what i'm going to do is i'll try to run the apis without specifying the revision code here you can see that in the previous tab we have used the version 1.0 along with that we have used the reason 2 which is the latest revision where we got this too many rate limit exception as for policies and now we are testing a revision which does not contains any policies on it so i'm expecting to run it multiple times so i've run three times four times five time and it is working continuously fine even though i am running it like 200 times so i'm not getting any error so far whereas if i hit this the same api one two let's say three and fourth attempt i got the error so this is how you can test the default revision of your api i hope this is clear and this is how you can use the revisions and version of your api now if i'm going to create another version then my new version will have all the revisions which are created in the version v1.0 as you can see the version 2 has already got the revision which is been imported from version 1.0 so this is how you can use the version and revision i hope this is useful thanks for watching the video don't forget to subscribe like and comment
Info
Channel: Our Cloud School
Views: 2,666
Rating: undefined out of 5
Keywords: API Management, API Management Version, API Management Revision, API Management Revision and Version, API Management Version and Revision
Id: s4vFGoQyiN4
Channel Id: undefined
Length: 10min 9sec (609 seconds)
Published: Sun Mar 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.