neves
neves

Reputation: 39433

WSO2 Api Manager: how to see the requested URL

WSO2 maps the requested Url called in it to an Url in another server. How can see the mapped URL that WSO2 effectively called?

Upvotes: 0

Views: 585

Answers (2)

neves
neves

Reputation: 39433

Just found an answer at WSO2 blog: [Trace API calls and responses](https://wso2.com/blogs/cloud/trace-api-calls-and-responses/}.

  1. Open for editing the API that you want to trace,

  2. Go to step 2 (Implement),

  3. Click the Enable Message Mediation checkbox and then select the debug_ sequences from the dropdowns for all 3 flows below it

  4. Click the Next: Manage button at the bottom of the screen,

  5. Click Save & Publish at the bottom of the last step of the editing wizard.

  6. Open the live log by clicking the Configure / Admin Dashboard menu, and then clicking Log Analyzer / Live Log Viewer in Admin Dashboard’s left-hand menu pane.

  7. Now invoke the API (for example, in the API Store‘s API Console for that API).

  8. You will see detailed information on the API request and response in the log

  9. When you are done troubleshooting, disable the message mediation that you enabled in step 3.

This solution has a great disadvantage: you must have Analytics running (I don't have it now). But you can turn it on just for your own API. If you don't have Analytics running, you can compromise with @Bee solution below and some tail -f|grep .

Upvotes: 2

Bee
Bee

Reputation: 12513

For debugging, another option you have is enabling wire logs.

1) Uncomment below line in <APIM_HOME>/repository/conf/log4j.properties

log4j.logger.org.apache.synapse.transport.http.wire=DEBUG

2) Restart the Server.

3) Send a request and wire logs can be found in console and <APIM_HOME>/repository/logs/wso2carbon.log file.

Upvotes: 2

Related Questions