Updated on 2022-09-19 GMT+08:00

Creating an Instance Diagnosis Task

Function

This API is used to diagnose a specific DCS instance.

URI

POST /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.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

begin_time

Yes

String

Diagnosis start time, The time is a Unix timestamp and the unit is ms.

end_time

Yes

String

Diagnosis end time, The time is a Unix timestamp and the unit is ms.

node_ip_list

No

Array of strings

IP addresses of diagnosed nodes. By default, all nodes are diagnosed. Query methods for an instance:

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

report_id

String

Report ID.

Status code: 400

Table 4 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 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

Example Requests

POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/diagnosis

{
  "begin_time" : 1618466522486,
  "end_time" : 1618467122486,
  "node_ip_list" : [ "192.168.0.111" ]
}

Example Responses

Status code: 200

The diagnosis task is successfully delivered.

{
  "report_id" : "716c9cca-8ce2-4a89-b3db-7cee209d6379"
}

Status Codes

Status Code

Description

200

The diagnosis task is successfully delivered.

400

Invalid request.

500

Internal service error.

Error Codes

See Error Codes.