View dashboard chart result¶
Read the latest results of the chart; the latest snapshot before the specified time point can be read through at.
GET https://moi.matrixorigin.cn/newmoi/data-dashboards/{dashboard_id}/charts/{chart_id}/result
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 GET "https://moi.matrixorigin.cn/newmoi/data-dashboards/$DASHBOARD_ID/charts/$CHART_ID/result?at=$AT" \
-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. |
Query parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
RFC 3339 time point. |
Successful response¶
When the request is successful, the data of this operation is returned. Just because the write or run request has been accepted does not mean that the subsequent processing has been completed; please confirm the result based on the return status or subsequent query.
{
"code": 200,
"data": {"execution_id": "exec-001", "status": "completed", "mode": "live", "result": {"total": 1}}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
Chart run ID. |
|
string |
Run or result status. |
|
string |
Result selection mode. |
|
object |
Query result; returned when successful. |
Error response¶
codeinteger or string- Error code or status.
messagestring- Error message.
Error response example
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}