Background Information:
Users often use the Azure portal to set, change or remove the configurations of API Management. For instance, we import APIs, create products, configure the log analytics, etc.
The whole picture of entire traffic about those operations is:
User -> Azure Resource Manager -> API Management Control Plane (Resource Provider) -> Management API (Management Endpoint of API Management Service)
User -> Management API (Management Endpoint of API Management Service)
Common Scenario:
When import large API definition, Azure resource manager has 2mins of timeout, however, it may need over 2 mins to wait for API Management finishing the API importing. Therefore, Azure Resource Manager returned 409 error due to the timeout.
In this Scenario, we can call the Management API directly to avoid the similar issue happen.
Prerequisites:
Enable the Management API from Azure portal for your API Management Service and generate the SAS token for authentication via API Management REST | Microsoft Docs:
The screen shows the base URL of the Management API, expire date. Then we should generate an Access Token for future use.
Steps:
For instance, we want to list all the API details of an API management Service:
Noted: This document’s REST APIs are following the Client -> Azure Resource Manager -> Control Plane -> APIM service, we need to change the endpoint afterwards to bypass the Azure Resource Manager.
Steps for getting the target REST API:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis?api-version=2021-08-01
After that, the URL should be like:
GET
https:// {servicename}.management.azure-api.net:3443 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis?api-version=2021-08-01
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.