Adds a log directory to an application. This operation is applicable to applications that are deployed in Alibaba Cloud Elastic Compute Service (ECS) clusters and hybrid cloud ECS clusters.

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 headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/log/popListLogDirs HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
AppId String Yes 3616cdca-4f92-4413**********

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication.

Path String Yes /temp/log/

The absolute path of the log directory that you want to add. The value must start and end with / and must contain /log or /logs. The following directories are the default log directories in Enterprise Distributed Application Service (EDAS):

  • /home/admin/edas-container/logs/
  • /home/admin/taobao-tomcat-7.0.59/logs/
  • /home/admin/taobao-tomcat-production-7.0.59.3/logs/
  • /home/admin/taobao-tomcat-production-7.0.70/logs/
  • /home/admin/edas-agent/logs/

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String 3616cdca-4f92-4413**********

The ID of the request.

Examples

Sample requests

POST /pop/v5/log/popListLogDirs HTTP/1.1
Common request header
{
"AppId": "3616cdca-4f92-4413**********",
"Path": "/temp/log/"
}

Sample success responses

XML format

<Message>success</Message>
<RequestId>3616cdca-4f92-4413**********</RequestId>
<Code>200</Code>

JSON format

{
	"Message": "success",
	"RequestId": "3616cdca-4f92-4413**********",
	"Code": 200
}

Error codes

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