Queries all shards of a specified Logstore.

Description

Host consists of a project name and a Log Service endpoint. You must specify a project in Host.

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 headers.

Request syntax

GET /logstores/{logstore}/shards HTTP/1.1

Request parameters

ParameterTypeLocationRequiredExampleDescription
logstoreStringPathYesali-test-logstore

The name of the Logstore.

Response parameters

ParameterTypeExampleDescription
Array of shard

The shards in the Logstore.

Examples

Sample requests

GET /logstores/ali-test-logstore/shards 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

[ {
  "shardID" : 0,
  "status" : "readwrite",
  "inclusiveBeginKey" : "00000000000000000000000000000000",
  "exclusiveEndKey" : "8000000000000000000000000000000",
  "serverIp" : "",
  "createTime" : 1453949705
} ]

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.

404

LogStoreNotExist

Logstore logstoreName does not exist.

The error message returned because the specified Logstore does not exist.

400

ShardNotExist

Shard ShardID does not exist.

The error message returned because the specified shard 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.