Queries all Logstores or Logstores that match specified conditions in a specified project.
Description
Host consists of a project name and a Log Service endpoint. You must specify a project in Host.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request syntax
GET /logstores HTTP/1.1
Request parameters
Parameter | Type | Location | Required | Example | Description |
---|---|---|---|---|---|
offset | Integer | Query | No | 0 | The line from which the query starts. Default value: 0. |
size | Integer | Query | No | 10 | The number of entries to return on each page. Maximum value: 500. Default value: 500. |
logstoreName | String | Query | No | my-logstore | The name of the Logstore. Fuzzy match is supported. For example, if you enter test, all Logstores whose name contains test are returned. |
telemetryType | String | Query | No | None | The type of the log data that you want to query. Valid values:
|
mode | String | Query | No | standard | The type of the Logstore. Log Service provides two types of Logstores: standard Logstores and query Logstores. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Server | String | nginx | The name of the server. |
Content-Type | String | application/json | The content type of the response body. |
Content-Length | String | 0 | The length of the response body. |
Connection | String | close | Indicates whether the connection is persistent. Valid values:
|
Date | String | Sun, 27 May 2018 08:25:04 GMT | The time at which the response is returned. |
x-log-requestid | String | 5B0A6B60BB6EE39764D458B5 | The unique ID of the request. The ID is generated by Log Service. |
total | Integer | 2 | The number of the Logstores that meet the query conditions. |
logstores | Array of String | test-1,test-2 | The Logstore information. |
Examples
Sample requests
GET /logstores?offset=0&size=10&logstoreName=my-logstore&telemetryType=None&mode=standard HTTP/1.1
Host:ali-test-project.cn-hangzhou.log.aliyuncs.com
Content-Type:application/json
Sample success responses
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"total" : 2,
"logstores" : [ "test-1,test-2" ]
}
Error codes
For a list of error codes, visit the API Error Center.
HTTP status code |
Error code |
Error message |
Description |
---|---|---|---|
404 |
ProjectNotExist |
Project 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. |
For more information, see Common error codes.