Querying Dashboards
Function
This API is used to query dashboards.
Constraints
This API is not supported in the following regions: CN East-Qingdao, LA-Mexico City1, TR-Istanbul, AP-Jakarta, ME-Riyadh, and AP-Manila.
URI
GET /v2/{project_id}/dashboards
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. It is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID. Constraints N/A Range 1 to 64 characters Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_id | No | String | Definition Enterprise project ID. Constraints N/A Range The value allows 36 characters. It can only contain lowercase letters, digits, hyphens (-), and underscores (_). You can customize an enterprise project ID. The value can also be 0 (default enterprise project ID) or all_granted_eps (all enterprise project IDs). Default Value N/A |
| is_favorite | No | Boolean | Definition Whether a dashboard in an enterprise project is added to favorites. Constraints If this parameter is specified, enterprise_id is mandatory. Range
Default Value N/A |
| dashboard_name | No | String | Definition Dashboard name. Constraints N/A Range The value allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). Default Value N/A |
| dashboard_id | No | String | Definition Dashboard ID. Constraints N/A Range The value starts with db and is followed by 22 characters of letters, digits, or a combination of both. The total length is 24 characters. Default Value N/A |
| dashboard_type | No | String | Definition Dashboard type. Constraints N/A Range
Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | Definition User token. Constraints: None Value range: The value can contain 1 to 16,384 characters. Default value: None |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| dashboards | Array of DashBoardInfo objects | Description Dashboard list. |
| Parameter | Type | Description |
|---|---|---|
| dashboard_id | String | Description Dashboard ID. Range The value starts with db and is followed by 22 characters of letters, digits, or a combination of both. The total length is 24 characters. |
| dashboard_name | String | Definition Custom dashboard name. Range The value allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). |
| enterprise_id | String | Definition Enterprise project ID. Range The value allows 36 characters. It can only contain lowercase letters, digits, hyphens (-), and underscores (_). You can customize an enterprise project ID. It can also be 0 (default enterprise project ID). |
| creator_name | String | Definition Name of the user who created the dashboard. Range The value allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). |
| create_time | Long | Definition Dashboard creation time. Range 1111111111111 to 9999999999999 |
| widgets_num | Integer | Definition Total number of graphs on the dashboard. Range 0 to 50 |
| namespace | String | Definition Namespace of a service. For details about the namespace of each service, see Namespaces. Range The value is in the service.item format. The values of service and item must be a string, starting with a letter and containing only digits (0–9), letters (case-insensitive), and underscores (_). The value must contain 3 to 32 characters. |
| sub_product | String | Definition Sub-product ID. Range [1,128] |
| dashboard_template_id | String | Definition Dashboard template ID. Range The value starts with mb and is followed by 22 characters of letters, digits, or a combination of both. The total length is 24 characters. |
| row_widget_num | Integer | Definition Number of graphs per row. Range
|
| is_favorite | Boolean | Definition Whether a dashboard is added to favorites. Range
|
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Status codes customized by each cloud service when a request error occurs. |
| error_msg | String | Request error message. |
| request_id | String | Request ID. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Status codes customized by each cloud service when a request error occurs. |
| error_msg | String | Request error message. |
| request_id | String | Request ID. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Status codes customized by each cloud service when a request error occurs. |
| error_msg | String | Request error message. |
| request_id | String | Request ID. |
Example Requests
None
Example Responses
Status code: 200
OK
{
"dashboards" : [ {
"dashboard_id" : "dbxxxxxxxxxxxxxxxxxxxxxx",
"dashboard_name" : "dashboard_name",
"enterprise_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"creator_name" : "creator_name",
"create_time" : 1111111111111,
"row_widget_num" : 3,
"is_favorite" : false
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | The server failed to process the request. |
| 401 | Token authentication is required. |
| 500 | Failed to complete the request because of an internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.