All Products
Search
Document Center

Platform For AI:Use ActionTrail to query behavior events

Last Updated:Apr 01, 2026

Platform for AI (PAI) is integrated with ActionTrail, which records operations performed in your Alibaba Cloud account. By default, ActionTrail retains PAI event logs for 90 days. To store events beyond 90 days, create a trail to deliver them to Simple Log Service (SLS) or Object Storage Service (OSS) for long-term storage and analysis.

For the full list of PAI operations that ActionTrail records, see API Reference.

Query options

ActionTrail provides two ways to query PAI events:

MethodBest forRequirement
Basic queryQuick lookups within the last 90 daysNone — use the ActionTrail console directly
Advanced queryFiltering by service, event name, or read/write type; SQL-based queriesA trail that delivers events to SLS

Basic query

ActionTrail stores operation events for each Alibaba Cloud account for the last 90 days. Query these events directly in the ActionTrail console without any additional setup. For details, see Query events in the ActionTrail console.

Advanced query

Advanced query supports two modes: simple query mode for visual filtering, and SQL query mode for custom SQL conditions. Both modes require a trail that delivers events to SLS.

Before you begin

Make sure you have:

Run an advanced query

  1. Log on to the ActionTrail console.

  2. In the navigation pane, choose Events > Advanced Event Query.

  3. On the Default tab of the Custom Template page, configure your query conditions using simple query mode or SQL query mode.

  4. Click Run. The Raw Logs tab displays the event logs that match your conditions.

  5. In the event list, click View Event Details in the Actions column to view the basic information and event record for that event.

Simple query mode

In the upper-right corner of the page, turn on Simple Mode, then configure the following parameters:

image
ParameterDescription
Service NameSelect Platform for AI (PAI).
RegionSelect the region to query. Example: China (Hangzhou).
Event NameSelect the event to query. Example: StopJob.
Read/Write TypeSelect Write(Write) or Read(Read).

SQL query mode

If simple query mode does not meet your needs, switch to SQL query mode. Turn off Simple Mode — the conditions you configured in simple query mode are automatically converted into an SQL statement, which you can then customize.

image

For SQL syntax and sample queries, see SQL statements in advanced event queries.

What's next