Help Center/ TaurusDB/ API Reference/ APIs/ Event Management/ Performing Operations on Events
Updated on 2026-08-31 GMT+08:00

Performing Operations on Events

Function

This API is used to perform operations on events, such as authorizing immediate execution, canceling execution, or authorizing scheduled execution. Before calling this API:

Calling Method

For details, see Calling APIs.

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 identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    gaussdbformysql:event:operateScheduleEvents

    Permission_management

    -

    -

    gaussdb:event:operateScheduleEvents

    -

URI

POST /v3/{project_id}/schedule-events

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

Request Parameters

Table 2 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: English

  • zh-cn: Chinese

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

operation_type

Yes

String

Definition

Event operation type.

Constraints

N/A

Range

  • execute: immediate execution

  • cancel: execution cancellation

  • reservation: scheduled execution

Default Value

N/A

event_instances

Yes

Array of EventInstances objects

Definition

Event information.

Constraints

A maximum of 20 events are allowed in a batch.

event_schedule_window

No

Object

Definition

Event execution window.

Constraints

This parameter is mandatory when operation_type is set to reservation.

Table 4 EventInstances

Parameter

Mandatory

Type

Description

event_id

Yes

String

Definition

Event ID.

To obtain this value, see Obtaining the Event List.

Constraints

N/A

Range

The value contains 36 characters, starting with a UUID and ending with ev07. Only letters and digits are allowed.

Default Value

N/A

Table 5 EventScheduleWindow

Parameter

Mandatory

Type

Description

planned_day

Yes

String

Definition

Execution date.

Constraints

The value is in yyyy-mm-dd format.

Range

The value must be later than or equal to the current date.

Default Value

N/A

start_time

No

String

Definition

Start time of the event execution window.

Constraints

The value is in hh:mm format. This parameter is mandatory when end_time is specified.

Range

N/A

Default Value

01:00

end_time

No

String

Definition

End time of the event execution window.

Constraints

The value is in hh:mm format. This parameter is mandatory when start_time is specified.

Range

N/A

Default Value

03:00

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

results

Array of EventJobResult objects

Definition

Response result of setting the event execution policy.

Table 7 EventJobResult

Parameter

Type

Description

event_id

String

Definition

Event ID.

Range

The value contains 36 characters, starting with a UUID and ending with ev07. Only letters and digits are allowed.

instance_id

String

Definition

Instance ID.

Range

The value contains 36 characters, starting with a UUID and ending with in07. Only letters and digits are allowed.

job_id

String

Definition

ID of the event operation task.

Range

N/A

success

Boolean

Definition

Whether the task is successfully delivered.

Range

  • true: The task is successfully delivered.

  • false: The task failed to be delivered.

error_code

String

Definition

Error code.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

  • Executing an event

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/schedule-events
    
    {
      "operation_type" : "execute",
      "event_instances" : [ {
        "event_id" : "18855d0aa0c14685998e727a70d2760cev07"
      } ]
    }
  • Canceling an event

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/schedule-events
    
    {
      "operation_type" : "cancel",
      "event_instances" : [ {
        "event_id" : "18855d0aa0c14685998e727a70d2760cev07"
      } ]
    }
  • Scheduling event execution

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/schedule-events
    
    {
      "operation_type" : "reservation",
      "event_instances" : [ {
        "event_id" : "18855d0aa0c14685998e727a70d2760cev07"
      } ],
      "event_schedule_window" : {
        "planned_day" : "2025-12-17",
        "start_time" : "01:00",
        "end_time" : "02:00"
      }
    }

Example Response

Status code: 200

Success.

{
  "results" : [ {
    "event_id" : "18855d0aa0c14685998e727a70d2760cev07",
    "instance_id" : "5437da4b09c9450d9a4b87432bbf1336in07",
    "job_id" : "2f092208-43b4-467f-b317-11001e5667ea",
    "success" : true,
    "error_code" : null,
    "error_msg" : null
  } ]
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.