Skip to main content

Sharing Online

In API development, communication, and collaboration, API documentation is logically the standard, but in practice, there is the problem of passing around files in Word and PDF formats. For this reason, online document is advocated to improve the efficiency of communication between teams.

Sharing Online Documents

In the API, Shared Docs for the current project can be set on the left side.

Click on "New Share," and set the information content according to your needs:

  • Document Language
  • Access Password
  • Date of Sharing Online Documents
  • Sharing Scope: You can choose the entire project, select specific APIs, or import them based on tag dimensions.
  • Operating Environment: You can select the operating environment and display the corresponding URL. After selection, the shared online API documentation supports running and debugging.
  • The person in charge of the API documentation, modification time, and corresponding URL can be displayed.

Share the Entire Directory

The online document supports share the entire directory. Select the corresponding group to open the entire directory sharing, and the group will automatically synchronize to the online document after modification. Of course, if you do not want the online document to synchronize your modifications in real time, you can choose not to enable it.

After the setting is complete, copy the link to share with team members.

View Online Documents

During the Online document process, copying API URLs, data API fields, and return example fields are supported.

Online API Documentation Supports Running and Debugging

Prerequisite: When setting up online sharing, the environment needs to be set (cloud mock is recommended).

Not only does online documentation support online running and debugging, but also many open documents in API Hub support it, which facilitates debugging and use, further improving development and docking efficiency.

Online Documents Support Modifying Environment Variables

Prerequisite: When setting uponline sharing, the environment where the API refers to environment variables need to be set.

When debugging the online document API, there will be a scenario of modifying the environment variables referred to by the API documentation. Now, according to the figure below, the environment variables can be modified, and then run for debugging.

Online Documents Support Displaying Sample Code

The shared Online API document supports displaying sample code, and so does API Hub. You can directly copy the current API's code for immediate use.

Difference Between Sharing and Publishing API Documention

Sharing Documention

The main purpose of custom share is for quick sharing within a small group. Each project can have multiple shares, and each share can have different content and permissions.

Publishing Documention

Publish is mainly used for exposing APls to the public. Eaach project can only have one publish, which supports custom domains, page layoutsettings (such as navigation menu layout), and theme customization.

WEB VersionProject Address{Project-ID}
Specified API in the project-document tab{Project-ID}/apis/api-{API-ID}
Specified API in the project-run tab{Project-ID}/apis/api-{API-ID}-run
Online documentation (public project) Document homepage{Project-ID}
Specified API in the document{Project-ID}/api-{API-ID}
Specified API in the document-automatically open the "run" module{Project-ID}/api-{API-ID}-run

Pass Environment Variables

Function: Set the user's "environment variables" automatically by passing parameters.

Usage: Add URL parameters environment[variable name]=variable value. Example:

WEB Version Project:

Online Documents:

Pass request parameters

Function: Set the "API parameters" of the "run" module (only applicable to specified API addresses and run tabs within the project).

Simple mode:


"Simple mode" does not support scenarios where parameter names include square brackets. In this case, please use "Advanced mode."

Parameter TypeParameter ValueRemarks
Query Paramsquery[xxx]=yyy
Path Paramspath[xxx]=yyy
Body Paramsbody[xxx]=yyyBody Types include formdata or x-www-urlencoded
Body Paramsbody=yyyOther Body Types
Header Paramsheader[xxx]=yyy
Cookie Paramscookie[xxx]=yyy
Environment Variablesenvironment[xxx]=yyyIt will save to the environment variables of the default environment.

Advanced Mode:

WEB run API, Passing parameters by URL:{ "query"%3A{ "aaa"%3A"xxx"%2C "bbb"%3A"yyy" }%2C "body"%3A{ "aaa"%3A"xxx"%2C "bbb"%3A"yyy" }%2C "cookie"%3A{ "aaa"%3A"xxx"%2C "bbb"%3A"yyy" }%2C "environment"%3A{ "aaa"%3A"xxx"%2C "bbb"%3A"yyy" } }

The value of params is obtained by encodeURIComponent on the following JSON data.



"query": [

["id", "value1"],

["id", "value2"],

["key2", "value3"]


"path": [

["key1", "value1"],

["key2", "value2"]


"body": [

["aaa", "value1"],

["key2", "value2"]


"header": [

["testHeader", "value1"],

["key2", "value2"]


"cookie": [

["testCookie", "value1"],

["key2", "value2"]


"environment": [

["key1", "value1"],

["key2", "value2"]


Parameters TypeParameters ValueRemarks
Query Paramsquery
Path Paramspath
Body ParamsbodyIf the body type is formdata or x-www-urlencoded, the value of body is json; otherwise the value of body is string
Header Paramsheader
Cookie Paramscookie
Environment VariablesenvironmentIt will save to the environment variables of the default environment.