'rewrite-uri' Policy Statement

Q

How to use the "rewrite-uri" Policy Statement for an Azure API service operation?

✍: FYIcenter.com

A

The "rewrite-uri" Policy Statement is actually doing the same work as the operation setting "Rewrite URL template".

For example, if you create an API operation with the following settings:

HTTP verb: POST
URL template: /profiles
Rewrite URL template: /users

You will see the "rewrite-uri" policy statement automatically added as shown below:

<inbound>
	<rewrite-uri template="/users" />
</inbound>

The "rewrite-uri" policy statement in the <inbound> block tells Azure to append the given URI template to the "Web service URL" API setting when calling the backend service.

 

Policy to Control Backend Service

⇒⇒Microsoft Azure API Management Tutorials

2017-09-23, 117👍, 0💬