Skip to content
Start here

List Sinks

GET/accounts/{account_id}/pipelines/v1/sinks

List/Filter Sinks 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
Path ParametersExpand Collapse
account_id: string

Specifies the public ID of the account.

Query ParametersExpand Collapse
page: optional number
per_page: optional number
pipeline_id: optional string
ReturnsExpand Collapse
result: array of { id, created_at, modified_at, 5 more }
id: string

Indicates a unique identifier for this sink.

created_at: string
formatdate-time
modified_at: string
formatdate-time
name: string

Defines the name of the Sink.

maxLength128
minLength1
type: "r2" or "r2_data_catalog"

Specifies the type of sink.

One of the following:
"r2"
"r2_data_catalog"
config: optional { account_id, bucket, file_naming, 4 more } or { account_id, bucket, table_name, 2 more }

Defines the configuration of the R2 Sink.

One of the following:
CloudflarePipelinesR2TablePublic { account_id, bucket, file_naming, 4 more }

R2 Sink public configuration.

account_id: string

Cloudflare Account ID for the bucket

bucket: string

R2 Bucket to write to

file_naming: optional { prefix, strategy, suffix }

Controls filename prefix/suffix and strategy.

prefix: optional string

The prefix to use in file name. i.e prefix-.parquet

strategy: optional "serial" or "uuid" or "uuid_v7" or "ulid"

Filename generation strategy.

One of the following:
"serial"
"uuid"
"uuid_v7"
"ulid"
suffix: optional string

This will overwrite the default file suffix. i.e .parquet, use with caution

jurisdiction: optional string

Jurisdiction this bucket is hosted in

partitioning: optional { time_pattern }

Data-layout partitioning for sinks.

time_pattern: optional string

The pattern of the date string

path: optional string

Subpath within the bucket to write to

rolling_policy: optional { file_size_bytes, inactivity_seconds, interval_seconds }

Rolling policy for file sinks (when & why to close a file and open a new one).

file_size_bytes: optional number

Files will be rolled after reaching this number of bytes

formatuint64
minimum0
inactivity_seconds: optional number

Number of seconds of inactivity to wait before rolling over to a new file

formatuint64
minimum1
interval_seconds: optional number

Number of seconds to wait before rolling over to a new file

formatuint64
minimum1
CloudflarePipelinesR2DataCatalogTablePublic { account_id, bucket, table_name, 2 more }

R2 Data Catalog Sink public configuration.

account_id: string

Cloudflare Account ID

formaturi
bucket: string

The R2 Bucket that hosts this catalog

table_name: string

Table name

namespace: optional string

Table namespace

rolling_policy: optional { file_size_bytes, inactivity_seconds, interval_seconds }

Rolling policy for file sinks (when & why to close a file and open a new one).

file_size_bytes: optional number

Files will be rolled after reaching this number of bytes

formatuint64
minimum0
inactivity_seconds: optional number

Number of seconds of inactivity to wait before rolling over to a new file

formatuint64
minimum1
interval_seconds: optional number

Number of seconds to wait before rolling over to a new file

formatuint64
minimum1
format: optional { type, decimal_encoding, timestamp_format, unstructured } or { type, compression, row_group_bytes }
One of the following:
Json { type, decimal_encoding, timestamp_format, unstructured }
type: "json"
decimal_encoding: optional "number" or "string" or "bytes"
One of the following:
"number"
"string"
"bytes"
timestamp_format: optional "rfc3339" or "unix_millis"
One of the following:
"rfc3339"
"unix_millis"
unstructured: optional boolean
Parquet { type, compression, row_group_bytes }
type: "parquet"
compression: optional "uncompressed" or "snappy" or "gzip" or 2 more
One of the following:
"uncompressed"
"snappy"
"gzip"
"zstd"
"lz4"
row_group_bytes: optional number
formatint64
minimum0
schema: optional { fields, format, inferred }
fields: optional array of { type, metadata_key, name, 2 more } or { type, metadata_key, name, 2 more } or { type, metadata_key, name, 2 more } or 8 more
One of the following:
Int32 { type, metadata_key, name, 2 more }
type: "int32"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Int64 { type, metadata_key, name, 2 more }
type: "int64"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Float32 { type, metadata_key, name, 2 more }
type: "float32"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Float64 { type, metadata_key, name, 2 more }
type: "float64"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Bool { type, metadata_key, name, 2 more }
type: "bool"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
String { type, metadata_key, name, 2 more }
type: "string"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Binary { type, metadata_key, name, 2 more }
type: "binary"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Timestamp { type, metadata_key, name, 3 more }
type: "timestamp"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
unit: optional "second" or "millisecond" or "microsecond" or "nanosecond"
One of the following:
"second"
"millisecond"
"microsecond"
"nanosecond"
Json { type, metadata_key, name, 2 more }
type: "json"
metadata_key: optional string
name: optional string
required: optional boolean
sql_name: optional string
Struct =
List =
format: optional { type, decimal_encoding, timestamp_format, unstructured } or { type, compression, row_group_bytes }
One of the following:
Json { type, decimal_encoding, timestamp_format, unstructured }
type: "json"
decimal_encoding: optional "number" or "string" or "bytes"
One of the following:
"number"
"string"
"bytes"
timestamp_format: optional "rfc3339" or "unix_millis"
One of the following:
"rfc3339"
"unix_millis"
unstructured: optional boolean
Parquet { type, compression, row_group_bytes }
type: "parquet"
compression: optional "uncompressed" or "snappy" or "gzip" or 2 more
One of the following:
"uncompressed"
"snappy"
"gzip"
"zstd"
"lz4"
row_group_bytes: optional number
formatint64
minimum0
inferred: optional boolean
result_info: { count, page, per_page, total_count }
count: number

Indicates the number of items on current page.

page: number

Indicates the current page number.

per_page: number

Indicates the number of items per page.

total_count: number

Indicates the total number of items.

success: boolean

Indicates whether the API call was successful.

List Sinks

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pipelines/v1/sinks \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "result": [
    {
      "id": "01234567890123457689012345678901",
      "created_at": "2019-12-27T18:11:19.117Z",
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "my_sink",
      "type": "r2",
      "config": {
        "account_id": "account_id",
        "bucket": "bucket",
        "file_naming": {
          "prefix": "prefix",
          "strategy": "serial",
          "suffix": "suffix"
        },
        "jurisdiction": "jurisdiction",
        "partitioning": {
          "time_pattern": "year=%Y/month=%m/day=%d/hour=%H"
        },
        "path": "path",
        "rolling_policy": {
          "file_size_bytes": 0,
          "inactivity_seconds": 1,
          "interval_seconds": 1
        }
      },
      "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",
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "my_sink",
      "type": "r2",
      "config": {
        "account_id": "account_id",
        "bucket": "bucket",
        "file_naming": {
          "prefix": "prefix",
          "strategy": "serial",
          "suffix": "suffix"
        },
        "jurisdiction": "jurisdiction",
        "partitioning": {
          "time_pattern": "year=%Y/month=%m/day=%d/hour=%H"
        },
        "path": "path",
        "rolling_policy": {
          "file_size_bytes": 0,
          "inactivity_seconds": 1,
          "interval_seconds": 1
        }
      },
      "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
}