Search documentation
karat

+

K

User Documentation ↗

Reset Stream

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

Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations to be applied.

To change the stream settings without clearing the records, update the stream settings in-platform.

This will create a new stream view (as seen by the change of the viewRid on the branch), which will be the new stream view that will be written to for the branch.

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

ResetStreamRequest
object
Hide child attributes

Hide child attributes

schema
object
optional

The Foundry schema to apply to the new stream.

If omitted, the schema of the existing stream on the branch will be used.

Show child attributes

Show child attributes

partitionsCount
integer
optional

The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended.

If omitted, the partitions count of the existing stream on the branch will be used.

streamType
string (enum)
optional

A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY.

If omitted, the stream type of the existing stream on the branch will be used.

Enum values: LOW_LATENCY, HIGH_THROUGHPUT

compressed
boolean
optional

Whether or not compression is enabled for the stream.

If omitted, the compression setting of the existing stream on the branch will be used.

Response body

Stream
object
Hide child attributes

Hide child attributes

branchName
string

The name of a Branch.

schema
object

The Foundry schema for this stream.

Show child attributes

Show child attributes

viewRid
string

The view that this stream corresponds to.

partitionsCount
integer

The number of partitions for the Foundry stream. Defaults to 1.

Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended.

streamType
string (enum)

A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY.

Enum values: LOW_LATENCY, HIGH_THROUGHPUT

compressed
boolean

Whether or not compression is enabled for the stream. Defaults to false.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/streams/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/streams/master/reset?preview=true" \ -d '{"partitionsCount":1,"streamType":"LOW_LATENCY","compressed":false}'

Response

Copied!
1 2 3 4 5 6 7 { "partitionsCount": 1, "streamType": "LOW_LATENCY", "branchName": "master", "viewRid": "ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79", "compressed": false }