View Effective Policy of an API Operation
How to View Effective Policy of an API Operation? My API operation is not calling the backend service.
If your API operation is not calling the backend service, you need to view the effective policy of the API operation to see why backend service is not called.
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. Select "Add new user" in the operation dropdown list. You see the system generated gateway policy displayed.
5. Click the "View effective policy for selected scope" button. You see the effective policy displayed:
<policies> <inbound> <rewrite-uri template="/profiles" /> </inbound> <backend /> <outbound /> <on-error /> </policies>
The empty "backend" section is telling the API gateway to not forward the request to the backend service. This is why there is no backend actions in the test trace report.
To fix the issue, you need add the "forward-request" policy statement in the backend section as demonstrated in the next tutorial.
The picture below shows you steps on how to view effective gateway policy of an API operation:
2017-09-23, 124👍, 0💬
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...
How To Return a Reference from a Function? in PHP? To return a reference from a function, you need t...
What Types of Data Can Be Used as Array Keys in PHP? Two types of data can be used as array keys: st...
How To Create a Table To Store Files in PHP? If you using MySQL database and want to store files in ...
How To Specify Argument Default Values? in PHP? If you want to allow the caller to skip an argument ...