• Data Ingestion Service

dis
  1. Help Center
  2. Data Ingestion Service
  3. API Reference
  4. API Description
  5. Querying a Checkpoint

Querying a Checkpoint

Function

This API is used to query a checkpoint.

URL

  • URL format

    GET /v2/{project_id}/checkpoints{?stream_name,partition_id,app_name,checkpoint_type}

  • Parameter description

    None

Request

  • Example request
    GET https://{ip}{endpoint}:{port}/v2/6352bba7aaab443aa1d9943efc586a68/checkpoints?stream_name=stream_name_test&partition_id=0&app_name=app_name&checkpoint_type=LAST_READ
    
    Request Header: 
    Content-Type: application/json 
    X-Sdk-Date: 20180820T024248Z 
    Authorization: SDK-HMAC-SHA256 Credential=QRUP2R3QFNAOVAWMYHZW/20180820/eu-de/test/sdk_request,  
    SignedHeaders=host;x-sdk-date, 
    Signature=9d8b56b055c0e1f7a9498d881a7cb726be91b4f0cde1773b0b1557e987a480ce
  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    stream_name

    Yes

    String

    Name of the stream created on the console.

    A stream name is 1 to 64 characters long. Only letters, digits, hyphens (-), and underscores (_) are allowed.

    partition_id

    Yes

    String

    Unique ID 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.

    NOTE:

    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

    200 OK

  • Failed

    For more information, see Error Codes.