All Products
Search
Document Center

EventBridge:EventCenterQueryEvents

Last Updated:Sep 15, 2025

Queries events from the event center.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eventbridge:EventCenterQueryEvents

get

*EventBus

acs:eventbridge:{#regionId}:{#accountId}:eventbus/{#eventbus}

None None

Request parameters

Parameter

Type

Required

Description

Example

BusName

string

No

The name of the event bus.

default

NextToken

string

No

The token to retrieve the next page of results.

100

MaxResults

integer

No

The maximum number of results to return. Valid values: 0 to 10000. Default value: 100.

100

Body

object

Yes

The body parameters.

SchemaId

string

Yes

The schema ID.

ecs:GeneralSchema

QueryType

string

Yes

The query type. Valid values:

  • timeseries: Queries time series data.

  • table: Queries table data.

  • timeseries_and_table: Queries both time series data and table data.

timeseries_and_table

Parameters

object

Yes

The query parameters.

Breakdowns

array

No

The dimension (column name) to split the dataset.

string

No

The column name to use as a dimension for splitting.

source

Calculations

array

No

The calculation to perform on a specified column.

object

No

Op

string

No

The operator.

COUNT_DISTINCT

Column

string

No

The column name.

source

Filters

array

No

The filter conditions.

array<object>

No

Column

string

No

The column name.

source

Op

string

No

The operator.

=

Values

array

No

The values to use with the operator.

string

No

If the value is a string, enclose it in single quotation marks (').

'acs.ecs'

NestedFilterCombination

string

No

AND

NestedFilters

array

No

object

No

Column

string

No

Op

string

No

Values

array

No

string

No

FilterCombination

string

No

The logical operator for combining filter conditions.

AND

Granularity

integer

No

The time granularity, which is the minimum time unit for querying time series data. Unit: seconds. The minimum value is 1. This is a suggested value. The actual granularity depends on the returned value.

30

Orders

array

No

The sorting method for the query results. This parameter is valid only when QueryType is set to table.

object

No

Op

string

No

The operator.

AVG

Column

string

No

The column name.

source

Desc

boolean

No

Specifies whether to sort the results in descending order.

true

Offset

integer

No

The starting position of the query. The count starts from 0.

0

Limit

integer

No

The maximum number of events to query. Valid values: 1 to 10000.

100

TimeRange

integer

No

The time range. Unit: milliseconds. The minimum value is 1000.

1000000

StartTime

integer

No

The start timestamp for the event query. Unit: milliseconds.

1687860901814

EndTime

integer

No

The end timestamp for the event query. Unit: milliseconds.

1687861201814

Response elements

Element

Type

Description

Example

object

The response.

Message

string

Specified parameter Limit is not valid.

RequestId

string

5DAF96FB-A4B6-548C-B999-XXXXXXXX

Data

object

NextToken

string

100

MaxResults

integer

100

TotalCount

integer

76

TimeSeries

array<object>

object

RowData

object

{ "id":"xxx", "source":"acs.ecs" }

Time

string

1683561600000

Table

array<object>

object

RowData

object

{ "id":"xxx", "source":"acs.ecs" }

Code

string

Success

Success

boolean

true

Examples

Success response

JSON format

{
  "Message": "Specified parameter Limit is not valid.",
  "RequestId": "5DAF96FB-A4B6-548C-B999-XXXXXXXX",
  "Data": {
    "NextToken": "100",
    "MaxResults": 100,
    "TotalCount": 76,
    "TimeSeries": [
      {
        "RowData": {
          "id": "xxx",
          "source": "acs.ecs"
        },
        "Time": "1683561600000"
      }
    ],
    "Table": [
      {
        "RowData": {
          "id": "xxx",
          "source": "acs.ecs"
        }
      }
    ]
  },
  "Code": "Success",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.