Top Policy for All API Products


How to add and view the top policy for all API products?



Be default, Azure automatically creates a top policy for all API products. In the top policy, the "forward-request" policy statement is added in the "backend" section automatically forward client request to the backend service.

But if there is "forward-request" policy statement is showing up in the effective policy, the top policy may have been modified or removed. Follow this tutorial to review or add the top policy

1. Go to the publisher portal of the API Management Service.

2. Click "Policies" on the left menu. You see the gateway policy definition page.

3. Select "First API" in the API dropdown list.

4. Leave 3 dropdown lists to be "All products", "All APIs" and "All operations". You see the top policy displayed.

5. Click "ADD POLICY", if the top policy area is empty. You see a default policy is added.

6. Make some changes in the policy, so that the "Save" button is activated.

7. Click the "Save" button. The following top policy is added with the "forward-request" policy statement included:

		<forward-request />

8. Click the "CONFIGURE POLICY" link, if you want to make additional changes.

9. Go back to the developer portal to test "Add new user" again. The request will be echoed back in the response. Issue is fixed.

The picture below shows you steps on how to view effective gateway policy of an API operation:
API Operation - Add and Edit Top Policy


Making API More User Friendly

⇒⇒Microsoft Azure API Management Tutorials

2017-09-23, 160👍, 0💬