Skip to content
Start here

List Streams

client.pipelines.streams.list(StreamListParams { account_id, page, per_page, pipeline_id } params, RequestOptionsoptions?): V4PagePaginationArray<StreamListResponse { id, created_at, http, 7 more } >
GET/accounts/{account_id}/pipelines/v1/streams

List/Filter Streams in Account.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Pipelines WritePipelines Read
ParametersExpand Collapse
params: StreamListParams { account_id, page, per_page, pipeline_id }
account_id: string

Path param: Specifies the public ID of the account.

page?: number

Query param

per_page?: number

Query param

pipeline_id?: string

Query param: Specifies the public ID of the pipeline.

maxLength32
minLength32
ReturnsExpand Collapse
StreamListResponse { id, created_at, http, 7 more }
id: string

Indicates a unique identifier for this stream.

created_at: string
formatdate-time
http: HTTP { authentication, enabled, cors }
authentication: boolean

Indicates that authentication is required for the HTTP endpoint.

enabled: boolean

Indicates that the HTTP endpoint is enabled.

cors?: CORS { origins }

Specifies the CORS options for the HTTP endpoint.

origins?: Array<string>
modified_at: string
formatdate-time
name: string

Indicates the name of the Stream.

maxLength128
minLength1
version: number

Indicates the current version of this stream.

worker_binding: WorkerBinding { enabled }
enabled: boolean

Indicates that the worker binding is enabled.

endpoint?: string

Indicates the endpoint URL of this stream.

formaturi
format?: Json { type, decimal_encoding, timestamp_format, unstructured } | Parquet { type, compression, row_group_bytes }
One of the following:
Json { type, decimal_encoding, timestamp_format, unstructured }
type: "json"
decimal_encoding?: "number" | "string" | "bytes"
One of the following:
"number"
"string"
"bytes"
timestamp_format?: "rfc3339" | "unix_millis"
One of the following:
"rfc3339"
"unix_millis"
unstructured?: boolean
Parquet { type, compression, row_group_bytes }
type: "parquet"
compression?: "uncompressed" | "snappy" | "gzip" | 2 more
One of the following:
"uncompressed"
"snappy"
"gzip"
"zstd"
"lz4"
row_group_bytes?: number | null
formatint64
minimum0
schema?: Schema { fields, format, inferred }
fields?: Array<Int32 { type, metadata_key, name, 2 more } | Int64 { type, metadata_key, name, 2 more } | Float32 { type, metadata_key, name, 2 more } | 8 more>
One of the following:
Int32 { type, metadata_key, name, 2 more }
type: "int32"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Int64 { type, metadata_key, name, 2 more }
type: "int64"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Float32 { type, metadata_key, name, 2 more }
type: "float32"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Float64 { type, metadata_key, name, 2 more }
type: "float64"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Bool { type, metadata_key, name, 2 more }
type: "bool"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
String { type, metadata_key, name, 2 more }
type: "string"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Binary { type, metadata_key, name, 2 more }
type: "binary"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Timestamp { type, metadata_key, name, 3 more }
type: "timestamp"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
unit?: "second" | "millisecond" | "microsecond" | "nanosecond"
One of the following:
"second"
"millisecond"
"microsecond"
"nanosecond"
Json { type, metadata_key, name, 2 more }
type: "json"
metadata_key?: string | null
name?: string
required?: boolean
sql_name?: string
Struct
List
format?: Json { type, decimal_encoding, timestamp_format, unstructured } | Parquet { type, compression, row_group_bytes }
One of the following:
Json { type, decimal_encoding, timestamp_format, unstructured }
type: "json"
decimal_encoding?: "number" | "string" | "bytes"
One of the following:
"number"
"string"
"bytes"
timestamp_format?: "rfc3339" | "unix_millis"
One of the following:
"rfc3339"
"unix_millis"
unstructured?: boolean
Parquet { type, compression, row_group_bytes }
type: "parquet"
compression?: "uncompressed" | "snappy" | "gzip" | 2 more
One of the following:
"uncompressed"
"snappy"
"gzip"
"zstd"
"lz4"
row_group_bytes?: number | null
formatint64
minimum0
inferred?: boolean | null

List Streams

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const streamListResponse of client.pipelines.streams.list({
  account_id: '0123105f4ecef8ad9ca31a8372d0c353',
})) {
  console.log(streamListResponse.id);
}
{
  "result": [
    {
      "id": "01234567890123457689012345678901",
      "created_at": "2019-12-27T18:11:19.117Z",
      "http": {
        "authentication": false,
        "enabled": true,
        "cors": {
          "origins": [
            "string"
          ]
        }
      },
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "my_stream",
      "version": 3,
      "worker_binding": {
        "enabled": true
      },
      "endpoint": "https://01234567890123457689012345678901.ingest.cloudflare.com/v1",
      "format": {
        "type": "json",
        "decimal_encoding": "number",
        "timestamp_format": "rfc3339",
        "unstructured": true
      },
      "schema": {
        "fields": [
          {
            "type": "int32",
            "metadata_key": "metadata_key",
            "name": "name",
            "required": true,
            "sql_name": "sql_name"
          }
        ],
        "format": {
          "type": "json",
          "decimal_encoding": "number",
          "timestamp_format": "rfc3339",
          "unstructured": true
        },
        "inferred": true
      }
    }
  ],
  "result_info": {
    "count": 1,
    "page": 0,
    "per_page": 10,
    "total_count": 1
  },
  "success": true
}
Returns Examples
{
  "result": [
    {
      "id": "01234567890123457689012345678901",
      "created_at": "2019-12-27T18:11:19.117Z",
      "http": {
        "authentication": false,
        "enabled": true,
        "cors": {
          "origins": [
            "string"
          ]
        }
      },
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "my_stream",
      "version": 3,
      "worker_binding": {
        "enabled": true
      },
      "endpoint": "https://01234567890123457689012345678901.ingest.cloudflare.com/v1",
      "format": {
        "type": "json",
        "decimal_encoding": "number",
        "timestamp_format": "rfc3339",
        "unstructured": true
      },
      "schema": {
        "fields": [
          {
            "type": "int32",
            "metadata_key": "metadata_key",
            "name": "name",
            "required": true,
            "sql_name": "sql_name"
          }
        ],
        "format": {
          "type": "json",
          "decimal_encoding": "number",
          "timestamp_format": "rfc3339",
          "unstructured": true
        },
        "inferred": true
      }
    }
  ],
  "result_info": {
    "count": 1,
    "page": 0,
    "per_page": 10,
    "total_count": 1
  },
  "success": true
}