Update data dashboard¶
Update the name, description, and data source of the specified data dashboard.
PATCH https://moi.matrixorigin.cn/newmoi/data-dashboards/{dashboard_id}
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.$DASHBOARD_ID:dashboard_idto use, specifying the target resource via the request path.
Request body¶
Replace caller-specific values in the example with actual values.
namestringRequired- Data dashboard name.
descriptionstringRequired- Data dashboard description.
sourcesarrayRequired- List of data sources.
sources[].table_idintegerRequired- Data source table ID.
Request example
curl -X PATCH "https://moi.matrixorigin.cn/newmoi/data-dashboards/$DASHBOARD_ID" \
-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¶
When the update is successful, the data.updated in the response is true.
{
"code": 0,
"data": {"updated": true}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
boolean |
Whether it has been updated. |
Error response¶
codeinteger or string- Error code or status.
messagestring- Error message.
Error response example
{
"code": 2,
"message": "invalid argument",
"details": {
"domain": "moi-core.catalog.data_dashboard",
"reason": "DATA_DASHBOARD_INVALID_REQUEST"
}
}
Last updated on