'set-status' Policy Statement

Q

How to use the "set-status" Policy statement to modify the response status for an Azure API service operation?

✍: FYIcenter.com

A

The "set-status" Policy Statement allows you to change the status code of the response.

For example, the following outbound policy changes the status code of the response to 401:

<outbound>
    <set-status code="401" reason="Unauthorized" />  
</outbound>

 

Policy to Control Backend Service

⇒⇒Microsoft Azure API Management Tutorials

2017-09-23, 120👍, 0💬