You can call this operation to query events in a deployment environment.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request headers

This operation uses common request headers, instead of special request headers. For more information, see the "Common request headers" section in "Common request and response headers."

Request syntax

GET /pop/v1/wam/event HTTP/1.1

Request parameters

Parameter Type Required? Example Description
EnvId String Yes we-5d1dac8e08350d1dd94*****

The ID of the deployment environment in which you want to query events.

ChangeId String No wc-d2eeaaa1405481bdd8cb92c*****

The ID of the change.

EndTime Long No 1562225909800

The end of the time range where events are queried.

LastChangeEvents Boolean No true

Specifies whether to query the last change event.

PageNumber Integer No 10

The number of the page to return.

PageSize Integer No 1

The number of entries to return on each page.

ReverseByTimestamp Boolean No true

Specifies whether to sort the events in the returned list by timestamp in reverse chronological order.

StartTime Long No 1562225800000

The beginning of the time range where events are queried.

Response parameters

Parameter Type Example Description
Code String OK

The response code. The value is OK if the request is successful.

Events

The list of the events queried.

AppId String wa-5d1d9d8c85c7f86e2ef*****

The ID of the application.

EnvId String we-5d1dac8e08350d1dd94*****

The ID of the deployment environment.

EnventName String envName

The name of the event.

EventId String we-5d39b8ba6786bd4b149*****

The ID of the event.

EventLevel String INFO

The level of the event.

EventMessage String Change wc-5d39b8bc6786bd4b149***** finish successfully, taking 108 seconds<

The message of the event.

EventTimestamp Long 1564064041112

The timestamp of the event.

MsgCode String webx.wam.change.vpc.create.success

The message code of the event.

MsgParams we-5d1dac8e08350d1dd94*****

The message parameters of the event.

ObjectAttrs

The list of object attributes.

AttributeName String ""

The name of the attribute.

AttributeValue String ""

The value of the attribute.

ObjectId String vpc-wz9e6y22o3o91nuy*****

The ID of the object.

ObjectName String we*****-default-vpc

The name of the object.

ObjectType String vpc

The type of the object.

PrimaryUserId String 1036052989950239

The ID of the primary user.

PrimaryUserName String ""

The name of the primary user.

SecondUserId String ""

The ID of the secondary user.

SecondUserName String ""

The name of the secondary user.

TraceId String wc-5d1dac8f08350d1dd94*****

The trace ID of the event.

Message String success

The response message. The value is success if the request is successful.

PageNumber Integer 1

The number of the page returned.

PageSize Integer 10

The number of entries returned on each page.

RequestId String F975CCFF-CA3D-41C2-8004-362D232*****

The ID of the request.

TotalCount Integer 1

The total number of entries returned.

Examples

Sample request


http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/event?ServiceCode=webx&PageSize=1&PageNumber=10&EnvId=we-5d1dac8e08350d1dd94*****&<Common request parameters>

Sample success response

XML format

<DescribeEventsResponse>
    <PageNumber>10</PageNumber>
    <TotalCount>56</TotalCount>
    <Message>success</Message>
    <PageSize>1</PageSize>
    <RequestId>706D234F-37E4-4105-B226-92CA15D*****</RequestId>
    <Events>
        <Event>
            <AppId>wa-5d1af9c802470221ab7*****</AppId>
            <EventId>f0229b5a-79d2-4412-b039-f07fc96*****</EventId>
            <MsgCode>webx.wam.change.apply.success</MsgCode>
            <ObjectAttrs></ObjectAttrs>
            <EventLevel>INFO</EventLevel>
            <ObjectType>change</ObjectType>
            <EventMessage>Change wc-5d39b8bc6786bd4b149***** finish successfully, taking 108 seconds</EventMessage>
            <EnvId>we-5d39b8ba6786bd4b149*****</EnvId>
            <EventTimestamp>1564064041112</EventTimestamp>
            <PrimaryUserId>10360529899*****</PrimaryUserId>
            <MsgParams>
                <MsgParam>wc-5d39b8bc6786bd4b149*****</MsgParam>
                <MsgParam>108</MsgParam>
            </MsgParams>
            <TraceId>wc-5d39b8bc6786bd4b149*****</TraceId>
            <ObjectName></ObjectName>
            <ObjectId>wc-5d39b8bc6786bd4b149*****</ObjectId>
        </Event>
    </Events>
    <Code>OK</Code>
</DescribeEventsResponse>

JSON format

{
	"PageNumber":10,
	"TotalCount":56,
	"Message":"success",
	"PageSize":1,
	"RequestId":"232F3429-F58D-4A7A-9309-17C7F41*****",
	"Events":{
		"Event":[
			{
				"AppId":"wa-5d1af9c802470221ab7*****",
				"EventId":"f0229b5a-79d2-4412-b039-f07fc96*****",
				"MsgCode":"webx.wam.change.apply.success",
				"ObjectAttrs":{
					"ObjectAttr":[]
				},
				"EventLevel":"INFO",
				"ObjectType":"change",
				"EnvId":"we-5d39b8ba6786bd4b149*****",
				"EventMessage":"Change wc-5d39b8bc6786bd4b149***** finish successfully, taking 108 seconds",
				"EventTimestamp":1564064041112,
				"PrimaryUserId":"10360529899*****",
				"MsgParams":{
					"MsgParam":[
						"wc-5d39b8bc6786bd4b149*****",
						"108"
					]
				},
				"TraceId":"wc-5d39b8bc6786bd4b149*****",
				"ObjectName":"",
				"ObjectId":"wc-5d39b8bc6786bd4b149*****"
			}
		]
	},
	"Code":"OK"
}

Error codes

HTTP status code Error code Error message Description
403 ResourceAuthFailed The specified resource does not exist or it does not belong to this Alibaba Cloud account. The error message returned because the specified resource does not exist or it does not belong to your Alibaba Cloud account.

For more information about error codes, see API Error Center.