Updated on 2024-01-15 GMT+08:00

Query instance creation task information

Function

This API is used to query instance creation task information.

URI

GET /v1/{project_id}/dbss/audit/jobs/{resource_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

resource_id

Yes

String

Resource ID (DBSS instances ID, the instance ID is not in the basic information.)

This parameter can be obtained through the interface : GET /v1/{project_id}/dbss/audit/instances

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

jobs

Array of JobBean objects

job list

Table 4 JobBean

Parameter

Type

Description

job_id

String

Task ID, which is used for asynchronous query.

status

String

Status.[SUCCESS,RUNNING,FAIL,INIT,READY]

job_type

String

Job type.This field is not used

server_id

String

VM ID

server_name

String

VM name

begin_time

Long

Task Start time.Displayed with a 13-digit timestamp

end_time

Long

Task End time. Displayed with a 13-digit timestamp

charge_mode

String

Billing mode.[Period,Demand]

error_code

String

Error code(If the creation is successful, the returned value is null.)

fail_reason

String

Failure cause(If the creation is successful, the returned value is null.)

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 6 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 8 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 10 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Example Requests

/v1/{project_id}/dbss/audit/jobs/{resource_id}

Example Responses

Status code: 200

Success

{
  "jobs" : [ {
    "status" : "SUCCESS",
    "job_type" : null,
    "job_id" : "8abf9647852a1daa01852e517e1a1a0b",
    "begin_time" : 1671519371000,
    "end_time" : 1671519417000,
    "error_code" : null,
    "fail_reason" : null,
    "charge_mode" : "Demand",
    "server_name" : "DBSS-qct-1220",
    "server_id" : "0aa8f621-bc19-4822-b66d-7ab9ae3c8693"
  } ]
}

Status code: 400

Failure

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status code: 500

Internal server error.

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status Codes

Status Code

Description

200

Success

400

Failure

403

Authentication failed.

500

Internal server error.

Error Codes

See Error Codes.