Produce records
POST/produce
Send to the stream’s endpoint, https://<stream_id>.k2.cloudflarestorage.com. Appends a batch of records to the stream. The batch is written atomically, so either every record is stored or none are. Requests are limited to 5 MB, compressed and decompressed, and each record to 1 MB. Gzip bodies are accepted when Content-Encoding is gzip. Requires an API token with K2 produce permission unless the stream’s HTTP input sets authentication to false. Errors use a success and error body instead of the errors array.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Produce records
curl "https://{stream_id}.k2.cloudflarestorage.com/produce" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"records": [
{
"content": "eyJvcmRlcl9pZCI6MTAwMX0="
}
]
}'{
"success": true
}Returns Examples
{
"success": true
}