Run dashboard chart

Requests to run the specified chart. Acceptance of a request does not mean chart results have been generated.

HTTP
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.

Shell
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

dashboard_id

string

Yes

Data dashboard ID.

chart_id

string

Yes

Chart ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "chart_id": "chart-001",
    "execution_id": "exec-001",
    "status": "submitted"
  }
}

Field

Type

Description

data.chart_id

string

Chart ID.

data.execution_id

string

Chart run ID.

data.status

string

Running status.

data.error

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.

JSON
{
  "code": "ErrParamInvalid",
  "msg": "Bad Request"
}

Field

Type

Description

code

string

Error code, such as ErrParamInvalid or ErrDataDashboardNotFound.

msg

string

HTTP status description, such as Bad Request or Not Found.

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).

Last updated on