Get Embedded Links
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 check and get all the embedded links of a datasheet.
If you'd like to get all embedded links about a specified datasheet in the space, you can follow below steps:
Obtain your API token. (how to)
Obtain the spaceId. (how to)
Obtain the datasheetId. (how to)
Open your system terminal, copy and paste the following code on it and make a request to AITable server (here the example space ID is
spcjXzqVrjaP3
, and the datasheetId isdstWUHwzTHd2YQaXEE
)- cURL
- Javascript SDK
- Python SDK
curl -X GET \
"https://api.apitable.cn/fusion/v1/spaces/spcjXzqVrjaP3/nodes/dstWUHwzTHd2YQaXEE/embedlinks" \
-H "Authorization: Bearer {Your API Token}" \
-H "Content-Type: application/json"Note: Need to Download and initialize Javascript SDK first, and then execute the following command.
import { APITable } from 'apitable';
const apitable = new APITable({
token: 'Your API Token',
});
try {
const res = await apitable.space('spcjXzqVrjaP3').datasheet('dstWUHwzTHd2YQaXEE').getEmbedLinks();
if (res.success) {
const embedsLinks = res.data || []
}
} catch (error) {
// TODO: handle error
}Note: You need to download and initialize the Python SDK first, and then execute the following command.
from apitable import Apitable
apitable = Apitable("Your API Token")
try:
embedLinks = apitable.space('spcjXzqVrjaP3').datasheet('dstWUHwzTHd2YQaXEE').get_embed_links()
print(embedLinks)
print(len(embedLinks))
except Exception:
# handle error
passThe 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": {
"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"
}tipFor the meaning of each parameter in the response result above, please check the API Reference.