Try WSO2 Cloud for Free
Sign in

All docs This doc
||
Skip to end of metadata
Go to start of metadata

API documentation helps API subscribers to understand the functionality of the API, and API publishers to market APIs and sustain competition. Using the API Publisher, you can add different types of documentation from different sources. All documents created in the API Publisher have unique URLs to help improve SEO support.

In this tutorial, you add in-line, URL-based and file-based documentation to your API and then view it in the API Store. The examples here use the PhoneVerification API, which is created in section Create and Publish an API

The documentation types supported in the API Publisher are as follows:

  • In-line
  • URL-based
  • File-based
  • Swagger documentation: The API Publisher has integrated Swagger to facilitate simple, interactive API documentation and invocation. 

See the video tutorial here or a step-by-step walk-through of the video tutorial below.

Here's a step-by-step walk-though of the video tutorial:  

  1. Log in to WSO2 API Cloud and the API Publisher opens.
  2. Click the API to which you want to add documentation (e.g., PhoneVerification 1.0.0).
     
  3. Select the Docs tab of the API and click the Add New Document link.
     

    In-line documentation

    Allows you to host documentation (How-tos, Samples, SDK, forums etc.) in the API Publisher itself and allows it to be edited directly from the UI.

  4. Provide the following details to create a doc In-line.

    NamePhoneVerification
    TypeHow To
    SourceIn-line
    SummaryCheck the validity of a phone number

  5. Click the Add Document button.
  6. After adding the document, click the Edit Content link associated with it.
  7. The embedded editor opens allowing you to edit the document's content in-line. Add your content and click Save and Close.
  8. The API's Doc tab opens. Click the Add New Document link again.

    Documentation using a URL

    This option allows you to link to file references (URLs) of an external configuration management system.

  9. Then provide the following information to create another doc using a URL.

    NameCDYNE Wiki
    TypeOther (specify)
    SourceURL:
    http://wiki.cdyne.com/index.php/Phone_Verification
    Summary

    CDYNE Phone Verification API

  10. Click the Add Document button.
  11. The API's Doc tab opens again. Click the Add New Document link again to add yet another document using a file.

    Documentation using a file

    This option allows you to upload the documentation directly to the server as a file.

  12. Enter the following information:

    NameAPI Manager Samples
    TypeSamples & SDK
    SourceYou can provide any file format (common formats are PDF, HTML, .doc, text) of any size. For example, use the sample PDF file here.

  13. After adding the details, click the Add Document button.
    You have now added three documents to the API: in-line, using a URL and a file.

  14. Log in to the API Store and click the PhoneVerification 1.0.0 API.

    In the API Store, as a subscriber, you can read the doc and learn about the API.
  15. Go to the API's Documentation tab and see the documents listed by type. Expand the categories and click the View Content or Download links to see the documentation content. 

You have created documentation using the API Publisher and viewed it as a subscriber in the API Store.

  • No labels