Skip to main content

Create Embedded Links

tip

The Embedded Links are only available for the spaces on the paid Pro or higher plan in AITable Cloud as well as Enterprise self-hosted edition.

Node types that support creating embedded links are:

Example

Here is an example of calling API to create embedded links.

To create an embedded link for a specified datasheet in the space, follow the steps below:

  1. Obtain your API token. (how to)

  2. Obtain the spaceId. (how to)

  3. Obtain the datasheetId. (how to)

  4. Open your system terminal, copy and paste following code on it and make a request to AITable server (the example space ID here is spcjXzqVrjaP3, and the datasheetId is dstWUHwzTHd2YQaXEE)

    curl -X POST \
    "https://aitable.ai/fusion/v1/spaces/spcjXzqVrjaP3/nodes/dstWUHwzTHd2YQaXEE/embedlinks" \
    -H "Authorization: Bearer {Your API Token}" \
    -H 'Content-Type: application/json' \
    -d '{
    "payload": {
    "primarySideBar": {
    "collapsed": false
    },
    "viewControl": {
    "viewId": "viw4mnkqkaqdh",
    "tabBar": true,
    "nodeInfoBar": false,
    "toolBar": {
    "basicTools": false,
    "widgetBtn": false,
    "apiBtn": false,
    "formBtn": false,
    "historyBtn": false,
    "robotBtn": false,
    "addWidgetBtn": false,
    "fullScreenBtn": false,
    "formSettingBtn": false
    },
    "collapsed": false,
    "collaboratorStatusBar": true
    },
    "bannerLogo": true,
    "permissionType": "readOnly"
    },
    "theme": "light"
    }'
  5. The server will return the following JSON object, and the information of the embedded link will be displayed in data property:

    {
    "code": 200,
    "success": true,
    "data": {
    "linkId": "embb90a52cfc02a4f83",
    "url": "https://aitable.ai/embed/embb90a52cfc02a4f83",
    "payload": {
    "primarySideBar": {
    "collapsed": false
    },
    "viewControl": {
    "viewId": "viw4mnkqkaqdh",
    "tabBar": false,
    "toolBar": {
    "basicTools": false,
    "widgetBtn": false,
    "apiBtn": false,
    "formBtn": false,
    "historyBtn": false,
    "robotBtn": false,
    "addWidgetBtn": false,
    "fullScreenBtn": false,
    "formSettingBtn": false
    },
    "collapsed": false,
    "collaboratorStatusBar": true,
    "nodeInfoBar": false
    },
    "bannerLogo": true,
    "permissionType": "readOnly"
    },
    "theme": "light"
    },
    "message": "SUCCESS"
    }
    tip

    For the meaning of each parameter in the response result above, please check the API Reference.