Enter the array of JSON objects into the body of the API request.
Optional: Pass URL query parameters such as timestamp-field and timestamp-format (for example, ?timestamp-field=timestamp), or optional request headers such as X-Axiom-Event-Labels. The request body contains only the events. For more information, see the ingest data API reference.
Set the Content-Type header to application/json.
Set the Authorization header to Bearer API_TOKEN.
Send the POST request to https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME.
The following example request contains grouped events. The structure of the JSON payload has the scheme of [ { "labels": { "key1": "value1", "key2": "value2" } }, ] where the array contains one or more JSON objects describing events.
Enter each JSON object in a separate line into the body of the API request.
Optional: Pass URL query parameters such as timestamp-field and timestamp-format, or optional request headers such as X-Axiom-Event-Labels. The request body contains only the events. For more information, see the ingest data API reference.
Set the Content-Type header to either application/json or application/x-ndjson.
Set the Authorization header to Bearer API_TOKEN. Replace API_TOKEN with the Axiom API token you have generated.
Send the POST request to https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME. Replace DATASET_NAME with the name of the Axiom dataset where you want to send data.
Encode the events in CSV format. The first line specifies the field names separated by commas. Subsequent new lines specify the values separated by commas.
Enter the CSV representation in the body of the API request.
Optional: Pass URL query parameters such as timestamp-field, timestamp-format, and csv-delimiter, or optional request headers such as X-Axiom-CSV-Fields (to supply field names outside the first line) and X-Axiom-Event-Labels. The request body contains only the CSV data. For more information, see the ingest data API reference.
Set the Content-Type header to text/csv.
Set the Authorization header to Bearer API_TOKEN. Replace API_TOKEN with the Axiom API token you have generated.
Send the POST request to https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME. Replace DATASET_NAME with the name of the Axiom dataset where you want to send data.
To attach the same key-value labels to every event in a request, pass a JSON object in the X-Axiom-Event-Labels header. The label bytes count toward your ingest size.
For more information on other libraries you can use to send data, see Send data. For response behavior when an event introduces new fields beyond a dataset's field limit, see Restrictions on datasets and fields.