Querying a Checkpoint
Function
This API is used to query a checkpoint.
When querying a checkpoint, you need to specify the stream name, partition ID, and application name.
URI
Request
- Example request
GET https://{ip}{endpoint}/v2/{project_id}/checkpoints?stream_name=stream_name_test&partition_id=0&app_name=app_name&checkpoint_type=LAST_READ - Parameter description
Table 1 Parameter description Parameter
Mandatory
Type
Description
stream_name
Yes
String
Name of the stream created on the management console.
A stream name is 1 to 64 characters long. Only letters, digits, hyphens (-), and underscores (_) are allowed.
partition_id
Yes
String
Unique identifier of the partition.
app_name
Yes
String
Unique ID of the consumer application.
An application name is 1 to 50 characters long. Only letters, digits, hyphens (-), and underscores (_) are allowed.
checkpoint_type
Yes
String
Type of the checkpoint.
The checkpoint type LAST_READ indicates that only sequence numbers are recorded into the database.
Response
- Example response
{ "sequence_number": "10", "metadata": "metadata" } - Parameter description
Table 2 Response parameter description Parameter
Type
Description
sequence_number
String
Unique sequence number. Each data record has a sequence number that is unique within its partition.
metadata
String
Metadata of the consumer application.
If the checkpoint does not exist or expires, the value of sequence_number is -1 and the value of metadata is empty.
Status Code
- Normal
- Failed
For more information, see Error Codes.
Last Article: Adding a Checkpoint
Next Article: Deleting a Checkpoint
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.