Ingest raw Splunk HEC events
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 #
| Property | Type | Location | Description |
|---|---|---|---|
index | string | query | The dataset (Splunk index) to ingest into. |
sourcetype | string | query | The sourcetype to attach to every event in the request. |
source | string | query | The source to attach to every event in the request. |
host | string | query | The host to attach to every event in the request. |
Body #
Raw event data. Each line becomes a separate event.
text/plainapplication/jsonRequest #
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.400The request could not be processed. The `code` field identifies the Splunk error: `5` (no data), `6` (invalid data format), or `7` (incorrect index).| Property | Type | Description |
|---|---|---|
text | stringRequired | A human-readable status message. |
code | integerRequired | The 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. |