Consumption Data

Last updated: 2020-05-21 14:20:29

    Feature Description

    This API is used to consume the read logs. It gets the log data on the corresponding topic partition based on cursor and count.

    Request

    Sample request

    GET /pulllogs?topic_id=xxxxxxxx-xxxx-xxxx-xxxx&partition_id=1&cursor=xxxxxxxxx&count=10 HTTP/1.1
    Host: <Region>.cls.tencentyun.com
    Authorization: <AuthorizationString>

    Request header

    There are only common request headers but no special request headers.

    Request parameters

    Parameter Name Type Location Required Description
    topic_id string query Yes Log topic ID
    partition_id int query Yes Consumed topic partition number
    cursor string query Yes Base64-encoded cursor value, which indicates to read data from the current position
    count int query Yes Number of LogGroup consumed at a time, which can be up to 1,000 (one LogGroup contains multiple logs. For the LogGroup definition, please see Uploading Structured Logs)

    Response

    Sample response

    HTTP/1.1 200 OK
    Content-Type: application/x-protobuf
    Content-Length: 23
    x-cls-cursor: xxxxxx
    x-cls-count: 10
    
    <Packaged content of `LogGroupList` in pb format>

    Response header

    Header Name Description
    x-cls-cursor Base64-encoded cursor value, which indicates to read data from the current position next time and is used for continued consumption
    x-cls-count Number of LogGroup returned in the current request (one LogGroup contains multiple logs. For the LogGroup definition, please see Uploading Structured Logs)

    Response parameters

    The packaged content of the LogGroupList object is returned. For the pb file description, please see Uploading Structured Logs.

    Error Codes

    For more information, please see Error Codes.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help