Skip to main content

streams

Creates, updates, deletes, gets or lists a streams resource.

Overview

Namestreams
TypeResource
Idcloudflare.pipelines.streams

Fields

The following fields are returned by SELECT queries:

Indicates a successfully retrieved Stream.

NameDatatypeDescription
idstringIndicates a unique identifier for this stream.
namestringIndicates the name of the Stream.
created_atstring (date-time)
endpointstring (uri)Indicates the endpoint URL of this stream.
formatobject (title: Json)
httpobject
modified_atstring (date-time)
schemaobject
versionintegerIndicates the current version of this stream.
worker_bindingobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, stream_idGet Stream Details.
listselectaccount_idpipeline_id, page, per_pageList/Filter Streams in Account.
createinsertaccount_id, nameCreate a new Stream.
updateupdateaccount_id, stream_idUpdate a Stream.
deletedeleteaccount_id, stream_idforceDelete Stream in Account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
stream_idstring
forcestring
pagenumber
per_pagenumber
pipeline_idstring

SELECT examples

Get Stream Details.

SELECT
id,
name,
created_at,
endpoint,
format,
http,
modified_at,
schema,
version,
worker_binding
FROM cloudflare.pipelines.streams
WHERE account_id = '{{ account_id }}' -- required
AND stream_id = '{{ stream_id }}' -- required
;

INSERT examples

Create a new Stream.

INSERT INTO cloudflare.pipelines.streams (
format,
http,
name,
schema,
worker_binding,
account_id
)
SELECT
'{{ format }}',
'{{ http }}',
'{{ name }}' /* required */,
'{{ schema }}',
'{{ worker_binding }}',
'{{ account_id }}'
RETURNING
result,
success
;

UPDATE examples

Update a Stream.

UPDATE cloudflare.pipelines.streams
SET
http = '{{ http }}',
worker_binding = '{{ worker_binding }}'
WHERE
account_id = '{{ account_id }}' --required
AND stream_id = '{{ stream_id }}' --required
RETURNING
result,
success;

DELETE examples

Delete Stream in Account.

DELETE FROM cloudflare.pipelines.streams
WHERE account_id = '{{ account_id }}' --required
AND stream_id = '{{ stream_id }}' --required
AND force = '{{ force }}'
;