title | description | services | documentationcenter | author | manager | editor | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.custom | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Publish versions of your API using Azure API Management | Microsoft Docs |
Follow the steps of this tutorial to learn how to publish multiple versions in API Management. |
api-management |
vladvino |
cfowler |
api-management |
mobile |
na |
na |
mvc |
tutorial |
06/15/2018 |
apimpm |
There are times when it is impractical to have all callers to your API use exactly the same version. When callers want to upgrade to a later version, they want to be able to do this using an easy to understand approach. It is possible to do this using versions in Azure API Management. For more information, see Versions & revisions.
In this tutorial, you learn how to:
[!div class="checklist"]
- Add a new version to an existing API
- Choose a version scheme
- Add the version to a product
- Browse the developer portal to see the version
- Complete the following quickstart: Create an Azure API Management instance.
- Also, complete the following tutorial: Import and publish your first API.
-
Select Demo Conference API from the API list.
-
Select the context menu (...) next to it.
-
Select + Add Version.
[!TIP] Versions can also be enabled when you first create a new API - select Version this API? on the Add API screen.
Azure API Management allows you to choose the way in which you allow callers to specify which version of your API they want. You specify which API version to use by selecting a versioning scheme. This scheme can be either path, header or query string. In the following example, path is used to select the versioning scheme.
-
Leave path selected as your versioning scheme.
-
Add v1 as the Name and Version identifier.
[!TIP] If you select header or query string as a versioning scheme, you need to provide an additional value - the name of the header or query string parameter.
-
Select Create to set up your new version.
-
Underneath Demo Conference API in the API List, you now see two distinct APIs - Original, and v1.
[!Note] If you add a version to a non-versioned API, an Original will be automatically created - responding on the default URL. This ensures that any existing callers are not broken by the process of adding a version. If you create a new API with versions enabled at the start, an Original is not created.
-
You can now edit and configure v1 as an API that is separate to Original. Changes to one version do not affect another.
In order for callers to see the new version, it must be added to a product.
-
Select Products from the classic deployment model page.
-
Select Unlimited.
-
Select APIs.
-
Select Add.
-
Select Demo Conference API, Version v1.
-
Navigate to the service management page and select APIs.
-
Select Developer Portal from the top menu.
-
Select APIs, notice that Demo Conference API shows Original and v1 versions.
-
Select v1.
-
Notice the Request URL of the first operation in the list. It shows that the API URL path includes v1.
In this tutorial, you learn how to:
[!div class="checklist"]
- Add a new version to an existing API
- Choose a version scheme
- Add the version to a product
- Browse the developer portal to see the version
Advance to the next tutorial:
[!div class="nextstepaction"] Customize the style of the Developer portal pages