Queries the logging configurations of an application.

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 common request headers. For more information, see Common request parameters and common response parameters.

Request syntax

GET /pop/v1/sam/log/listLogConfigs HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
AppId String Query Yes 56f77b65-788d-442a-9885-7f20d91f****

The ID of the application.

PageSize Integer Query Yes 10

The number of entries to return on each page. Valid values: 1 to 10000.

CurrentPage Integer Query Yes 1

The number of the page to return.

Response parameters

Parameter Type Example Description
RequestId String 91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

The ID of the request.

Message String success

The returned message.

  • success is returned when the request succeeds.
  • An error code is returned when the request fails.
TraceId String ac1d5e2c15671581252413581d****

The ID of the trace. It can be used to query the details of a request.

Data Object

The logging configurations.

LogConfigs Array of LogConfig

The details of logging configurations.

ConfigName String sae-1f240907a6faf58c653f09e81b7e****

The name of the Log Service configuration.

LogDir String /root/logs/hsf/hsf.log

The path of logs.

SlsLogStore String sae-1f240907a6faf58c653f09e81b7e****

The name of the Logstore in Log Service.

CreateTime String 2019-08-29 17:18:00

The time when the configuration was created.

StoreType String sls

The storage type of logs.

SlsProject String sae-56f77b65-788d-442a-9885-7f20d91f****

The ID of the Log Service project.

LogType String file_log

The type of the log. Set this value to file_log.

RegionId String cn-beijing

The ID of the region.

CurrentPage Integer 1

The number of the returned page.

TotalSize Integer 1

The total number of returned entries.

PageSize Integer 10

The number of entries returned on each page.

ErrorCode String This parameter is left empty.

The error code.

  • The ErrorCode parameter is not returned when the request succeeds.
  • The ErrorCode parameter is returned when the request fails. For more information, see Error codes in this topic.
Code String 200

The HTTP status code. Valid values:

  • 2xx: indicates that the request was successful.
  • 3xx: indicates that the request was redirected.
  • 4xx: indicates that the request was invalid.
  • 5xx: indicates that a server error occurred.
Success Boolean true

Indicates whether the logging configurations of an application were obtained. Valid values:

  • true: indicates that the configurations were obtained.
  • false: indicates that the configurations could not be obtained.

Examples

Sample requests

GET /pop/v1/sam/log/listLogConfigs?AppId=56f77b65-788d-442a-9885-7f20d91f****&PageSize=10&CurrentPage=1 HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json

Sample success responses

XML format

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

<ListLogConfigsResponse>
    <RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
    <Message>success</Message>
    <TraceId>ac1d5e2c15671581252413581d****</TraceId>
    <Data>
        <LogConfigs>
            <ConfigName>sae-1f240907a6faf58c653f09e81b7e****</ConfigName>
            <LogDir>/root/logs/hsf/hsf.log</LogDir>
            <SlsLogStore>sae-1f240907a6faf58c653f09e81b7e****</SlsLogStore>
            <CreateTime>2019-08-29 17:18:00</CreateTime>
            <StoreType>sls</StoreType>
            <SlsProject>sae-56f77b65-788d-442a-9885-7f20d91f****</SlsProject>
            <LogType>file_log</LogType>
            <RegionId>cn-beijing</RegionId>
        </LogConfigs>
        <CurrentPage>1</CurrentPage>
        <TotalSize>1</TotalSize>
        <PageSize>10</PageSize>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</ListLogConfigsResponse>

JSON format

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

{
  "RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message" : "success",
  "TraceId" : "ac1d5e2c15671581252413581d****",
  "Data" : {
    "LogConfigs" : [ {
      "ConfigName" : "sae-1f240907a6faf58c653f09e81b7e****",
      "LogDir" : "/root/logs/hsf/hsf.log",
      "SlsLogStore" : "sae-1f240907a6faf58c653f09e81b7e****",
      "CreateTime" : "2019-08-29 17:18:00",
      "StoreType" : "sls",
      "SlsProject" : "sae-56f77b65-788d-442a-9885-7f20d91f****",
      "LogType" : "file_log",
      "RegionId" : "cn-beijing"
    } ],
    "CurrentPage" : 1,
    "TotalSize" : 1,
    "PageSize" : 10
  },
  "Code" : "200",
  "Success" : true
}

Error codes

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