Help Center/ GeminiDB/ API Reference/ API v3/ Task Management/ Querying Scheduled Tasks
Updated on 2026-09-22 GMT+08:00

Querying Scheduled Tasks

Function

This function is used to query scheduled tasks based on specified conditions.

Constraints

This API supports the following instances:

  • GeminiDB Influx
  • GeminiDB Redis
  • GeminiDB Mongo
  • GeminiDB Cassandra

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}/scheduled-jobs

Table 1 URI parameters

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 contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

job_name

No

String

Definition

Task name.

Constraints

N/A

Range

  • REBOOT: Restart an instance.
  • RESIZE_FLAVOR: Change vCPUs and memory of an instance.
  • UPGRADE_DATABASE: Install a patch.

Default Value

This parameter is left blank by default.

job_status

No

String

Definition

Task execution status.

Constraints

N/A

Range

  • Pending: The task is not executed.
  • Running: The task is in progress.
  • Completed: The task is successfully executed.
  • Failed: The task fails to be executed.
  • Canceled: The task is canceled.

Default Value

This parameter is left blank by default.

instance_id

No

String

Definition

Instance ID. To obtain the value, call the Querying Instances and Details API. If no instance is available, call the Creating an Instance API to create one.

Constraints

N/A

Range

N/A

Default Value

If this parameter is not specified, all instances that meet the search criteria are queried by default.

start_time

No

String

Definition

Start time of task creation.

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

If this parameter is not specified, the default value is seven days before the current time.

end_time

No

String

Definition

End time of task creation.

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

If this parameter is not specified, the current time is used by default.

offset

No

Integer

Definition

Index offset.

Constraints

N/A

Range

N/A

Default Value

The query starts from the next piece of data indexed by this parameter. The value is 0 by default.

limit

No

Integer

Definition

Number of records returned by a query.

Constraints

N/A

Range

1–100

Default Value

10

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token

You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Definition

Total number of records.

Range

N/A

schedules

Array of Table 5 objects

Definition

Task details.

Table 5 ScheduleDetailInfo

Parameter

Type

Description

job_id

String

Definition

Task ID.

Range

N/A

job_name

String

Definition

Task name.

Range

  • REBOOT: Restart an instance.
  • RESIZE_FLAVOR: Change vCPUs and memory of an instance.
  • UPGRADE_DATABASE: Install a patch.

job_status

String

Definition

Task execution status.

Range

  • Pending: The task is not executed.
  • Running: The task is in progress.
  • Completed: The task is successfully executed.
  • Failed: The task fails to be executed.
  • Canceled: The task is canceled.

instance_id

String

Definition

Instance ID.

Range

N/A

instance_name

String

Definition

Instance name.

Range

N/A

instance_status

String

Definition

Instance status.

Range

  • createfail: An instance failed to be created.
  • creating: An instance is being created.
  • normal: An instance is available.
  • abnormal: An instance is abnormal.
  • deleted: An instance has been deleted.

datastore_type

String

Definition

Database type.

Range

  • GeminiDB Mongo: GeminiDB Mongo API
  • GeminiDB Cassandra: GeminiDB Cassandra API
  • GeminiDB Redis: GeminiDB Redis API
  • GeminiDB Influx: GeminiDB Influx API
  • GeminiDB DynamoDB: GeminiDB DynamoDB-Compatible API
  • GeminiDB HBase: GeminiDB HBase API

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

Example Requests

Querying scheduled tasks based on specified conditions

GET https://{Endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/scheduled-jobs?offset=2&limit=2&start_time=2019-05-27T03:38:51+0000&job_status=Pending

Example Responses

Status code: 200

Success

{ 
  "schedules" : [ { 
    "job_id" : "56d3c1138dcf4f1da73b0170700c78d0", 
    "job_name" : "REBOOT", 
    "job_status" : "Pending", 
    "instance_id" : "8a6117ece8a0457a90060441fa372e8ein06", 
    "instance_name" : "gauss-nosql", 
    "instance_status" : "normal", 
    "datastore_type" : "GeminiDB Cassandra", 
    "create_time" : "2019-05-26T10:41:14+0000", 
    "start_time" : "2019-05-26T12:41:14+0000", 
    "end_time" : "2019-05-26T12:51:14+0000" 
  } ], 
  "total_count" : 1 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.