Problem with Azure APIM API URL suffix

EnenDaveyBoy 66 Reputation points
2024-05-23T22:26:52.0933333+00:00

Hi

I have a number of Azure Functions which i want to make public and and primarily am using APIM for allow me to configure them under 1 custom domain, to make them more user friendly.

However I am struggle to make the user friendly because of how the are configured by default.

So i add an api to the apim but finding the function app and adding it, in doing so it adds an API URL suffix by default and this is required as soon as you have multiple functions, as soon as you do this, all the api's endpoints are configured as :

<api-domain/<Function App name as API URL suffix>/<Function Route>

this makes them ugly and no very intuative.

All my apps have routes which make the route unique to the endpoints, so in theory all i have to do is find a way to not use the API URL suffix and my apis will be golden.

However if I use a url rewrite policy to remove the API URL suffix i get a 404 not found.

How do i make user friendly endpoints? is there a way to use the function apps routes as the API URL suffix, these do have dynamic values which need to be taken into consideration. (happy to use a different service to apim if needed)

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,876 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,512 questions
{count} votes

1 answer

Sort by: Most helpful
  1. EnenDaveyBoy 66 Reputation points
    2024-05-24T17:11:39.47+00:00

    to get this to work as i want, you simply don't import the API as a function app, and you create one app of blank http, then you manually add all the endpoints for each method for the azure functions, more work but so much cleaner, although the url rewrites can be a little weird

    1 person found this answer helpful.
    0 comments No comments