Updated on 2026-03-12 GMT+08:00

Enabling a Scheduled Task

Function

This API is used to start a scheduled O&M task by ID.

URI

POST /v1/schedule/task/{task_id}/enable

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

task_id

Yes

String

Definition

ID of a scheduled task.

Constraints

An existing task that is disabled.

Range

A string of 26 characters starting with ST.

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

ticket_infos

No

Array of TicketInfo objects

Definition

For details about the configuration information related to change management, see Change Management.

Constraints

If service ticket authorization has been enabled for the current API in the change control module, this parameter is mandatory, that is, the corresponding privilege escalation information is provided.

Range

N/A

Default Value

N/A

Table 3 TicketInfo

Parameter

Mandatory

Type

Description

ticket_id

No

String

Definition

ID of the service ticket related to change management.

Constraints

Select the service ticket that takes effect currently.

Range

N/A

Default Value

N/A

ticket_type

No

String

Definition

Service ticket type

Constraints

N/A

Range

  • CHANGE: change ticket.

  • INCIDENT: incident ticket.

  • WARROOM: war room ticket.

Default Value

N/A

target_id

No

String

Definition

ID of the application associated with the service ticket.

Constraints

Select the application ID associated with the service ticket.

Range

N/A

Default Value

N/A

scope_id

No

String

Definition

Region ID.

Constraints

Select the region ID associated with the service ticket.

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

String

Definition

Interface response data.

Range

N/A

Status code: 400

Table 5 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

Enable a scheduled O&M task by task ID.

POST https://{Endpoint}/v1/schedule/task/ST****/enable

{
  "ticket_infos" : [ {
    "ticket_id" : "GOMSC****",
    "ticket_type" : "CHANGE",
    "target_id" : "string",
    "scope_id" : "cn-north-4"
  } ]
}

Example Responses

Status code: 200

Request result is returned.

{
  "data" : "ST****"
}

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.