Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Get started

IntroductionSend dataQuery dataPaginationAPI limits

Annotations

List all annotationsGETRetrieve annotationGETCreate annotationPOSTUpdate annotationPUTDelete annotationDELETE

API tokens

List all API tokensGETRetrieve API tokenGETCreate API tokenPOSTRegenerate API tokenPOSTDelete API tokenDELETE

Dashboards

Dashboard JSONList all dashboardsGETRetrieve dashboardGETCreate dashboardPOSTUpdate dashboardPUTPatch dashboard elementPATCHDelete dashboardDELETE

Datasets

List all datasetsGETRetrieve datasetGETList all fields in datasetGETRetrieve field in datasetGETCreate datasetPOSTIngest data (legacy)POSTRun APL query (legacy)POSTRun query (legacy)POSTTrim datasetPOSTUpdate datasetPUTUpdate fieldPUTVacuum datasetPOSTDelete fieldsPOSTDelete fieldDELETEDelete datasetDELETE

Edge

Ingest data to edge deploymentIngest Splunk HEC eventsIngest raw Splunk HEC eventsCheck Splunk HEC healthRun APL query to edge deploymentRun batch query to edge deploymentRun MPL query to edge deploymentGet metrics for a datasetGet metric tags for a datasetGet metric tag values for a datasetGet tags for a datasetGet tag values for a dataset

Labels

List all labelsGETRetrieve labelGETCreate labelPOSTUpdate labelPUTDelete labelDELETEList label assignmentsPOSTReplace label assignmentsPUT

Map fields

List all map fieldsGETCreate map fieldPOSTUpdate list of map fieldsPUTDelete map fieldsDELETE

Monitors

List all monitorsGETRetrieve monitorGETRetrieve monitor notification historyGETCreate monitorPOSTUpdate monitorPUTDelete monitorDELETE

Notifiers

List all notifiersGETRetrieve notifierGETCreate notifierPOSTUpdate notifierPUTDelete notifierDELETE

Organizations

List all orgsGETRetrieve orgGETCreate orgPOSTUpdate orgPUTProvision orgPOST

Role-based access control

List all rolesGETRetrieve roleGETList all groupsGETRetrieve groupGETCreate rolePOSTCreate groupPOSTUpdate rolePUTUpdate groupPUTDelete roleDELETEDelete groupDELETE

Saved queries

List all saved queriesGETRetrieve saved queryGETCreate saved queryPOSTUpdate saved queryPUTDelete saved queryDELETE

Users

Retrieve current userGETList all usersGETRetrieve userGETCreate userPOSTUpdate current userPUTUpdate user rolePUTDelete user from orgDELETE

Views

List all viewsGETRetrieve viewGETCreate viewPOSTUpdate viewPUTDelete viewDELETE

Virtual fields

List all virtual fieldsGETRetrieve virtual fieldGETCreate virtual fieldPOSTUpdate virtual fieldPUTDelete virtual fieldDELETE
Edge

Ingest Splunk HEC events

POST/services/collector/event

Ingests one or more Splunk HEC event envelopes, concatenated or newline-delimited, into an events or logs dataset. The dataset comes from the index query parameter, then the first event's index field, then the token's only ingest dataset.

Warning

Use this endpoint to ingest events through the Splunk HTTP Event Collector (HEC) compatible API. For a walkthrough, see Send data using the Splunk HEC API.

The base domain for this endpoint is hec. prefixed to the base domain of your edge deployment. For example, if your edge deployment’s base domain is us-east-1.aws.edge.axiom.co, the HEC endpoint is https://hec.us-east-1.aws.edge.axiom.co.

Edge deploymentBase domain for ingest and query
US East 1 (AWS)us-east-1.aws.edge.axiom.co
EU Central 1 (AWS)eu-central-1.aws.edge.axiom.co

This endpoint only supports API tokens. Personal access tokens (PATs) aren't supported. For more information, see Tokens.

Parameters

PropertyTypeLocationDescription
indexstringqueryThe dataset (Splunk index) to ingest into. Overrides the index field in the event envelope.

Body

A Splunk HEC event envelope.

application/json
PropertyTypeDescription
eventunknownThe event payload. When an object, its keys become top-level fields of the Axiom event. When a string, it is stored in the _raw field.
fieldsobjectAdditional fields merged into the event.
timeunknownThe event timestamp, as epoch seconds, epoch milliseconds, or an RFC 3339 string. When omitted, Axiom assigns the ingest time.
indexstringThe dataset (Splunk index) to ingest into. The index query parameter takes precedence.
hoststring—
sourcestring—
sourcetypestring—

Request

curl -X POST 'https://hec.{axiom-domain}/services/collector/event' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"event":{"message":"hello from HEC","severity":"INFO"},"sourcetype":"httpevent"}'
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 can't be processed. `code` is `5` (no data), `6` (invalid data format, or the dataset is in another edge deployment or isn't an events or logs dataset), or `7` (no dataset could be resolved).
application/json
401The token is missing (`code` `2`) or invalid (`code` `3`).
application/json
403The token can't ingest into the dataset, the dataset is shared, or the organization is suspended. `code` is `4`.
application/json
404Dataset not found. `code` is `7`.
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.
Was this page helpful?
Suggest edits on GitHub
PreviousIngest data to edge deploymentNextIngest raw Splunk HEC events
On this page
ParametersBodyRequestResponse