Skip to content

Commit cee7829

Browse files
authored
Add that ingest endpoint accepts application/json (#314)
1 parent 8b550ba commit cee7829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

restapi/ingest.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ To send data to Axiom in NDJSON format:
183183
1. Encode the events as JSON objects.
184184
1. Enter each JSON object in a separate line into the body of the API request.
185185
1. Optional: In the body of the request, set optional parameters such as `timestamp-field` and `timestamp-format`. For more information, see the [ingest data API reference](/restapi/endpoints/ingestIntoDataset).
186-
1. Set the `Content-Type` header to `application/x-ndjson`.
186+
1. Set the `Content-Type` header to either `application/json` or `application/x-ndjson`.
187187
1. Set the `Authorization` header to `Bearer API_TOKEN`. Replace `API_TOKEN` with the Axiom API token you have generated.
188188
1. Send the POST request to `https://api.axiom.co/v1/datasets/DATASET_NAME/ingest`. Replace `DATASET_NAME` with the name of the Axiom dataset where you want to send data.
189189

0 commit comments

Comments
 (0)