removal of url param from backend url

Malaya Chaterjee 25 Reputation points

I am facing one issue with formation of backend api.

Url exposed by Azure api management:


Backend API:


however when hitting the source url from postman, generatetoken is getting added in the back end api.

Please let me know how to remove /generatetoken while invoking the back end api.



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

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,141 Reputation points

    Malaya Chaterjee Thank you for posting this question in Microsoft Q&A. Based on the above example, I assume you have configured your APIM with API as Grid and operation as generatetoken and backend as https://****com:8080/as/token. As described here, an operation is a combination of HTTP verb and URL template and hence it added generatetoken when calling backend API.

    To remove this, use rewrite-uri policy (like below snippet for your example) and here is reference doc: Rewrite URL about this policy which includes for more scenarios like query parameters etc.

    <rewrite-uri template="/" />

    If you have any questions or still need help, feel free to add a comment and would be happy to answer.

0 additional answers

Sort by: Most helpful