Skip to content
Start here

List Streams

client.Pipelines.Streams.List(ctx, params) (*V4PagePaginationArray[StreamListResponse], error)
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
AccountID param.Field[string]

Path param: Specifies the public ID of the account.

Name param.Field[string]Optional

Query param: Filters streams by name (case-insensitive substring).

maxLength128
minLength1
Page param.Field[float64]Optional

Query param

PerPage param.Field[float64]Optional

Query param

PipelineID param.Field[string]Optional

Query param: Specifies the public ID of the pipeline.

maxLength32
minLength32
ReturnsExpand Collapse
type StreamListResponse struct{…}
ID string

Indicates a unique identifier for this stream.

CreatedAt Time
formatdate-time
HTTP StreamListResponseHTTP
Authentication bool

Indicates that authentication is required for the HTTP endpoint.

Enabled bool

Indicates that the HTTP endpoint is enabled.

CORS StreamListResponseHTTPCORSOptional

Specifies the CORS options for the HTTP endpoint.

Origins []stringOptional
ModifiedAt Time
formatdate-time
Name string

Indicates the name of the Stream.

maxLength128
minLength1
Version int64

Indicates the current version of this stream.

WorkerBinding StreamListResponseWorkerBinding
Enabled bool

Indicates that the worker binding is enabled.

Endpoint stringOptional

Indicates the endpoint URL of this stream.

formaturi
Format StreamListResponseFormatOptional

Defines the data format of the events.

One of the following:
type StreamListResponseFormatJson struct{…}
Type StreamListResponseFormatJsonType
DecimalEncoding StreamListResponseFormatJsonDecimalEncodingOptional
One of the following:
const StreamListResponseFormatJsonDecimalEncodingNumber StreamListResponseFormatJsonDecimalEncoding = "number"
const StreamListResponseFormatJsonDecimalEncodingString StreamListResponseFormatJsonDecimalEncoding = "string"
const StreamListResponseFormatJsonDecimalEncodingBytes StreamListResponseFormatJsonDecimalEncoding = "bytes"
TimestampFormat StreamListResponseFormatJsonTimestampFormatOptional
One of the following:
const StreamListResponseFormatJsonTimestampFormatRfc3339 StreamListResponseFormatJsonTimestampFormat = "rfc3339"
const StreamListResponseFormatJsonTimestampFormatUnixMillis StreamListResponseFormatJsonTimestampFormat = "unix_millis"
Unstructured boolOptional
type StreamListResponseFormatParquet struct{…}
Type StreamListResponseFormatParquetType
Compression StreamListResponseFormatParquetCompressionOptional
One of the following:
const StreamListResponseFormatParquetCompressionUncompressed StreamListResponseFormatParquetCompression = "uncompressed"
const StreamListResponseFormatParquetCompressionSnappy StreamListResponseFormatParquetCompression = "snappy"
const StreamListResponseFormatParquetCompressionGzip StreamListResponseFormatParquetCompression = "gzip"
const StreamListResponseFormatParquetCompressionZstd StreamListResponseFormatParquetCompression = "zstd"
const StreamListResponseFormatParquetCompressionLz4 StreamListResponseFormatParquetCompression = "lz4"
RowGroupBytes int64Optional
formatint64
minimum0
Schema StreamListResponseSchemaOptional

Defines the schema of the events in the data stream.

Fields []SourceFieldOptional
One of the following:
type SourceFieldInt32 struct{…}
Type SourceFieldInt32Type
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldInt64 struct{…}
Type SourceFieldInt64Type
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldFloat32 struct{…}
Type SourceFieldFloat32Type
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldFloat64 struct{…}
Type SourceFieldFloat64Type
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldBool struct{…}
Type SourceFieldBoolType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldString struct{…}
Type SourceFieldStringType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldBinary struct{…}
Type SourceFieldBinaryType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldTimestamp struct{…}
Type SourceFieldTimestampType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
Unit SourceFieldTimestampUnitOptional
One of the following:
const SourceFieldTimestampUnitSecond SourceFieldTimestampUnit = "second"
const SourceFieldTimestampUnitMillisecond SourceFieldTimestampUnit = "millisecond"
const SourceFieldTimestampUnitMicrosecond SourceFieldTimestampUnit = "microsecond"
const SourceFieldTimestampUnitNanosecond SourceFieldTimestampUnit = "nanosecond"
type SourceFieldJson struct{…}
Type SourceFieldJsonType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldStruct struct{…}
Type SourceFieldStructType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
type SourceFieldList struct{…}
Type SourceFieldListType
MetadataKey stringOptional
Name stringOptional
Required boolOptional
SqlName stringOptional
Inferred boolOptional

List Streams

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/pipelines"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.Pipelines.Streams.List(context.TODO(), pipelines.StreamListParams{
    AccountID: cloudflare.F("0123105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "inferred": true
      }
    }
  ],
  "result_info": {
    "count": 1,
    "page": 0,
    "per_page": 10,
    "total_count": 1
  },
  "success": true
}