You can call this operation to collect logs of specified ECS instances in a deployment environment.


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

POST /pop/v1/wam/appEnv/gatherLog HTTP/1.1

Request parameters

Parameter Type Required? Example Description
EnvId String Yes wa-5d1af9c802470221ab7*****

The ID of the deployment environment in which you want to collect logs of specified ECS instances.

LogPath String No /home/admin/app/webplus-app.log

The path to the logs to be collected.

TargetInstances String No ["i-wz94zz7mx8kt5kz*****"]

The ID list of the ECS instances of which you want to collect logs.

Response parameters

Parameter Type Example Description
Code String OK

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


The information about the change.

ChangeId String wc-5d41015c56fd7c14ac9*****

The ID of the change.

EnvId String we-5d3eaaea2977ca5251e*****

The ID of the deployment environment.

StartTime String 1564541276614

The start time of the change.

Message String success

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

RequestId String 41CF0D98-CAD7-43CB-8BF0-CFA4D3F*****

The ID of the request.


Sample request<Common request parameters>
  "EnvId": "wa-5d1af9c802470221ab7*****",

Sample success response

XML format


JSON format


Error codes

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