Retrieves the server time that corresponds to a cursor.
Operation description
Description
The host consists of a project name and a Simple Log Service endpoint. You must specify the project in the host.
Create and obtain an AccessKey pair. For more information, see AccessKey pair.
An AccessKey pair that belongs to an Alibaba Cloud account has access permissions on all API operations. Using this AccessKey pair poses a high security threat. For security, we recommend that you create and use a RAM user to call API operations or perform routine operations and maintenance (O&M). The RAM user must be granted the permissions to perform operations on Simple Log Service resources. For more information, see Create and authorize a RAM user.
Obtain the project name, the project's region, and the logstore name. For more information, see Manage a project and Manage a logstore.
Authorization
The following table describes the authorization information for this operation. Add this information to the Action element of a RAM policy to grant a RAM user or RAM role the permissions to call this API operation.
Action | Resource description in an authorization policy |
|
|
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
log:GetCursorOrData | get | *LogStore
|
| None |
Request syntax
GET /logstores/{logstore}/shards/{shardId}?type=cursor_time HTTP/1.1Path Parameters
Parameter | Type | Required | Description | Example |
logstore | string | Yes | The logstore name. | ali-test-logstore |
shardId | integer | Yes | The shard ID. | 0 |
Request parameters
Parameter | Type | Required | Description | Example |
project | string | Yes | The project name. | ali-test-project |
cursor | string | Yes | The cursor for which you want to obtain the timestamp. Call the GetCursor operation to obtain a cursor. Note If the value of the cursor is less than the begin cursor or greater than the end cursor, InvalidCursor is returned. If the shard contains no data, the current time is returned. | MTU0NzQ3MDY4MjM3NjUxMzQ0Ng== |
Response elements
Element | Type | Description | Example |
object | |||
cursor_time | string | The server time that corresponds to the cursor. The value is a UNIX timestamp. A UNIX timestamp represents the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC. | 1554260243 |
Examples
Success response
JSON format
{
"cursor_time": "1554260243"
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.