Lists all Logstores in a specified project.
Request syntax
GET /logstores HTTP/1.1
Authorization: <AuthorizationString>
Date: <GMT Date>
Host: <Project Endpoint>
x-log-apiversion: 0.6.0
x-log-signaturemethod: hmac-sha1
Request parameters
- Request headers
The ListLogstore operation does not have operation-specific request headers. For information about the common request headers of Log Service API operations, see Common request headers.
- Parameters
Parameter Type Required Example Description offset int No None. The start position of the entries to return. Default value: 0. size int No None. The maximum number of entries to return on each page. Maximum value: 500. Default value: 500. ProjectName string Yes test-project The name of the project to which the Logstores belong. Partial matching is supported.
Response parameters
- Response headers
The ListLogstore operation does not have operation-specific response headers. For information about the common response headers of Log Service API operations, see Common response headers.
- Response elements
If the request succeeds, the HTTP status code 200 is returned. The response body contains a list of all Logstores in the specified project. The following table describes the parameters of the response body.
Parameter Type Example Description count int 1 The number of returned Logstores. total int 1 The total number of Logstores. logstores array test-logstore The name list of the returned Logstores.
Examples
- Sample requests
GET /logstores HTTP/1.1 Header: { x-log-apiversion=0.6.0, Authorization=LOG <yourAccessKeyId>:<yourSignature>, Host=ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com, Date=Wed, 11 Nov 2015 08:09:39 GMT, Content-Length=0, x-log-signaturemethod=hmac-sha1, User-Agent=sls-java-sdk-v-0.6.0, Content-Type=application/json }
- Sample success responses
HTTP/1.1 200 OK Header: { Date=Wed, 11 Nov 2015 08:09:39 GMT, Content-Length=52, x-log-requestid=5642F7C399248C8D7B01342F, Connection=close, Content-Type=application/json, Server=nginx/1.6.1 } Body: { "count":1, "logstores":["test-logstore"], "total":1 }
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | ProjectNotExist | Project {ProjectName} does not exist. | The error message returned because the specified project does not exist. |
500 | InternalServerError | Specified Server Error Message. | The error message returned because an internal server error has occurred. |
400 | ParameterInvalid | Invalid parameter size, (0.6.0]. | The error message returned because a parameter value is invalid. |
400 | InvalidLogStoreQuery | logstore Query is invalid. | The error message returned because the query is invalid. |
For more information about the error codes, see Common error codes.