SymetryML Documentation
Streams

Create stream

Attach a new `kafka` or `nats` Data Source to a project and immediately start a background consumer task for it. This both creates the DS entry and starts consuming in one call — there is no separate "create, then start" step for a brand-new stream (use [Start stream](/docs/api-reference/streams/projects-project-streams-dsname-start-get)/ [Stop stream](/docs/api-reference/streams/projects-project-streams-dsname-stop-get) only to resume/suspend an existing one).

POST
/{user}/projects/{project}/streams/create

Attach a new kafka or nats Data Source to a project and immediately start a background consumer task for it. This both creates the DS entry and starts consuming in one call — there is no separate "create, then start" step for a brand-new stream (use Start stream/ Stop stream only to resume/suspend an existing one).

Authorization

SymetryMLAuth
AuthorizationBearer <token>

HMAC-SHA256 signature-based authentication: requests are signed with your secret key and sent with the Customer-ID, Sym-date, Authorization, Content-MD5 and sym-version headers. See SymetryML REST API Security for the signature algorithm and a complete example.

In: header

Path Parameters

user*string

User/Customer identifier

project*string

Project identifier

Query Parameters

fromBeginning?boolean

Kafka only: consume the topic from its earliest offset instead of only new records.

Defaultfalse

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Encrypted DSInfo

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/c1/projects/nbra_prj_iris/streams/create" \  -H "Content-Type: application/json" \  -d '9TYsk+/zj32PJvmeT7FY7mT9yn0IpjSN2KcM1mRkpZEwbDiTsm04CcXJYQWm2r42q0JZnvZ43pFg9hutZhonwtVZkg5x5W4Bk2rhZoAGhD1iCSREqWLRKgPvv2Gdw3yHJj0wEx9O70d21p9VF/uEDXtMsIgFSdZeuLNStZJoUYvWuSmDxMRGznKILNRw8FNTIdNlQ61TWBrTBcWVKFqQoA=='
{  "statusCode": 201,  "statusString": "DS Stream created stream with name [kafka_stream_0] for customer [c1]",  "values": {}}

{  "statusCode": 400,  "statusString": "Customer [c1] specified unknown DS Stream type [s3]",  "values": {}}

{  "statusCode": 500,  "statusString": "Generic Exception [org.apache.kafka.common.KafkaException: Failed to construct kafka consumer]",  "values": {}}