Data sources for Magic Pen applications

更新时间:
复制 MD 格式

Transferring application data

Magic Pen can read data from databases and APIs. You can use integrations to load data onto a page. For more information, see Overview.

Create a MySQL integration resource

For more information, see Integrate a database.

Important

I cannot configure a database connection to Alibaba Cloud RDS, and the connection test fails.

  • Check if the connection string uses a public endpoint.

  • Ensure that an IP address whitelist is configured.

After you create an integration resource, how do you apply it to an application?

Select the created integration from Code > New > Integration Operation > Integration Resource.

Run an integration operation

Set the integration to 'Auto Run'. The integration then triggers when the page loads.

In your code, call the integration using `action.trigger()`. Here, `action` is the name of the integration operation. For more information, see API Reference.

Navigate to Configure Event Handler > Integration Operation > Configure > Integration to pass parameters by entering them directly.

Use host application data in Magic Pen