Updated on 2023-12-13 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

instance_id

Yes

String

Instance ID.

project_id

Yes

String

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records displayed on each page. The minimum value is 1. The maximum value is 1000. If this parameter is not specified, 10 records are displayed on each page by default.

offset

No

Integer

Offset, which is the position where the query starts. The value must be greater than or equal to 0.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

diagnosis_report_list

Array of DiagnosisReportInfo objects

Diagnosis reports.

total_num

Integer

Total number of diagnosis reports.

Table 4 DiagnosisReportInfo

Parameter

Type

Description

report_id

String

Diagnosis report ID.

status

String

Diagnosis task status.

Enumeration values:

  • diagnosing

  • finished

begin_time

String

Start time of a diagnosis period. The format is 2017-03-31T12:24:46.297Z.

end_time

String

End time of a diagnosis period. The format is 2017-03-31T12:24:46.297Z.

created_at

String

Time when the diagnosis report is created.

node_num

Integer

Number of diagnosed nodes.

abnormal_item_sum

Integer

Total number of abnormal diagnosis items.

failed_item_sum

Integer

Total number of failed diagnosis items.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

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

Maximum: 1024

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

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

Maximum: 1024

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.