Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get End Offsets For Stream

GET/api/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/getEndOffsets
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Get the end offsets for all partitions of a stream. The end offset is the offset of the next record that will be written to the partition.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:streams-read.

Path parameters

datasetRid
string

The Resource Identifier (RID) of a Dataset.

streamBranchName
string

The name of a Branch.

Query parameters

viewRid
string
optional

If provided, this endpoint will only read from the stream corresponding to the specified view RID. If not provided, this endpoint will read from the latest stream on the branch.

Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.

preview
boolean
optional

Enables the use of preview functionality.

Response body

GetEndOffsetsResponse
map<PartitionId, long>

The end offsets for each partition of a stream.

Hide child attributes

Hide child attributes

PartitionId
string

The identifier for a partition of a Foundry stream.

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/highScale/streams/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/streams/master/getEndOffsets?viewRid=ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79&preview=true"

Response

Copied!
1 2 3 4 { "0": 100, "1": 200 }

Error responses

Error Name
GetEndOffsetsForStreamPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not getEndOffsets the Stream.
ParametersdatasetRid, streamBranchName