Run dashboard chart¶
Requests to run the specified chart. Acceptance of a request does not mean chart results have been generated.
POST $CLOUDSIGMA_API_BASE/data-dashboards/{dashboard_id}/charts/{chart_id}/run
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare personal access token and target workspace ID that can access the target workspace. Get the kanban ID from Query data kanban list. Get the chart ID from Query data dashboard details.
The chart must be in state ready and from a valid source. The current identity and role must be consistent with the scheduling identity saved in the chart, and must have corresponding data permissions.
Request parameters¶
Replace $DASHBOARD_ID, $CHART_ID, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/data-dashboards/$DASHBOARD_ID/charts/$CHART_ID/run" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Before execution, the server re-reads the configuration and checks the SQL. A single execution does not exceed 300 seconds, and a maximum of 10000 rows are returned.
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Data dashboard ID. |
|
string |
Yes |
Chart ID. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"chart_id": "chart-001",
"execution_id": "exec-001",
"status": "submitted"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Chart ID. |
|
string |
Chart run ID. |
|
string |
Running status. |
|
string |
error message. |
Error response¶
Truncation of results or failure to handle alarms after saving the results may cause the refresh to fail.
The following example corresponds to HTTP 400.
{
"code": "ErrParamInvalid",
"msg": "Bad Request"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code, such as |
|
string |
HTTP status description, such as |
When the scheduling or refresh service is unavailable, HTTP 503 is returned, and the error structure is changed to the integer code (503) and the string message (localized error message).