Update data dashboard

Updates the name, description, and data source of the specified data dashboard.

HTTP
PATCH $CLOUDSIGMA_API_BASE/data-dashboards/{dashboard_id}

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. First select the data dashboard to be updated in Query Data Kanban List.

Prepare personal access token and target workspace ID that can access the target workspace.

Request body

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

Shell
curl -X PATCH "$CLOUDSIGMA_API_BASE/data-dashboards/$DASHBOARD_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "销售概览",
  "description": "更新后的说明",
  "sources": [
    {
      "table_id": 1001
    }
  ]
}'

Parameter

Type

Required

Description

dashboard_id

string

Yes

Data dashboard ID.

Request body

Field

Type

Required

Description

name

string

Yes

Data dashboard name. Cannot be empty.

description

string

No

Data dashboard description. Saves as an empty string when omitted.

sources

array of object

Yes

List of data sources. At least 1 items.

sources[].table_id

integer

When the object is provided

Table ID. Not less than 1.

sources Fill in the valid positive int64 table ID. After service deduplication, check the permissions item by item in the table. Kanban permissions are not a substitute for actual SQL permissions.

The complete name and sources still need to be submitted when updating. sources will be replaced as a whole, and omitting description will clear the description. If the ownership registration fails after creation, the kanban board may have been created. Please check and confirm first.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "updated": true
  }
}

Field

Type

Description

data.updated

boolean

Has it been updated? Fixed to true.

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.

The data source is still referenced by the chart

Deleting a data source that is still referenced by the chart returns HTTP 409, using the following separate error structure.

Field

Type

Description

code

integer

This conflict is 4.

message

string

Localized error messages.

details.reason

string

DATA_DASHBOARD_SOURCE_IN_USE。

details.domain

string

moi-core.catalog.data_dashboard。

details.request_id

string

Request ID. Returns if not empty.

details.tables

array of object

The datasheet is still referenced.

details.tables[].table_id

integer

Table ID.

details.tables[].database_name

string

Database name.

details.tables[].table_name

string

Table name.

details.tables[].charts

array of object

A chart that references this table.

details.tables[].charts[].id

string

Chart ID.

details.tables[].charts[].name

string

Chart name.

Last updated on