Skip to main content
POST
/
1
/
batch
/
{datasetSlug}
Create Events
curl --request POST \
  --url https://api.honeycomb.io/1/batch/{datasetSlug} \
  --header 'Content-Type: application/json' \
  --header 'X-Honeycomb-Team: <api-key>' \
  --data '
[
  {
    "data": {},
    "time": "<string>",
    "samplerate": 123
  }
]
'
[
  {
    "status": 202
  },
  {
    "status": 400,
    "error": "Request body should not be empty."
  },
  {
    "status": 400,
    "error": "Event has too many columns."
  },
  {
    "status": 400,
    "error": "Request body is malformed and cannot be read."
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.honeycomb.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Honeycomb-Team
string
header
required

Authenticate using a Honeycomb Configuration Key.

Pass the Token in the X-Honeycomb-Team header:

X-Honeycomb-Team: 1234567890123456789012

If you created your key using the API, use data.attributes.secret; this is the same value as the Token in the UI.

To learn how to create a Configuration Key, visit Manage Environment API Keys. To learn more about authenticating requests, visit API Authentication.

Headers

Content-Encoding
enum<string>

Included when sending events in a file. Size limitations may be addressed by compressing request bodies with gzip or zstd compression. Be sure to set the Content-Encoding to gzip or zstd when compressing the request body. If sending plaintext, omit this header; "plaintext" is included to simplify the example with curl.

Available options:
gzip,
zstd

Path Parameters

datasetSlug
string
required

The dataset slug.

Body

The array should contain one or more JSON objects representing Events. Each Event contains its payload under the data key. Values of time and/or samplerate can be included as well.

The JSON payload should have the structure:

[{ "data": { "key1": "value1", "key2": 2.0 } }, ... ]

Size limitations may be addressed by compressing request bodies with gzip or zstd compression.

An empty 202 response indicates that the event has been queued for processing.

data
object
time
string

Should be in RFC3339 high precision format (for example, YYYY-MM-DDTHH:MM:SS.mmmZ). May be a Unix epoch (seconds since 1970) with second or greater precision (for example, 1452759330927). Optional. If not set, defaults to the time that the API receives the event.

samplerate
integer

An integer representing the denominator in the fraction 1/n when client-side sampling has been applied. Optional. If not set, defaults to 1, meaning "not sampled". Refer to Sampling for more detail.

Response

Enqueued for processing

status
number
error
string