View dashboard chart result

Read the latest results from the chart. You can use at to read the latest snapshot before the specified time point.

HTTP
GET $CLOUDSIGMA_API_BASE/data-dashboards/{dashboard_id}/charts/{chart_id}/result

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.

Request parameters

Replace $DASHBOARD_ID, $CHART_ID, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.

Shell
curl -X GET "$CLOUDSIGMA_API_BASE/data-dashboards/$DASHBOARD_ID/charts/$CHART_ID/result" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Parameter

Type

Required

Description

dashboard_id

string

Yes

Data dashboard ID.

chart_id

string

Yes

Chart ID.

Query parameters

Parameter

Type

Required

Description

at

string

No

RFC 3339 point in time.

at Select snapshots based on result completion time. The result is no later than the specified moment and no earlier than the starting point of the current snapshot. The service can retrieve at most 20 pages, 100 items per page, and the upper limit of the retrieval time is 5 seconds, so the snapshot at the specified time may not be found.

When at is more than 1 minutes later than the current time on the server, HTTP 400 is returned. The configuration update time is different from the results completion time.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "execution_id": "exec-001",
    "status": "completed",
    "mode": "live",
    "result": {
      "query_id": "",
      "db_name": "",
      "statement_id": "",
      "status": "",
      "total": 1
    }
  }
}

Field

Type

Description

data.execution_id

string

Chart run ID.

data.status

string

Run or result status.

data.error

string

error message.

data.mode

string

Result selection mode.

data.requested_at

string

Request time. RFC 3339 time.

data.refreshed_at

string

Refresh time. RFC 3339 time.

data.result

object or null

Query results. Returned on success.

data.result.query_id

string

Query ID.

data.result.db_name

string

Database name.

data.result.statement_id

string

Unique identifier for an IAM policy statement.

data.result.status

string

status.

data.result.err_msg

string

error message.

data.result.offset

integer

The offset of this query.

data.result.limit

integer

The maximum number of queries for this time.

data.result.total

integer

The number of records that match the current query conditions.

data.result.columns

array of object

Column definition.

data.result.columns[].name

string

Name.

data.result.columns[].type

string

type.

data.result.result

array

results.

data.result.rows_affected

integer

Number of rows affected.

data.result.empty_set

object or null

Whether it is an empty collection.

data.result.empty_set.msg

string

Description of results.

Error response

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