curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/streams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
"<unknown>"
]
}
'{
"items": [
{
"externalId": "test1",
"createdTime": 1730204346000,
"createdFromTemplate": "ImmutableTestStream",
"type": "Immutable",
"settings": {
"lifecycle": {
"retainedAfterSoftDelete": "P42D",
"dataDeletedAfter": "P1Y"
},
"limits": {
"maxRecordsTotal": {
"provisioned": 1000,
"consumed": 999
},
"maxGigaBytesTotal": {
"provisioned": 1000,
"consumed": 999
},
"maxFilteringInterval": "P1Y"
}
}
}
]
}Required capabilities:
StreamsAcl:CREATE
Create a new stream. A stream is a target for high volume data ingestion, with data shaped by the Data Modeling concepts. Specify an external ID and a stream template for each stream. The template defines the stream’s mutability, limits, and lifecycle.
curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/streams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
"<unknown>"
]
}
'{
"items": [
{
"externalId": "test1",
"createdTime": 1730204346000,
"createdFromTemplate": "ImmutableTestStream",
"type": "Immutable",
"settings": {
"lifecycle": {
"retainedAfterSoftDelete": "P42D",
"dataDeletedAfter": "P1Y"
},
"limits": {
"maxRecordsTotal": {
"provisioned": 1000,
"consumed": 999
},
"maxGigaBytesTotal": {
"provisioned": 1000,
"consumed": 999
},
"maxFilteringInterval": "P1Y"
}
}
}
]
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Stream to create.
List of streams.
Stream created.
Stream response.
List of streams.
Show child attributes
Was this page helpful?