Saturday, December 6, 2014

WSO2 API Manager's Swagger API Console does not return any results?

When you click “Try it out!” option, sometimes you will see nothing happens other than some dots are moving.


There can be several reason for this problem.

First you need to verify whether CORS configurations are correct in api-manager.xml
It is clearly explained here. Please make sure your settings are correct according to this guide.

If you are accessing the store via HTTPS, you will not be able to use API Console most of the times.

Reason is swagger base path is set to HTTP production endpoint by default. So swagger client can't connect to it.

You can change the swagger base path as explained here.

* Go to publisher and click on your API.

* Click on Docs


* Click Edit Contents of swagger API definition. You will get swagger API definition editor




* You will see that the base path is set to HTTP production url like http://10.100.5.84:8280/phoneverify/1.0.0

* Change it to HTTPS production url like https://10.100.5.84:8243/phoneverify/1.0.0

* Please note that the ports are different in each url.

* Save and close the swagger API definition editor

* Now click on “Try it out!” option from store, you will get response



There you go! You got the response!

No comments:

Post a Comment