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:
<policies> <inbound> </inbound> <backend> <forward-request /> </backend> <outbound> </outbound> </policies>
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:
2017-09-23, 160👍, 0💬
How To Generate and Process a Form with the Same Script in PHP? In previous exercises, a Web form is...
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value mul...
How To Use an Array as a Stack in PHP? A stack is a simple data structure that manages data elements...
How To Control Vertical Alignment? By default, text in all table cells are aligned to the top vertic...
How To Control Padding Spaces within a Table Cell? Cell padding spaces are spaces between cell inner...