This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Create a new API Version

A new API version is created when you want to change a published API's behavior, authentication mechanism, resources, throttling tiers, target audiences etc. It isn't recommended to modify a published API that has subscribers plugged to it.

After creating a new version, you typically deploy it as a prototype for early promotion. A prototype can be used for testing, without subscription, along with the published versions of the API. After a period of time during which the new version is used in parallel with the older versions, the prototyped API can be published and its older versions deprecated.

In this tutorial, you create a new version of an existing API and then edit the new version's functionality.

The examples here use the PhoneVerification API, which is created in section Create and Publish an API.

 A video tutorial of all the tutorials in this section is available here.

The steps below show how to create a new version of an existing API.

  1. Log in to the API Publisher.
  2. Select the API that you want to create a version of (e.g., PhoneVerification 1.0.0).
  3. The API opens. Click CREATE NEW VERSION.
      
  4. Give a version number, check the default version option, and click Done.

    Tip: The Default Version option means that you make this version the default in a group of different versions of the API. A default API can be invoked without specifying the version number in the URL. For example, if you mark http://host:port/youtube/2.0 as the default version when the API has 1.0 and 3.0 versions as well, requests made to http://host:port/youtube/ get automatically routed to version 2.0.

    If you mark any version of an API as the default, you get two API URLs in its Overview page in the API Store. One URL is with the version and the other is without. You can invoke a default version using both URLs.

    If you mark an unpublished API as the default, the previous default, published API will still be used as the default until the new default API is published (or prototyped).

  5. The All APIs page opens. Click the edit icon of the new API version to open it in edit mode.
     

  6. Do the required modifications to the API. For example, assuming that the POST method is redundant, let's delete it from the resource that we added to the API at the time it was created. 
  7. Click Save once the edits are done.

You have created a new version of an API. In the next tutorial, you deploy this API as a prototype and test it with its older versions.