Delete dashboard chart¶
Delete the chart in the specified data dashboard. This operation is irreversible.
DELETE https://moi.matrixorigin.cn/newmoi/data-dashboards/{dashboard_id}/charts/{chart_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.$CHART_ID:chart_idto use, specifying the target resource through the request path.
Call example¶
curl -X DELETE "https://moi.matrixorigin.cn/newmoi/data-dashboards/$DASHBOARD_ID/charts/$CHART_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
Data dashboard ID. |
|
string |
Yes |
Chart ID. |
Successful response¶
When the deletion is successful, the data.deleted in the response is true.
{
"code": 0,
"data": {"deleted": true}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
boolean |
Whether it has been deleted. |
Error response¶
codeinteger or string- Error code or status.
messagestring- Error message.
Error response example
{
"code": 3,
"message": "not found",
"details": {
"domain": "moi-core.catalog.data_dashboard",
"reason": "DATA_DASHBOARD_NOT_FOUND"
}
}