Search documentation
karat

+

K

User Documentation ↗

Publish Records To Stream

POST/api/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords
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.

Publish a batch of records to the stream. The records will be validated against the stream's schema, and the batch will be rejected if one or more of the records are invalid.

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

Path parameters

datasetRid
string

The Resource Identifier (RID) of a Dataset.

streamBranchName
string

The name of a Branch.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

PublishRecordsToStreamRequest
object
Hide child attributes

Hide child attributes

records
list<Record>
optional

The records to publish to the stream

Show child attributes

Show child attributes

viewRid
string
optional

If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to 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.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/highScale/streams/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/streams/master/publishRecords?preview=true" \ -d '{"records":[{"timestamp":1731426022784,"value":"Hello, World!"}],"viewRid":"ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79"}'