| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/api/resources/pipelines/methods/create | [Back] [Original] |
[DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYThe previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Pipelines Write[DEPRECATED] Describes the configuration of a pipeline. Use the new streams/sinks/pipelines API instead.
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pipelines \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"destination": {
"batch": {},
"compression": {},
"credentials": {
"access_key_id": "<access key id>",
"endpoint": "https://123f8a8258064ed892a347f173372359.r2.cloudflarestorage.com",
"secret_access_key": "<secret key>"
},
"format": "json",
"path": {
"bucket": "bucket",
"prefix": "base"
},
"type": "r2"
},
"name": "sample_pipeline",
"source": [
{
"format": "json",
"type": "type"
}
]
}'{
"result": {
"id": "123f8a8258064ed892a347f173372359",
"destination": {
"batch": {
"max_bytes": 1000,
"max_duration_s": 0.25,
"max_rows": 100
},
"compression": {
"type": "gzip"
},
"format": "json",
"path": {
"bucket": "bucket",
"filename": "${slug}${extension}",
"filepath": "${date}/${hour}",
"prefix": "base"
},
"type": "r2"
},
"endpoint": "https://123f8a8258064ed892a347f173372359.pipelines.cloudflare.com",
"name": "sample_pipeline",
"source": [
{
"format": "json",
"type": "type",
"authentication": true,
"cors": {
"origins": [
"*"
]
}
}
],
"version": 2
},
"success": true
}{
"result": {
"id": "123f8a8258064ed892a347f173372359",
"destination": {
"batch": {
"max_bytes": 1000,
"max_duration_s": 0.25,
"max_rows": 100
},
"compression": {
"type": "gzip"
},
"format": "json",
"path": {
"bucket": "bucket",
"filename": "${slug}${extension}",
"filepath": "${date}/${hour}",
"prefix": "base"
},
"type": "r2"
},
"endpoint": "https://123f8a8258064ed892a347f173372359.pipelines.cloudflare.com",
"name": "sample_pipeline",
"source": [
{
"format": "json",
"type": "type",
"authentication": true,
"cors": {
"origins": [
"*"
]
}
}
],
"version": 2
},
"success": true
}| Web Proxy Viewer | New URL | Original Page |