A list,

1.2 features

  • 1, extreme simplicity: simple interaction, one minute to get started;
  • 2. Project isolation: API separates and isolates the project as a dimension;
  • 3. Group management: API in a single project supports user-defined group management;
  • 4, mark stars: support to mark API stars, after marking priority display;
  • 5. API management: create, update and delete APIS;
  • 6, PERFECT API properties: support to set rich API properties such as: API status, request method, request URL, request header, request parameters, response result, response result format, response result parameters, API remarks and so on;
  • 7. Markdown: Support to add remarks in MarkDown format for API;
  • 8. Mock: Support to define Mock data for API and formulate data response format, so as to quickly provide Mock interface and speed up development progress;
  • 9. Online test: support online API test and save test data to provide interface test efficiency;

Source code address (the latest code will be published synchronously in both Git repositories)
Blog address (documents will be updated synchronously on both blogs)
Technical Exchange Group (technical exchange only)
  • Came 8249535
  • Group 1:367260654 (Group 1 is full, please add Group 2)

Rapid deployment

2.2 Compiling Source Code

Decompress the source code, import the source code into the IDE according to maven format, and compile it using Maven. The source code structure is shown in the following figure:

2.3 Configuring the JDBC Connection

Set up the APPLICATION’s JDBC connection in the following project file;

/xxl-api/xxl-api-admin/src/main/resources/xxl-api.properties
Copy the code

Iii. Project management

The API in the system is managed by project as a unit, so the project needs to be managed first. The project management interface is shown in the figure below.

3.1 Creating a Project

Enter the project management interface, click “+ New Project “button on the right to create a project, as shown below:

Description of project attributes:

Project name: Project name; Project description: Description of the project; Access rights: "public" rights, indicating that all people can operate; "Private" permission, which means that only the administrator or project members can operate (in the function self-test, will be pushed); Address - online environment: the project online environment and the address, the project API shared the address; Address - Pre-release environment: project pre-release environment and address; Address - Test environment: project test environment and address; Version: Version information of the project;Copy the code

3.2 Updating the Project

Enter the project management interface, click the “Edit” button on the right of the project to update the project information, as shown in the picture below;

3.3 Deleting an Item

Enter the project management interface, click the “Delete” button on the right of the project to delete the project information; Note that you are not allowed to delete an API if it exists in the project;

4.1 API group Management

  • Adding API Groups

As shown below, click the “+” button in the upper right corner of “left interface Group Area” to add AIP interface group. (Clicking “All” will display interfaces under all groups in the project; Default group “is system group, cannot be deleted;)

Description of interface group attributes:

Group name: Name of the group Group Sort: sorting order of the group. The smaller the value is, the earlier the value is.Copy the code
  • Update API grouping

In the “left interface Group area”, click the corresponding API group, and the list of API interfaces under this group will be displayed on the right side. As shown below, click the “Edit Group” button at the top of the interface list (this function is available only for new API groups) to modify the API group information;

  • Deleting API Groups

In the “left interface Group area”, click the corresponding API group, and the list of API interfaces under this group will be displayed on the right side. Click the “Delete Group” button at the top of the interface list (this function is available only for new API groups) to modify the API group information;

4.2 API management

  • The new API

As shown below, in API interface management interface, click the “Add Interface” button at the top of interface list to enter the interface of adding interface. In the new interface interface, as shown in the figure below, you can set the API status, request method, request URL, request header, request parameters, response result, response result format, response result parameters, API remarks and other information of the interface.

API attribute description:

Basic information: Interface group: indicates the group to which the interface belongs. Interface status: Indicates the status of the interface. In the interface list, the enabled interface is identified by a green circle, the maintenance interface by a yellow circle, and the abandoned interface by a gray circle. Request method: request method, such as POST, GET, etc. Interface URL: Indicates the URL address requested by the interface. Note that this is a relative address, and the trailing address is obtained from the trailing address attribute of the owning project. Interface name: indicates the interface name. Request header: The same interface supports multiple request headers. Header tag: The type of the request header, such as accept-encoding; Header: Data in the request header, such as the accept-encoding header utF-8; Request parameters: Multiple request parameters can be set on the same interface. Mandatory: Specifies whether this parameter is mandatory. Parameter type: Data type of the parameter, for example, STRING. Parameter name: Parameter name; Parameter description: Parameter description; Response result: You can set Successful response result and failed response result as reference for interface response data. Response data type (MIME) : Response result type, such as JSON or XML; Response result data: Response result data. For example, if the response result type is JSON, you can set the response result data to JSON data. Response result parameters: supplementary description of parameters in Response result. For example, if the response result type is JSON, the parameter information of each JSON field can be listed here. Non-empty: Whether this parameter can be empty. Parameter type: Data type of the parameter, for example, STRING. Parameter name: Parameter name; Parameter description: Parameter description; Interface remarks: Interface remarks in MarkDown mode.Copy the code
  • Update the API

On the API interface management interface, click the “Update interface icon” button on the right of the interface to enter the update interface interface.

  • Delete the API

On the API interface management interface, click the “Delete Interface icon” button on the right of the interface to delete interface data.

4.3 API – the Mock

  • Add Mock Data On the API interface management page, click the interface name to enter the “Interface Details page”. In the upper right corner of the “Mock Data “module on the interface details page, click the “+Mock Data” button to add Mock data.

Mock data attributes:

Data type (MIME) : response result type, such as JSON, XML, etc. Result data: Response result data. For example, if the response result type is JSON, you can set the response result data to JSON data.Copy the code

  • Update Mock Data In the Mock Data module of the Interface Details page, click the “Modify” button to the right of the Mock data list to modify Mock data.

  • Delete Mock data

In the Mock Data module of the Interface Details page, click the “Delete” button to the right of the Mock data list to delete the Mock data.

  • Running Mock data

In the Mock Data module of the Interface Details page, click the Run button to the right of the Mock data list to run the Mock data. The system will generate a unique Mock connection for each piece of Mock data. Accessing this connection will return Mock data in the corresponding format based on the data type set, such as JSON, as shown in the figure below.

4.4 API – test

  • Enter the “Interface details page”. Click the “+ Interface Test “button in the upper right corner of the “Test history” module to enter the “Interface Test interface”, which will automatically initialize the interface URL (the Test interface supports the selection of running environment, and will automatically generate the complete URL connection of different environments) and parameters and other information. Just fill in the parameter value of the test and click the “Run” button below to initiate an interface request. The request result will be displayed below:

  • Save Test history

In the “interface test interface”, after the interface test, click the “save” button below will save the test data (interface URL, test parameters and other information). You can view all interface Test history records in the “Test History “module of the” Interface Details page “. Click the “Run” button on the right of a test record, it will enter the interface test interface corresponding to the test record, and restore the test data used in the test at that time;

  • Delete Test history

In the “Test History “module of the” Interface Details page “, click the “Delete” button on the right of the Test history record to delete this record;

5. User management

5.2. Update users

Enter the user management interface, click the “edit” button on the right of the user in the user list page to compile the user information;

Vi. Version update log

6.12 Version V1.0.1 Features (Coding)

  • 1. Project permissions: support setting permissions for projects. Only with permissions can you operate the API in the project;

Seven, other

7.2 Access registration (registration is only for promotion, the product is open source and free of charge)

For more access companies, please sign up at Github