Updated on 2025-07-29 GMT+08:00

Obtaining Scheduled Tasks

Function

This API is used to obtain the scheduled tasks. Before calling this API:

URI

GET /v3/{project_id}/scheduled-jobs

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this 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

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

String

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be an integer and cannot be a negative number.

Range

≥ 0

Default Value

0

limit

No

String

Definition

Number of records to be queried.

Constraints

The value must be an integer and cannot be a negative number.

Range

1–100

Default Value

100

status

No

String

Definition

Task execution status.

Constraints

N/A

Range

  • Running: The task is being executed.

  • Completed: The task is successfully executed.

  • Failed: The task failed to be executed.

  • Pending: The task is not executed.

  • Unauthorized: The task is to be authorized.

  • Canceled: The task is canceled.

Default Value

N/A

start_time

No

String

Definition

Start time.

Constraints

The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Range

N/A

Default Value

N/A

end_time

No

String

Definition

End time.

Constraints

The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Range

N/A

Default Value

N/A

job_id

No

String

Definition

Task ID.

Constraints

N/A

Range

N/A

Default Value

N/A

job_name

No

String

Definition

Task scheduling type.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us

  • zh-cn

Default Value

en-us

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

schedules

Array of ScheduleTask objects

Definition

Task details.

total_count

Integer

Definition

Total number of records.

Range

N/A

Table 5 ScheduleTask

Parameter

Type

Description

job_id

String

Definition

Task ID.

Range

N/A

instance_id

String

Definition

Instance ID, which is compliant with the UUID format.

Range

The value contains 36 characters with a suffix of in07. Only letters and digits are allowed.

instance_name

String

Definition

Instance name.

Range

Instance name corresponding to the instance ID

instance_status

String

Definition

Instance status.

Range

  • createfail: An instance failed to be created.

  • creating: An instance is being created.

  • normal: An instance is normal.

  • abnormal: An instance is abnormal.

  • deleted: An instance has been deleted.

project_id

String

Definition

Project ID of a tenant in a region.

Range

ID of the project the instance belongs to.

job_name

String

Definition

Task name.

Range

  • CreateGaussDBforMySQLInstance: creating a DB instance

  • RestoreGaussDBforMySQLNewInstance: restoring data to a new DB instance

  • AddGaussDBforMySQLNodes: adding nodes

  • DeleteGaussDBforMySQLNode: deleting nodes

  • RebootGaussDBforMySQLInstance: rebooting a DB instance

  • ModifyGaussDBforMySQLPort: changing a database port

  • ModifyGaussDBforMySQLSecurityGroup: changing a security group

  • ResizeGaussDBforMySQLFlavor: changing instance specifications

  • SwitchoverGaussDBforMySQLMasterNode: promoting a read replica to primary

  • GaussDBforMySQLBindEIP: binding an EIP

  • GaussDBforMySQLUnbindEIP: unbinding an EIP

  • RenameGaussDBforMySQLInstance: changing a DB instance name

  • DeleteGaussDBforMySQLInstance: deleting a DB instance

  • UpgradeGaussDBforMySQLDatabaseVersion: upgrading an instance version

  • EnlargeGaussDBforMySQLProxy: adding nodes to a proxy instance

  • OpenGaussDBforMySQLProxy: enabling database proxy

  • CloseGaussDBforMySQLProxy: disabling database proxy

  • GaussdbforMySQLModifyProxyIp: changing a proxy address

  • ScaleGaussDBforMySQLProxy: changing the node specifications of a proxy instance

  • GaussDBforMySQLModifyInstanceMetricExtend: enabling or disabling Monitoring by Seconds

  • GaussDBforMySQLModifyInstanceDataVip: changing the private IP address

  • GaussDBforMySQLSwitchSSL: enabling or disabling SSL

  • GaussDBforMySQLModifyProxyConsist: changing the proxy consistency

  • GaussDBforMySQLModifyProxyWeight: changing the read weights of proxy nodes

create_time

String

Definition

Task creation time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Range

N/A

start_time

String

Definition

Task start time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Range

N/A

end_time

String

Definition

Task end time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Range

N/A

job_status

String

Definition

Task execution status.

Range

  • Pending: The task is delayed and is not executed.

  • Running: The task is being executed.

  • Completed: The task is successfully executed.

  • Failed: The task failed to be executed.

  • Unauthorized: The task is to be authorized.

  • Canceled: The task is canceled.

datastore_type

String

Definition

Database type.

Range

N/A

target_config

Object

Definition

Instance configuration information, such as specifications.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Obtaining scheduled tasks

GET https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/scheduled-jobs?offset=1&limit=10

Example Response

Status code: 200

Success.

{
  "schedules" : [ {
    "job_id" : "56d3c1138dcf4f1da73b0170700c78d0",
    "instance_id" : "79bc540dd4d6432784894a981fdfacfcin07",
    "instance_name" : "gauss-f821",
    "instance_status" : "BUILD",
    "project_id" : "053f533ead80d5102f0cc012e8d468a4",
    "job_name" : "UpgradeGaussDBforMySQLDatabaseVersion",
    "create_time" : "2018-08-06T10:41:14+0000",
    "start_time" : "2018-08-06T10:41:14+0000",
    "end_time" : "2018-08-06T10:41:14+0000",
    "job_status" : "Completed",
    "datastore_type" : "gaussdb-mysql",
    "target_config" : {
      "flavor" : "gaussdb.mysql.xlarge.arm.4",
      "mem" : "16",
      "cpu" : "4"
    }
  } ],
  "total_count" : 1
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.