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

Obtaining Task Information

Function

This API is used to obtain information about a task with a specified ID. Before calling this API:

URI

GET /v3/{project_id}/jobs?id={id}

Table 1 Request Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

id

String

Yes

Definition

Task ID. This parameter value indicates the asynchronous task ID returned by APIs (except APIs for applying a parameter template and creating a manual backup).

Constraints

None

Range

UUID format

Default Value

N/A

Request Parameters

None

Response Parameters

Table 2 Parameter description

Parameter

Type

Description

job

Object

Definition

Task information. For details, see Table 3.

Table 3 job field data structure description

Parameter

Type

Description

id

String

Definition

Task ID.

Range

UUID format

name

String

Definition

Task name.

Range

N/A

status

String

Definition

Task execution status

Range
  • Running: The task is being executed.
  • Completed: The task is successfully executed.
  • Failed: The task fails to be executed.

created

String

Definition

Creation time in the yyyy-mm-ddThh:mm:ssZ format.

T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. Example: 2021-07-12T09:22:04+0800.

Range

N/A

ended

String

Definition

End time in the yyyy-mm-ddThh:mm:ssZ format.

T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. Example: 2021-07-12T09:22:04+0800.

Range

N/A

progress

String

Definition

Task execution progress.

The execution progress (such as "60%", indicating the task execution progress is 60%) is displayed only when the task is being executed. Otherwise, "" is returned.

Range

N/A

instance

Object

Definition

Instance on which the task is executed.

For details, see Table 4.

fail_reason

String

Definition

Task failure information.

Range

N/A

Table 4 instance field data structure description

Parameter

Type

Description

id

String

Definition

Instance ID, which uniquely identifies an instance.

Range

The value can contain 32 characters. Only letters and digits are allowed.

name

String

Definition

DB instance name.

Range

The value must start with a letter and can contain 4 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

Example Request

Obtaining information about a task with a specified ID

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/jobs?id=5cbb8a90-2253-4cff-8a13-49aa8f31dfb5

Example Response

Information queried.

{ 
  "job" : { 
    "id" : "5cbb8a90-2253-4cff-8a13-49aa8f31dfb5", 
    "name" : "CreateGaussDBV5Instance", 
    "status" : "Completed", 
    "created" : "2021-07-12T09:22:04+0800", 
    "ended" : "2021-07-12T10:10:13+0800", 
    "progress" : "", 
    "instance" : { 
      "id" : "b34f8c791f2643578510c093aa2351a8in14", 
      "name" : "gauss-c1a3" 
    }, 
    "fail_reason" : null 
  } 
}

Status Codes

Error Codes

For details, see Error Codes.