All Products
Search
Document Center

Simple Log Service:get_begin_cursor

Last Updated:Jun 10, 2026

Retrieves the start cursor of a shard in a Logstore.

Request syntax

aliyunlog log get_begin_cursor --project_name=<value> --logstore_name=<value> --shard_id=<value> [--access-id=<value>] [--access-key=<value>] [--sts-token=<value>] [--region-endpoint=<value>] [--client-name=<value>] [--jmes-filter=<value>] [--format-output=<value>] [--decode-output=<value>]

Request parameters

The following table describes the required parameters.

Parameter

Type

Required

Example

Description

--project_name

String

Yes

aliyun-test-project

The name of the project.

--logstore_name

String

Yes

logstroe-a

The name of the Logstore.

--shard_id

String

Yes

0

The ID of the shard.

This command also supports Global parameters.

Examples

  • Request example

    Retrieve the start cursor of shard 0 in the logstore-a Logstore with the default account.

    aliyunlog log get_begin_cursor --project_name="aliyun-test-project" --logstore_name="logstore-a" --shard_id=0
  • Response example

    {"cursor": "MTYxNDc1MDAyNzM3MzIwNTcxNA=="}