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 a batch of records from a stream for a given partition. Offsets are ordered from [0, inf) but may be sparse (e.g.: 0, 2, 3, 5). Binary field values are returned as base64-encoded strings. Decode them to retrieve the original bytes.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:streams-read.
stringThe Resource Identifier (RID) of a Dataset.
stringThe name of a Branch.
stringIf 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.
stringThe ID of the partition to retrieve records from.
stringThe inclusive beginning of the range to be retrieved. Leave empty when reading from the beginning of the partition.
integerThe total number of records to be retrieved. The response may contain fewer records than requested depending on number of records in the partition and server-defined limits.
booleanEnables the use of preview functionality.
list<RecordWithOffset>A list of records from a stream with their offsets.
objectA record retrieved from a stream, including its offset within the partition.
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/getRecords?viewRid=ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79&partitionId=0&limit=100&preview=true"1
2
3
4
5
6
7
8
9
[
{
"offset": 42,
"value": {
"timestamp": 1731426022784,
"value": "Hello, World!"
}
}
]| Error Name | ||
|---|---|---|
Get | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not getRecords the Stream. | |
| Parameters | datasetRid, streamBranchName | |
See Errors for a general overview of errors in the platform.