Reputation: 71
I have defined an API in Azure APIM. I have added one method /users. I want that method to be translated in the backend service as /createUsers.
So frontend API: POST https://xxx.domain.com/abc/dev/service/users -> https://yyy.crm.dynamics.com/api/data/v9.1/createUsers
However I am always getting backend api as https://yyy.crm.dynamics.com/api/data/v9.1/createUsers/users. Is there a way to fix this issue?
I have tried to check the override check box in Backend but still getting /users appended at the end.
Upvotes: 0
Views: 2185
Reputation: 7810
Seems like you've defined your API's service URL as "https://yyy.crm.dynamics.com/api/data/v9.1/createUsers", in that case you need to rewrite operation URI portion to "/" with rewrite-uri
policy (https://learn.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#RewriteURL):
<rewrite-uri template="/" copy-unmatched-params="true" />
Upvotes: 0