Need Workaround for API URL Suffix Constraint in Azure API Management

Deepakraj P 20 Reputation points
2025-07-25T13:08:40.7166667+00:00

Description

We are in the process of migrating APIs from Mashery to Azure API Management. As part of this, we have the following requirement:

We have two APIs that are currently served without any API URL suffix (i.e., the endpoint is the root /).

The client systems cannot update or change the existing endpoint URLs, so any alteration in the URL structure—such as adding /api1 or /api2 as suffixes—will break integrations.

Problem

Azure API Management enforces unique API URL suffixes across the entire instance, which means we cannot assign / as the suffix to more than one API—even if they are intended to be served through different domains.

🛠️ What we’re trying

We have added custom domains (e.g., a.hummingbot.in and b.hummingbot.in) to APIM, hoping we can map:

https://a.hummingbot.in/ → API 1 (with no suffix)

https://b.hummingbot.in/ → API 2 (with no suffix)

But the suffix conflict still prevents us from assigning / to both APIs—even though the hostnames are different.

Request

We are looking for a workaround or best practice that will allow us to:

  • Serve multiple APIs with the same API URL suffix (ideally /)
  • Avoid changing client endpoints
  • Possibly leverage custom domains or self-hosted gateway routing, if applicable

Can you please advise whether Azure APIM supports this through any configuration workaround, host-based routing, or other pattern?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
{count} votes

Accepted answer
  1. Ievgen Zasid 75 Reputation points
    2025-07-25T13:37:00.92+00:00

    Hello @Deepakraj P ,

    To achieve seamless API migration objective you need to implement the following idea/steps:

    1. Onboard 2 APIs to 1 API Management instance
      https://myorg.azure-api.net/api1/
      https://myorg.azure-api.net/api2/
    2. Spin up Azure Application Gateway with 2 http listeners in front of API Management
      https://a.hummingbot.in/
      https://b.hummingbot.in/
    3. Implement the following routing leveraging "Rewrite a URL" capability - https://learn.microsoft.com/en-us/azure/application-gateway/rewrite-url-portal https://a.hummingbot.in/ => https://myorg.azure-api.net/api1/ https://b.hummingbot.in/ => https://myorg.azure-api.net/api2/

    As a bonus you can configure Azure Web Application Firewall(WAF) on Application Gateway layer which is not possible to do on API Management. That should increase the security for your API Integrations.

    If you find my recommendations helpful to you please mark my answer as accepted or let me know if you have any additional questions.


0 additional answers

Sort by: Most helpful

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.