API Documentation

2025-12-27 19:52:33
Sanplex Content
37
Last edited by WANG JING on 2025-12-27 19:52:33
Share links
Summary : API Documentation supports API libraries, data structures, publishing versions, and managing API documents within a structured folder tree.

In Documents, Sanplex provides API documentation capabilities. You can manage API documents and data structures here.


Sanplex also provides API Space, where you can create API documentation under a specific project or product, and view the corresponding API libraries and API documents. Sanplex supports an API Space home page where you can browse Standalone API Libraries, Product APIs, and Project APIs. After entering a library, project, or product, you can view the library’s data structures, API versions, folders, and documents.


Next, we will explain how to use API libraries. You can also watch the video for step-by-step guidance:

视频介绍

1. Assign Permissions

1.1 Document Permissions

First, assign the required view and operation permissions. Permission assignment can be configured flexibly based on actual business needs.

Go to Admin > Users > Permissions and assign the permissions shown in the screenshot.

图1

1.2 API Permissions

Go to Admin > User Management > Permissions > API Management and assign the required permissions.

图2

2. Manage API Documents

2.1 Create an API

On the API document list page, click Create API to create an API document.

图3

2.2 Maintain APIs

Open an API document’s detail page. Click Edit or Delete to maintain the API.

图4

3. Manage Data Structures

3.1 Create a Data Structure

In API Space, open an API library. In the left tree navigation, click Data Structures, then click Create Data Structure in the upper-right corner.

图5

3.2 Maintain Data Structures

On the data structure list page, you can edit or delete a data structure.

图6

4. API Publishing and Version Management

4.1 Publish APIs

In an API library, click Version Management in the left tree navigation, then click Publish APIs in the upper-right corner to publish a new version of the APIs.

图7

4.2 Maintain Published Versions

On the Version Management list page, you can delete published API versions that are no longer needed.

图8

5. Create and Maintain APIs (From the API Library View)

After you organize the folders in an API library, you can add API documents.

5.1 Create an API

Click Create API in the center of the page, or click Create in the upper-right corner, to open the Create API page.

图9

On the Create API page, complete the following fields:

  • API Library: select the target API library from the dropdown
  • Folder: select a folder under the API library
  • Request: supports HTTP and HTTPS; methods GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD
  • Request Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Development Status: Completed, In Progress, Hidden
  • Owner: person responsible for the API
  • Headers: request header fields
  • Parameters: request parameter fields

图10

Request Body: supports four types—FormData, JSON, Array, Object. After selecting a type, define fields (field name, data type, required or not, description). You can add subfields and add/delete fields and subfields.

Request Example: provide a request example based on the request body definition.

图11

Response: define response fields (field name, data type, required or not, description) and manage subfields.

图12

Response Example: write a response example based on the response definition.

Description: a brief introduction to the API.

图13

After completing the API information, click Save. The API will appear in the API list, where you can view its development status and request path.

图14

5.2 Edit an API

In the API list, click the API document name to open the detail page. Click Edit in the upper-right corner to open the edit page.

图15

Note: When editing an API, you cannot change the API Library it belongs to.

图16

5.3 Full Screen and Delete

On the API detail page, click Full Screen to view the API document in full-screen mode.

图17

Click Delete to remove the API. A confirmation step is required.

图18

6. Additional Capabilities

6.1 Manage Data Structures

Click Create Data Structure in the upper-right corner to open the creation page.

图19

On the Create Data Structure page, enter the data structure’s name, type, fields, and description.

图20

Created data structures appear in the list and can be edited or deleted using the action buttons.

图21

6.2 Publish APIs

Publishing APIs enables version management and change tracking for API documentation.

Click Publish APIs in the upper-right corner to open the publishing page.

图22

Publishing page:

图23

After publishing, you can switch between versions to view the corresponding API documentation.

图24

6.3 Version Management

After publishing, you can also open Version Management from the More menu in the upper-right corner of the directory area.

Here you can view published versions and delete versions that are no longer needed.

图25

Write a Comment
Comment will be posted after it is reviewed.