Ingest data
Ingest
Parameters #
| Property | Type | Location | Description |
|---|---|---|---|
dataset_name | stringRequired | path | Unique name of the dataset. |
timestamp-field | string | 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-format | string | 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 https://pkg.go.dev/time/?tab=doc#Parse |
csv-delimiter | string | query | The delimiter to use when parsing CSV data. If not specified, the default delimiter is ,. |
X-Axiom-CSV-Fields | string[] | 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-Labels | string | header | An 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-ndjsonRequest #
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 status401Forbidden| Property | Type | Description |
|---|---|---|
blocksCreated | integer<uint32> | Number of blocks created |
failed | integer<uint64>Required | Number of failures that occurred during ingest |
failures | object[] | List of failures that occurred during ingest |
error | stringRequired | |
timestamp | string<date-time>Required | |
ingested | integer<uint64>Required | Number of events ingested |
processedBytes | integer<uint64>Required | Number of bytes processed |
walLength | integer<uint32> | Length of the WAL |