Create Stream
POST
/api/v1/pipelines/streams
const url = 'https://example.com/api/v1/pipelines/streams';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","database":"example","schema":"example","on_table":"example","on_view":"example","on_stage":"example","append_only":false,"show_initial_rows":false,"comment":"example","copy_grants":false,"at_timestamp":"example","before_timestamp":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/pipelines/streams \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "database": "example", "schema": "example", "on_table": "example", "on_view": "example", "on_stage": "example", "append_only": false, "show_initial_rows": false, "comment": "example", "copy_grants": false, "at_timestamp": "example", "before_timestamp": "example" }'Create a new stream.
Args: request: Stream creation parameters
Returns: StreamOperationResponse with operation result
Raises: HTTPException: If stream creation fails
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
StreamCreateRequest
Request model for creating a stream.
object
name
required
Name
Stream name
string
database
required
Database
Database name
string
schema
required
Schema
Schema name
string
append_only
Append Only
Create append-only stream
boolean
show_initial_rows
Show Initial Rows
Include initial rows at creation
boolean
copy_grants
Copy Grants
Copy grants from source object
boolean
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
StreamOperationResponse
Response model for stream operations.
object
stream_name
required
Stream Name
Stream name
string
operation
required
Operation
Operation performed (create, delete)
string
success
required
Success
Whether operation was successful
boolean
message
required
Message
Operation result message
string
Examplegenerated
{ "stream_name": "example", "operation": "example", "success": true, "message": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}