List all the configurations in a project. You can use the parameter to flip the page.

Example:

GET /configs? offset=1&size=100

Request syntax

GET /configs? offset=0&size=100 HTTP/1.1
Authorization: <AuthorizationString> 
Date: <GMT Date>
Host: <Project Endpoint>
x-log-apiversion: 0.6.0
x-log-signaturemethod: hmac-sha1

Request parameters

URL parameters

参数名称 Type Required Description
offset(optional) integer No The starting position of the returned records. The default value is 0.
size(optional) integer No The maximum number of entries returned on each page. The default value is 500 (maximum).
Request header

The ListConfig API does not have a special request header.  For more information about the public request headers of Log Service APIs, see Public request header.

Response header

The ListConfig API does not have a special response header.   For more information about the public response headers of Log Service APIs, see Public response header.

Response element
The response body contains a list of all configurations in a specific project. The specific formats are as follows.
Name Type Description
count  integer The number of returned configurations.
total  integer The total number of configurations in Log Service.
 integer  string array The name list of returned configurations.
Error code

Besides the  common error codes of Log Service APIs, the ListConfig API may return the following special error codes.

HTTP status code ErrorCode ErrorMessage
404 ConfigNotExist config {Configname} does not exist
500 InternalServerError internal server error

Example

Request example
GET /configs? offset=0&size=10 HTTP/1.1
Header :
{
    "Content-Length": 0, 
    "x-log-signaturemethod": "hmac-sha1", 
    "x-log-bodyrawsize": 0, 
    "User-Agent": "log-python-sdk-v-0.6.0", 
    "Host": "ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com", 
    "Date": "Mon, 09 Nov 2015 09:19:13 GMT", 
    "x-log-apiversion": "0.6.0", 
    "Authorization": "LOG 94to3z418yupi6ikawqqd370:teWnMylnM4Toohhp9dfBECrEgac="
}
响应示例:
Header :
{
    "content-length": "103", 
    "server": "nginx/1.6.1", 
    "connection": "close", 
    "date": "Mon, 09 Nov 2015 09:19:13 GMT", 
    "content-type": "application/json", 
    "x-log-requestid": "5640651199248CAA2300C2BA"
}
Body:
{
    "count": 3, 
    "configs": 
    [
        "logtail-config-sample", 
        "logtail-config-sample-2", 
        "logtail-config-sample-3"
    ], 
    "total": 3
}