Ingest raw Splunk HEC events

POST/services/collector/raw

Ingest a raw payload. Each line of a text/plain body becomes an event; JSON bodies are also accepted. Event metadata is supplied through query parameters rather than an envelope.

Parameters #

PropertyTypeLocationDescription
indexstringqueryThe dataset (Splunk index) to ingest into.
sourcetypestringqueryThe sourcetype to attach to every event in the request.
sourcestringqueryThe source to attach to every event in the request.
hoststringqueryThe host to attach to every event in the request.

Body #

Raw event data. Each line becomes a separate event.

text/plainapplication/json

Request #

curl -X POST 'https://hec.{axiom-domain}/services/collector/raw' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: text/plain' \
  -d '{"message":"hello from Axiom","status":200}'
Try itRun this request against your Axiom organization

Credentials stay in this browser tab and are only sent to Axiom when you run the request.

Response #

200The events were accepted.
application/json
400The request could not be processed. The `code` field identifies the Splunk error: `5` (no data), `6` (invalid data format), or `7` (incorrect index).
application/json
PropertyTypeDescription
textstringRequiredA human-readable status message.
codeintegerRequiredThe Splunk status code. 0 indicates success, 17 indicates a healthy collector, and 5, 6, and 7 indicate no data, invalid data format, and incorrect index respectively.