Updated on 2025-11-17 GMT+08:00

Listing Instance Diagnosis Tasks

Function

This API is used to query the list of diagnosis tasks of a specific DCS instance.

URI

GET /v2/{project_id}/instances/{instance_id}/diagnosis

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID. It can be viewed on the instance details page on the DCS console.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition

Offset, which indicates that the generated list is displayed from this offset. For example, if the offset is 3, the generated list is displayed from the fourth record.

Constraints

N/A

Range

≥ 0

Default Value

0

limit

No

Integer

Definition

Number of records displayed on each page.

Constraints

N/A

Range

1–1000

Default Value

10

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

diagnosis_report_list

Array of DiagnosisReportInfo objects

Definition

Diagnosis report list.

total_num

Integer

Definition

Total number of diagnosis reports.

Range

N/A

Table 4 DiagnosisReportInfo

Parameter

Type

Description

report_id

String

Definition

Diagnosis report ID.

Range

N/A

status

String

Definition

Diagnosis task status.

Range

  • diagnosing

  • finished

begin_time

String

Definition

Start time of a diagnosis period. For example, 2017-03-31T12:24:46.297Z.

Range

N/A

end_time

String

Definition

End time of a diagnosis period. For example, 2017-03-31T12:24:46.297Z.

Range

N/A

created_at

String

Definition

Time when the diagnosis report is created.

Range

N/A

node_num

Integer

Definition

Number of diagnosed nodes.

Range

N/A

abnormal_item_sum

Integer

Definition

Total number of abnormal diagnosis items.

Range

N/A

failed_item_sum

Integer

Definition

Total number of failed diagnosis items.

Range

N/A

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

Error information.

Range

N/A

error_code

String

Definition

Error code.

Range

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is set to null.

Range

N/A

Example Requests

None

Example Responses

Status code: 200

Instance diagnosis reports listed successfully.

{
  "diagnosis_report_list" : [ {
    "report_id" : "fb98e37a-3cd9-4c7a-96b1-d878266019e2",
    "status" : "finished",
    "begin_time" : "2021-04-15T06:02:00.000Z",
    "end_time" : "2021-04-15T06:12:00.000Z",
    "created_at" : "2021-04-15T06:12:06.641Z",
    "abnormal_item_sum" : 2,
    "failed_item_sum" : 0,
    "node_num" : 2
  } ],
  "total_num" : 1
}

Status Codes

Status Code

Description

200

Instance diagnosis reports listed successfully.

400

Invalid request.

500

Internal service error.

Error Codes

See Error Codes.