All Products
Search
Document Center

ActionTrail:GetTrailStatus

Last Updated:Oct 22, 2025

Queries the status of a trail.

This topic describes how to query the status of a sample trail named trail-test.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesGetTrailStatus

The operation that you want to perform. Set the value to GetTrailStatus.

NameStringYestrail-test

The name of the trail.

The name must be 6 to 36 characters in length. The name must start with a lowercase letter and can contain lowercase letters, digits, hyphens (-), and underscores (_).

Note The name must be unique within your Alibaba Cloud account.
IsOrganizationTrailBooleanNofalse

Specifies whether to query the status of a multi-account trail. Valid values:

  • true: Query the status of a multi-account trail.
  • false: Query the status of a single-account trail. It is the default value.

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeExampleDescription
RequestIdString8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C

The ID of the request.

StartLoggingTimeString2021-03-31T04:06:41Z

The time when logging was last enabled for the trail.

LatestDeliveryErrorStringwrite sls failed, exception: the parent of sub user must be project owner, itemscount: 1

The log of the last failed delivery.

StopLoggingTimeString2021-04-02T02:36:56Z

The time when logging was last disabled for the trail.

IsLoggingBooleanfalse

Indicates whether logging is enabled for the trail.

LatestDeliveryTimeString1547792223000

The most recent time when an event was delivered by the trail.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetTrailStatus
&Name=trail-test
&<Common request parameters>

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C",
  "StartLoggingTime" : "2021-03-31T04:06:41Z",
  "LatestDeliveryError" : "write sls failed, exception: the parent of sub user must be project owner, itemscount: 1",
  "StopLoggingTime" : "2021-04-02T02:36:56Z",
  "IsLogging" : false
}

Error codes

HTTP status codeError codeError messageDescription
404TrailNotFoundExceptionThe specified Trail does not exist.The error message returned because the specified trail does not exist.

For a list of error codes, visit the API Error Center.