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

Querying Tasks and Details

Function

This API is used to query tasks (by default) and details.

Authorization Information

Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    gaussdbfornosql:task:list

    List

    instance *

    • g:ResourceTag/<tag-key>
    • g:EnterpriseProjectId

    nosql:task:list

    -

URI

GET /v3/{project_id}/jobs

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

id

No

String

Task ID.

start_time

No

String

Query start time in the "yyyy-mm-ddThh:mm:ssZ" format. The default value is 30 days before the current date.

T is the separator between calendar and hourly notation of time. Z indicates the time zone offset.

end_time

No

String

End time (the current time by default) in the "yyyy-mm-ddThh:mm:ssZ" format. It must be later than the start time and the time span cannot exceed 30 days.

T is the separator between calendar and hourly notation of time. Z indicates the time zone offset.

status

No

String

Task status. Running indicates a task is being executed. Completed indicates a task is complete. Failed indicates a task failed.

name

No

String

Task name.

  • CreateInstance: Create an instance.
  • RestoreNewInstance: Restore data to a new instance.
  • EnlargeInstance: Add nodes.
  • ReduceInstance: Delete nodes.
  • RestartInstance: Restart an instance.
  • RestartNode: Restart a node.
  • EnlargeInstanceVolume: Scale up storage space of an instance.
  • ReduceInstanceVolume: Scale in storage space of an instance.
  • ResizeInstance: Change the specifications of an instance.
  • UpgradeDbVersion: Upgrade the engine version.
  • BindPublicIP: Bind an EIP to an instance.
  • UnbindPublicIP: Unbind an EIP from an instance.
  • DeleteInstance: Delete an instance.
  • EnlargeInstanceColdVolume: Scale up cold storage of an instance.
  • AddInstanceColdVolume: Enable cold storage for an instance.
  • ModifySecurityGroup: Modify a security group.
  • ModifyCcmCert: Modify a CCM certificate.
  • ModifyPort: Change a port.
  • ConstructDisasterRecovery: Establish a DR relationship.
  • DeConstructDisasterRecovery: Remove a DR relationship.
  • SwitchOverDisasterRecovery: Switch a DR relationship.
  • BuildBiActiveInstance: Create an instance with a dual-active DR relationship.
  • ReleaseBiActiveInstance: Remove a dual-active relationship from an instance.
  • BackupInstance: Back up an instance.

offset

No

Integer

Index offset.

If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.

limit

No

Integer

Number of records to be queried. The value can be 10, 20, or 50. The default value is 50.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

jobs

Array of objects (Table 5)

Task list.

total_count

Integer

Total number of tasks in the task list.

Table 5 JobDetail

Parameter

Type

Description

id

String

Task ID.

name

String

Task name.

status

String

Task status. Running indicates a task is being executed. Completed indicates a task has been successfully executed. Failed indicates a task failed to be executed.

start_time

String

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. For example, in the Beijing time zone, the offset is +0800.

end_time

String

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. For example, in the Beijing time zone, the offset is +0800.

progress

String

Task execution progress.

NOTE:

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.

instance

Objects in Table 6

Details of the instance associated with the task.

fail_reason

String

Task failure information.

Table 6 JobInstanceInfo

Parameter

Type

Description

id

String

Instance ID.

name

String

Instance name.

Example Request

  • URI example
    GET https://{endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/jobs?id=89a0cde6-9c46-4b89-a92c-573e1083ff23

Example Response

Status code: 200

Success

{ 
  "total_count" : 1, 
  "jobs" : [ { 
    "id" : "6f85e061-04dd-42e7-86d6-d3b1e40aac2e", 
    "name" : "CreateCassandra", 
    "status" : "Running", 
    "start_time" : "2023-09-12T06:44:01+0000", 
    "end_time" : "2023-09-12T06:44:03+0000", 
    "progress" : "14%", 
    "instance" : { 
      "id" : "27a045b6bf9e46f691f81366d398cb04in06", 
      "name" : "nosql-12f5" 
    }, 
    "fail_reason" : "" 
  } ] 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.