Overview

Ingest data (legacy)

Ingest (Legacy)

This is a legacy endpoint that ingests data into the US East 1 (AWS) edge deployment. To ingest data, use the Ingest data to edge deployment endpoint instead. For more information, see Ingest data and Edge deployments.

The base domain for this endpoint is https://api.axiom.co, irrespective of your edge deployment.

POST/v1/datasets/{dataset_name}/ingest
Features

Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.

Request body: application/json. 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.

Input6
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
dataset_namestring · pathrequired
(path) Unique name of the dataset.
timestamp-fieldstring · body
(query) The 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-formatstring · body
(query) The date-time format of the timestamp field. The reference time is Mon Jan 2 15:04:05 -0700 MST 2006, as specified in Go time.Parse
csv-delimiterstring · body
(query) The delimiter to use when parsing CSV data. If not specified, the default delimiter is ,.
X-Axiom-CSV-Fieldsstring[] · body
(header) A 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-Labelsstring · body
(header) An optional JSON encoded object with additional labels to add to all events in the request
Output6
blocksCreatedinteger
Number of blocks created
failedinteger
Number of failures that occurred during ingest
failuresobject[]
List of failures that occurred during ingest
ingestedinteger
Number of events ingested
processedBytesinteger
Number of bytes processed
walLengthinteger
Length of the WAL
Responses
200ingest status
401Forbidden
Example input
curl -X POST 'https://api.axiom.co/v1/datasets/{dataset_name}/ingest' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example output
{
  "ingested": 2,
  "failed": 0,
  "failures": [],
  "processedBytes": 16
}

Updated

Was this page helpful?