4
votes

I have setup an Azure API Management Service and its configured on a custom domain. Under the API Management Service's Configure Section in the Azure Portal, I have set the following: API Management Service - Config

Because this is a client system, I have to block out the details but here are the basics:

  • API ENDPOINT DOMAIN: api.example.com
  • DEVELOPER PORTAL DOMAIN: apiportal.example.com
  • There is a SSL uploaded for both.

Because I have the Type Set to Custom, I am required to enter both the API ENDPOINT and the DEV PORTAL.

When I go into the Publish Portal and setup the API I get this: API Publisher Portal - API-Settings

I need to be able to run a single Developer Portal but have 2 different API Servers (1-Sandbox, 2-Production) yet they will have different sub-domains (api-sandbox.example.com & api.example.com)

Is this possible? Why is the API Settings overriding the Web Service URL/URL Suffix with what I put int the API Management Configure?

2

2 Answers

5
votes

Web service URL property is used to specify the backend URL for a specific API. That URL is considered private and should be used by the API Management gateway component only for forwarding requests sent to the public URL you defined for your tenant. So, the behavior you are observing is by design. You should manifest your two backends as two distinct APIs in API Management.

-1
votes

Alternatively, you use use SetBackendService Policy with logic like if request has a special header or query string parameter, or something.