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.

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
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
Fields []StreamListResponseSchemaFieldoptional
One of the following:
type StreamListResponseSchemaFieldsInt32 struct{…}
Type StreamListResponseSchemaFieldsInt32Type
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsInt64 struct{…}
Type StreamListResponseSchemaFieldsInt64Type
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsFloat32 struct{…}
Type StreamListResponseSchemaFieldsFloat32Type
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsFloat64 struct{…}
Type StreamListResponseSchemaFieldsFloat64Type
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsBool struct{…}
Type StreamListResponseSchemaFieldsBoolType
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsString struct{…}
Type StreamListResponseSchemaFieldsStringType
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsBinary struct{…}
Type StreamListResponseSchemaFieldsBinaryType
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsTimestamp struct{…}
Type StreamListResponseSchemaFieldsTimestampType
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
Unit StreamListResponseSchemaFieldsTimestampUnitoptional
One of the following:
const StreamListResponseSchemaFieldsTimestampUnitSecond StreamListResponseSchemaFieldsTimestampUnit = "second"
const StreamListResponseSchemaFieldsTimestampUnitMillisecond StreamListResponseSchemaFieldsTimestampUnit = "millisecond"
const StreamListResponseSchemaFieldsTimestampUnitMicrosecond StreamListResponseSchemaFieldsTimestampUnit = "microsecond"
const StreamListResponseSchemaFieldsTimestampUnitNanosecond StreamListResponseSchemaFieldsTimestampUnit = "nanosecond"
type StreamListResponseSchemaFieldsJson struct{…}
Type StreamListResponseSchemaFieldsJsonType
MetadataKey stringoptional
Name stringoptional
Required booloptional
SqlName stringoptional
type StreamListResponseSchemaFieldsStruct struct{…}
type StreamListResponseSchemaFieldsList struct{…}
Format StreamListResponseSchemaFormatoptional
One of the following:
type StreamListResponseSchemaFormatJson struct{…}
Type StreamListResponseSchemaFormatJsonType
DecimalEncoding StreamListResponseSchemaFormatJsonDecimalEncodingoptional
One of the following:
const StreamListResponseSchemaFormatJsonDecimalEncodingNumber StreamListResponseSchemaFormatJsonDecimalEncoding = "number"
const StreamListResponseSchemaFormatJsonDecimalEncodingString StreamListResponseSchemaFormatJsonDecimalEncoding = "string"
const StreamListResponseSchemaFormatJsonDecimalEncodingBytes StreamListResponseSchemaFormatJsonDecimalEncoding = "bytes"
TimestampFormat StreamListResponseSchemaFormatJsonTimestampFormatoptional
One of the following:
const StreamListResponseSchemaFormatJsonTimestampFormatRfc3339 StreamListResponseSchemaFormatJsonTimestampFormat = "rfc3339"
const StreamListResponseSchemaFormatJsonTimestampFormatUnixMillis StreamListResponseSchemaFormatJsonTimestampFormat = "unix_millis"
Unstructured booloptional
type StreamListResponseSchemaFormatParquet struct{…}
Type StreamListResponseSchemaFormatParquetType
Compression StreamListResponseSchemaFormatParquetCompressionoptional
One of the following:
const StreamListResponseSchemaFormatParquetCompressionUncompressed StreamListResponseSchemaFormatParquetCompression = "uncompressed"
const StreamListResponseSchemaFormatParquetCompressionSnappy StreamListResponseSchemaFormatParquetCompression = "snappy"
const StreamListResponseSchemaFormatParquetCompressionGzip StreamListResponseSchemaFormatParquetCompression = "gzip"
const StreamListResponseSchemaFormatParquetCompressionZstd StreamListResponseSchemaFormatParquetCompression = "zstd"
const StreamListResponseSchemaFormatParquetCompressionLz4 StreamListResponseSchemaFormatParquetCompression = "lz4"
RowGroupBytes int64optional
formatint64
minimum0
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"
          }
        ],
        "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
}