Queries the parameters of a specified Logstore.

Request syntax

GET /logstores/{logstoreName} 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 GetLogstore 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
    logstoreName string Yes test-logstore The name of the Logstore. The name must be unique in a project.

Response parameters

  • Response headers

    The GetLogstore 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 returns. The response body contains the detailed information of the specified Logstore. The following table describes the parameters of the response body.
    Parameter Type Example Description
    logstoreName string test-logstore The name of the Logstore. The name must be unique in a project.
    ttl integer 1 The retention period of data. Unit: days. Valid values: 1 to 3600.
    shardCount integer 2 The number of shards. Valid values: 1 to 100.
    createTime int 1447833064 The time when the Logstore was created.
    lastModifyTime int 1447833064 The time when the Logstore was last modified.

Examples

  • Sample requests
    GET /logstores/test-logstore 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 07:53:29 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 07:53:30 GMT,
    Content-Length=107,
    x-log-requestid=5642F3FA99248C817B01352D,
    Connection=close,
    Content-Type=application/json,
    Server=nginx/1.6.1
    }
    Body :
    {
        "logstoreName": test-logstore,
        "ttl": 1,
        "shardCount": 2,
        "createTime": 1447833064,
        "lastModifyTime": 1447833064
    }

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.
404 LogstoreNotExist logstore {logstoreName} does not exist. The error message returned because the specified Logstore does not exist.
500 InternalServerError Specified Server Error Message. The error message returned because an internal server error has occurred.

For more information about the error codes, see Common error codes.