GET /cursor?topic_id=xxxxxxxx-xxxx-xxxx-xxxx&partition_id=1&from=end HTTP/1.1Host: <Region>.cls.tencentyun.comAuthorization: <AuthorizationString>
Parameter Name | Type | Location | Required | Description |
topic_id | string | query | Yes | Log topic ID |
partition_id | int | query | Yes | Topic partition number |
from | string | query | Yes | from is used to identify the start time of real-time consumption, which supports three types: 1. "UNIX timestamp (seconds)", which indicates to consume the logs starting at the specified UNIX time 2. "start", which indicates to consume logs starting at the start time of the topic partition lifecycle 3. "end", which indicates to consume logs starting at the end time of the topic partition lifecycle (current time) |
from can be used to locate the starting position of real-time consumption in the topic partition. If the lifecycle of the topic partition is [start_time, end_time), then:from (UNIX timestamp) ≤ start_time or from = "start", the time point returned by the API will be the cursor position corresponding to start_time.from (UNIX timestamp) ≥ end_time or from = "end", the API will return the next cursor position to be written at the current time point (there is no data at this cursor position currently).from (UNIX timestamp) > start_time and from (UNIX timestamp) < end_time, the API will return the cursor position corresponding to the first data packet received by the server at a time after or at from (UNIX timestamp).HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 23{"cursor": "MTQ0NzI5OTYwNjg5NjYzMjM1Ng=="}
Field Name | Type | Required | Description |
cursor | string | Yes | Returned cursor value |
Feedback