Updated on 2025-02-25 GMT+08:00

Updating a Dashboard

Function

This API is used to update dashboards.

URI

POST /v1/{project_id}/dashboards/update

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Workspace-Id

Yes

String

Workspace ID. For how to obtain it, see Obtaining a Workspace ID.

X-Auth-Token

Yes

String

User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Dashboard ID.

name

Yes

String

Dashboard name.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

Dashboard ID.

name

String

Dashboard name.

create_user_name

String

Creator.

create_date

Long

Creation timestamp.

update_user_name

String

User who performs the update.

update_date

Long

Update timestamp.

status

Integer

Dashboard status. The options include:

  • 0: not published.
  • 1: published.
  • 2: taken offline.

Enumerated values:

  • 0
  • 1
  • 2

Example Request

Update a dashboard.

https://{endpoint}/v1/{project_id}/dashboards/update
{
  "id" : "009b3d3e-xxxx-4cc3-xxxx-dc54cd42424d",
  "name": "Update Dashboard"
}

Example Response

Status code: 200

The dashboard is successfully updated.

{
  "id" : "009b3d3e-xxxx-4cc3-xxxx-dc54cd42424d",
  "name": "Update Dashboard",
  "create_user_name" : "xxxx",
  "create_date" : 1706062051243,
  "update_user_name" : "xxxx",
  "update_date" : 1706062051243,
  "status" : 0
}

Status Codes

Status Code

Description

200

The dashboard is successfully updated.

Error Codes

See Error Codes.