This plugin allows you to integrate data from REST API sources seamlessly.
As a commercial plugin, it requires uploading and activation through the plugin manager.

After activating the plugin, you can add a REST API source by selecting it from the Add new dropdown menu in the data source management section.

Configure the REST API source.

In NocoBase, a RESTful resource is mapped to a Collection, such as a Users resource.
These API endpoints are mapped in NocoBase as follows:
For a comprehensive guide on NocoBase API design specifications, refer to the API documentation.

Check the "NocoBase API - Core" chapter for detailed information.

The Collection configuration for a REST API data source includes the following:
Map the interface for viewing a list of resources.

Map the interface for viewing resource details.

Map the interface for creating a resource.

Map the interface for updating a resource.

Map the interface for deleting a resource.

Both the List and Get interfaces are required to be configured.
Example: Configure pagination parameters for the List API. If the third-party API does not support pagination natively, NocoBase will paginate based on the retrieved list data.

Please note that only variables added in the interface will take effect.
| Third-party API params name | NocoBase params |
|---|---|
| page | {{request.params.page}} |
| limit | {{request.params.pageSize}} |
You can click Try it out to debug and view the response.

The response format of the third-party API may not be in NocoBase standard, and it needs to be transformed before it can be correctly displayed on the front end.

Adjust the conversion rules based on the response format of the third-party API to ensure the output conforms to the NocoBase standard.

Debugging process description

The REST API data source supports three types of variables for API integration:



Currently, only the response body is available.

Below are the variables available for each interface:
| Parameter | Description |
|---|---|
| request.params.page | Current page |
| request.params.pageSize | Number of items per page |
| request.params.filter | Filter criteria (must meet NocoBase Filter format) |
| request.params.sort | Sorting criteria (must meet NocoBase Sort format) |
| request.params.appends | Fields to load on demand, typically for association fields |
| request.params.fields | Fields to include (whitelist) |
| request.params.except | Fields to exclude (blacklist) |
| Parameter | Description |
|---|---|
| request.params.filterByTk | Required, typically the current record ID |
| request.params.filter | Filter criteria (must meet NocoBase Filter format) |
| request.params.appends | Fields to load on demand, typically for association fields |
| request.params.fields | Fields to include (whitelist) |
| request.params.except | Fields to exclude (blacklist) |
| Parameter | Description |
|---|---|
| request.params.whiteList | Whitelist |
| request.params.blacklist | Blacklist |
| request.body | Initial data for creation |
| Parameter | Description |
|---|---|
| request.params.filterByTk | Required, typically the current record ID |
| request.params.filter | Filter criteria (must meet NocoBase Filter format) |
| request.params.whiteList | Whitelist |
| request.params.blacklist | Blacklist |
| request.body | Data for update |
| Parameter | Description |
|---|---|
| request.params.filterByTk | Required, typically the current record ID |
| request.params.filter | Filter criteria (must meet NocoBase Filter format) |
Field metadata (Fields) is extracted from the CRUD interface data of the adapted resource to serve as the fields of the collection.

Extract field metadata.

Fields and preview.

Edit fields (similar to other data sources).

Once the collection is configured, you can add blocks to the interface.
