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.
Creates a new branch on the backing streaming dataset, and creates a new stream on that branch.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:streams-write.
objectobjectThe Foundry schema for this stream.
integerThe 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.
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
stringThe name of a Branch.
booleanWhether or not compression is enabled for the stream. Defaults to false.
objectThe created Stream
stringThe name of a Branch.
objectThe Foundry schema for this stream.
stringThe view that this stream corresponds to.
integerThe 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.
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
booleanWhether or not compression is enabled for the stream. Defaults to false.
1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/json" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/streams/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/streams?preview=true" \
-d '{"partitionsCount":1,"streamType":"LOW_LATENCY","branchName":"master","compressed":false}'1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"schema": {
"fields": [
{
"name": "timestamp",
"schema": {
"nullable": false,
"dataType": {
"type": "timestamp"
}
}
},
{
"name": "value",
"schema": {
"nullable": false,
"dataType": {
"type": "string"
}
}
}
],
"keyFieldNames": [
"timestamp"
]
},
"partitionsCount": 1,
"streamType": "LOW_LATENCY",
"branchName": "master",
"viewRid": "ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79",
"compressed": false
}| Error Name | ||
|---|---|---|
Branch | Error Code | CONFLICT |
| Status Code | 409 | |
| Description | The branch cannot be created because a branch with that name already exists. | |
| Parameters | datasetRid, branchName | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The schema failed validations | |
| Parameters | errorType, message | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The field schema failed validations | |
| Parameters | fieldName, message | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The stream type is invalid. | |
| Parameters | streamType | |
Create | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not create the Stream. | |
| Parameters | datasetRid, streamBranchName | |
See Errors for a general overview of errors in the platform.