Help Center/ Cloud Operations Center/ API Reference/ API/ Scheduled O&M/ Querying the List of Scheduled Tasks
Updated on 2025-10-24 GMT+08:00

Querying the List of Scheduled Tasks

Function

This API is used to query the scheduled O&M tasks based on specified conditions.

Authorization Information

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

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • 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

    coc:schedule:list

    List

    -

    g:EnterpriseProjectId

    -

    -

URI

GET /v1/schedule/task

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition

Enterprise project ID.

Constraints

Select a project ID that is available inEnterprise Management.

Range

N/A

Default Value

0

task_id

No

String

Definition

Task ID.

Constraints

Select the ID of an existing scheduled task.

Range

A string of 26 characters starting with ST.

Default Value

N/A

task_name

No

String

Definition

Task name.

Constraints

This parameter works together with task_id. Select an existing scheduled task name.

Range

N/A

Default Value

N/A

scheduled_type

No

String

Definition

Execution policy of a scheduled task.

Constraints

N/A

Range

  • PERIODIC: The task is executed periodically.

  • ONCE: The task is executed only once.

  • CRON: The task is executed in cron expression.

Default Value

N/A

task_type

No

String

Definition

Type of a scheduled task.

Constraints

N/A

Range

  • SCRIPT: script

  • RUNBOOK: job

Default Value

N/A

associated_task_type

No

String

Definition

Type of an associated task.

Constraints

N/A

Range

  • CUSTOMIZATION: custom script or job

  • COMMUNAL: public script or job

Default Value

N/A

risk_level

No

String

Definition

Risk level of a scheduled task.

Constraints

N/A

Range

  • HIGH

  • MEDIUM

  • LOW

Default Value

N/A

created_by

No

String

Definition

IAM user ID of the creator of a scheduled task.

Constraints

Select a user ID that is available inPersonnel Management.

Range

N/A

Default Value

N/A

reviewer

No

String

Definition

IAM user ID of the reviewer of a scheduled task.

Constraints

Select a user ID that is available inPersonnel Management.

Range

N/A

Default Value

N/A

reviewer_user_name

No

String

Definition

Reviewer nickname.

Constraints

Corresponds to reviewer.

Range

N/A

Default Value

N/A

approve_status

No

String

Definition

Review status of a scheduled task.

Constraints

N/A

Range

  • PASSED: normal

  • PENDING: to be approved

  • REJECTED: rejected

Default Value

N/A

last_execution_status

No

String

Definition

Latest execution status of a scheduled task.

Constraints

N/A

Range

The value can be READY, PROCESSING, ABNORMAL, PAUSED, CANCELED, and FINISHED.

Default Value

N/A

last_execution_start_time

No

Long

Definition

Start timestamp of the latest execution time of a scheduled task.

Constraints

N/A

Range

Milliseconds-level UTC timestamp.

Default Value

N/A

last_execution_end_time

No

Long

Definition

End timestamp of the latest execution time of a scheduled task.

Constraints

N/A

Range

Milliseconds-level UTC timestamp.

Default Value

N/A

marker

No

String

Definition

Used for pagination query.

Constraints

N/A

Range

ID of the last record in the previous query.

Default Value

N/A

region_id

No

String

Definition

Region.

Constraints

Select a region fromIAM.

Range

N/A

Default Value

N/A

resource_id

No

String

Definition

Resource ID.

Constraints

Only one resource can be queried.

Range

N/A

Default Value

This parameter is left blank by default.

offset

No

Integer

Definition

Offset pointers queried by page.

Constraints

N/A

Range

N/A

Default Value

N/A

limit

No

Integer

Definition

Number of queries, by page.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

count

Long

Definition

Total number of scheduled O&M tasks.

Range

N/A

next_maker

String

Definition

Next start point for pagination query.

Range

N/A

scheduled_tasks

Array of ScheduledTaskBasicInfo objects

Definition

Scheduled O&M tasks.

Range

