Azure REST API qu

Findlay, Charles (C.E.) 0 Reputation points
2025-02-19T16:29:02.86+00:00

I'm using a sas token for authentication and am presently making all my calls to the China Azure service.

When I make a call like:

https://myhost.management.azure-api.cn/apis?api-version=2018-01-01

then I get back a list of apis as expected. Now I need to make calls against the container app service. If I try to list the apps by resource group with:

https://myhost.management.azure-api.cn/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps?api-version=2023-12-01

It fails with either a not found or some error like: "The request did not have proper uri path format."

Looking at the rest documentation. I see that the docs for listing the apis is: subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis?api-version=2024-05-01

This is way more complicated that /apis that I am using successfully. Where is the documentation for this? Are there simpler endpoints like this for the container app service?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,350 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 18,816 Reputation points
    2025-02-19T22:02:16.2133333+00:00

    Hi @Findlay, Charles (C.E.) based on the error you shared there are 2 factors causing this issue

    1.The error message "The request did not have proper uri path format" suggests that the URI path maybe incorrect

    2.The API version you're using maynot support the endpoint you're trying to access.

    Here are a few ways to troubleshoot this issue:

    • While API Management uses management.azure-api.cn, most other Azure services in China use management.chinacloudapi.cn. Container Apps falls into this latter category.

    To fix, change the base URL of your Container Apps request to https://management.chinacloudapi.cn.

    • The API path you're using /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps is correct for listing Container Apps within a resource group. However API Management has a different structure that includes /service/{serviceName}/apis. This /service/{serviceName} portion is only applicable to API Management and not to Container Apps.

    To fix, please make sure you are not including /service/{serviceName} in your Container Apps API calls. Also try using 2024-05-01 or later for the API version

    Please let us know if you have further questions.

    -Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.