Create data dashboard¶
Create data dashboards and connect data sources.
POST https://api.moi.matrixorigin.cn/v5/data-dashboards
Preparation before calling¶
Prepare a personal access token and target workspace ID that has access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.
Request body¶
Replace caller-specific values in the example with actual values.
namestringRequired- Data dashboard name.
descriptionstring- Data dashboard description; omission saves an empty string.
sourcesarrayRequired- List of data sources.
sources[].table_idintegerRequired- Data source table ID.
Request example
curl -X POST "https://api.moi.matrixorigin.cn/v5/data-dashboards" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "销售概览",
"description": "按日查看销售数据",
"sources": [{"table_id": 1001}]
}'
Successful response¶
Creation succeeds with HTTP 200, code: "OK", and msg: "OK".
{
"code": "OK",
"msg": "OK",
"data": {
"ID": "0198ce73-3d20-7c12-9a11-1a2b3c4d5e6f",
"Name": "销售概览",
"Description": "按日查看销售数据",
"CreatedByRoleID": "role-001",
"CreatedAt": "2026-08-21T07:00:00Z",
"UpdatedAt": "2026-08-21T07:00:00Z"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
Data dashboard ID. |
|
string |
Data dashboard name. |
|
string |
Data dashboard description. |
|
string |
The role ID used when creating the data dashboard. |
|
string |
Creation time. |
|
string |
Update time. |
Error response¶
This example corresponds to HTTP 400.
codestring- Error code, such as ErrParamInvalid or ErrDataDashboardNotFound.
msgstring- HTTP status text, such as Bad Request or Not Found.
{
"code": "ErrParamInvalid",
"msg": "Bad Request"
}
Follow-up operations¶
Record data.ID, then create chart.