Ingest data

POST/v1/datasets/{dataset_name}/ingest

Ingest

Parameters #

PropertyTypeLocationDescription
dataset_namestringRequiredpathUnique name of the dataset.
timestamp-fieldstringqueryThe name of the field to use as the timestamp. If not specified, the timestamp will be the time the event was received by Axiom.
timestamp-formatstringqueryThe date-time format of the timestamp field. The reference time is Mon Jan 2 15:04:05 -0700 MST 2006, as specified in https://pkg.go.dev/time/?tab=doc#Parse
csv-delimiterstringqueryThe delimiter to use when parsing CSV data. If not specified, the default delimiter is ,.
X-Axiom-CSV-Fieldsstring[]headerA list of optional comma separated fields to use for CSV ingestion. If not specified, the first line of the CSV will be used as the field names.
X-Axiom-Event-LabelsstringheaderAn optional JSON encoded object with additional labels to add to all events in the request

Body #

Data you want to send to Axiom. Supported formats: JSON, NDJSON, CSV. Upload the data in a file or send it in the payload of the request.

application/jsontext/csvapplication/x-ndjson

Request #

curl -X POST 'https://api.axiom.co/v1/datasets/DATASET_NAME/ingest' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -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 #

200ingest status
application/json
401Forbidden
application/json
PropertyTypeDescription
blocksCreatedinteger<uint32>Number of blocks created
failedinteger<uint64>RequiredNumber of failures that occurred during ingest
failuresobject[]List of failures that occurred during ingest
errorstringRequired
timestampstring<date-time>Required
ingestedinteger<uint64>RequiredNumber of events ingested
processedBytesinteger<uint64>RequiredNumber of bytes processed
walLengthinteger<uint32>Length of the WAL