For details, see the constraints on the value of ScheduledTaskBasicInfo.

Table 3 ScheduledTaskBasicInfo

Parameter

Type

Description

id

String

Definition

Task ID.

Range

A string of 26 characters starting with ST.

enterprise_project_id

String

Definition

Enterprise project ID.

Range

N/A

name

String

Definition

Task name.

Range

The value can contain 3 to 100 characters, including letters, digits, hyphens (-), and underscores (_).

scheduled_type

String

Definition

Execution policy of a scheduled task.

Range

  • PERIODIC: The task is executed periodically.

  • ONCE: The task is executed only once.

  • CRON: The task is executed in cron expression.

task_type

String

Definition

Type of the task referenced by a scheduled task.

Range

  • SCRIPT: script

  • RUNBOOK: job

associated_task_type

String

Definition

Attribute of the task referenced by a scheduled task.

Range

  • CUSTOMIZATION: custom script or job

  • COMMUNAL: public script or job

risk_level

String

Definition

Risk level of a scheduled task.

Range

  • HIGH

  • MEDIUM

  • LOW

created_by

String

Definition

IAM user ID of the creator of a scheduled task.

Range

N/A

update_by

String

Definition

Person who modifies the scheduled task.

Range

N/A

created_user_name

String

Definition

Nickname of the creator of a scheduled task.

Range

N/A

reviewer

String

Definition

IAM user ID of the reviewer of a scheduled task.

Range

N/A

reviewer_user_name

String

Definition

Nickname of the reviewer of a scheduled task.

Range

N/A

approve_status

Object

Definition

Review status of a scheduled task.

Range

  • PASSED: normal

  • PENDING: to be approved

  • REJECTED: rejected

last_execution_time

Long

Definition

Latest timestamp of scheduled task execution.

Range

N/A

last_execution_status

String

Definition

Latest execution status of a scheduled task.

Range

The value can be READY, PROCESSING, ABNORMAL, PAUSED, CANCELED, and FINISHED.

execution_count

Integer

Definition

Number of times that the task will be executed. The options are as follows:

Range

N/A

enabled

Boolean

Definition

Whether to enable a scheduled task.

Range

A boolean value.

created_time

Long

Definition

Timestamp of the scheduled task creation.

Range

N/A

modified_time

Long

Definition

Timestamp of scheduled task update.

Range

N/A

region_id

String

Definition

Region to which a scheduled task belongs.

Range

N/A

associated_task_name

String

Definition

Name of the script or job associated with the scheduled task.

Range

N/A

associated_task_name_en

String

Definition

Name of the script or job associated with the task.

Range

N/A

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Result code.

Range

N/A

error_msg

String

Definition

Error description.

Range

N/A

Example Requests

Query the first 10 scheduled tasks that are successfully executed only once.

GET https://{Endpoint}/v1/schedule/task?offset=0&limit=10&scheduled_type=ONCE&last_execution_status=FINISHED

Example Responses

Status code: 200

Request result is returned.

{
  "count" : 1,
  "next_maker" : "ST****",
  "scheduled_tasks" : [ {
    "approve_status" : "PASSED",
    "associated_task_name" : "test_scheduled_task",
    "associated_task_name_en" : "",
    "associated_task_type" : "CUSTOMIZATION",
    "created_by" : "****",
    "created_time" : 1745396111000,
    "created_user_name" : "****",
    "enabled" : true,
    "enterprise_project_id" : "0",
    "execution_count" : 1,
    "id" : "****",
    "last_execution_status" : "FINISHED",
    "last_execution_time" : 1745396135000,
    "modified_time" : 1745396111000,
    "name" : "****",
    "region_id" : "***",
    "risk_level" : "LOW",
    "scheduled_type" : "ONCE",
    "task_type" : "RUNBOOK",
    "update_by" : "****"
  } ]
}

Status Codes

Status Code

Description

200

Request result is returned.

400

The server failed to process the request is returned.

Error Codes

See Error Codes.