This documentation is for WSO2 API Manager 1.5.0 View documentation for the latest release.
Page Comparison - Adding Documentation Using Swagger (v.11 vs v.19) - API Manager 1.5.0 - WSO2 Documentation

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 15


Explained below is how to get an interactive documentation for an  API:

Table of Contents

We use API named FindTweetsFindFeeds, which is based on the online search functionality provided by Twitter Youtube ( We use use as the Production Url/Endpoint.


  1. Log in to API Publisher Web interface (https://localhost:9443/publisher), and go to Add API page. Create new API with following information.

  2. Define API resources for the operations you need to perform.
    Specify None as the Auth Type of OPTIONS

    For each of the resource that has HTTP verbs requiring Authentication (i.e., Auth Type is not NONE), enable OPTIONS with None Auth type. For example, as the following screen shot shows, resources with /* URL Pattern has HTTP verbs with Auth Type as Application & Application User. Therefore, we must give None as the Auth Type of OPTIONS. This is to support CORS (Cross Origin Resource Sharing) between the API Store and Gateway. But, if no authentication is needed for any of the HTTP verbs, you don't have to specify None Auth type to OPTIONS.

    Image RemovedImage Added

  3. Publish the API to the API Store.

Invoking the interactive documentation


  1. In the API Publisher, go to the Doc tab of FindTweets FindFeeds API to see its API definition.
  2. API definition contains the JSON representation of the API. You can easily modify existing content, add/remove elements, change paths and parameters etc. using the JSON editor.


    By default, all the POST and PUT operations have the Payload parameter, which you can use to send any payload when invoking the API. The GET, DELETE operations have Query parameters, which you can use to send URL-appended parameters. You can also add named parameters.

    For example, to modify the path of the API created above with a parameter, edit the path and add the relevant parameter.

    To add new elements, click Add New Value and provide the value. To delete elements, delete the value of Key. For example, if you delete Key value description, that element will be deleted. The screenshot below shows path modified with a parameter.

    The following screenshot shows parameter definition added for param and the default Payload parameter removed:

    Also be sure to modify descriptions, notes, summary on each of the operations.

  3. Once the modifications are done, save and Publish the API.

  4. Log in to the API Store and click on GET operation to expand it. There you can enter the parameters and try it out.