Authorization and headers
The only expected header isAuthorization: Bearer
which is your to token to authenticate the request. For more information, see Tokens.
Using Axiom JS library to ingest data
Axiom maintains the axiom-js to provide official Javascript bindings for the Axiom API. Install usingnpm install
:
eval $(axiom config export -f)
to configure your environment variables.
Otherwise, create an API token and export it as AXIOM_TOKEN
.
You can also configure the client using options passed to the constructor of the Client:
Ingest Events using JSON
The following example request contains grouped events. The structure of theJSON
payload should have the scheme of [ { "labels": { "key1": "value1", "key2": "value12" } }, ]
, in which the array comprises of one or more JSON objects describing Events.
Example Request using JSON
Example Response
A successful POST Request returns a200
response code JSON with details:
Example Request using Nested Arrays
Example Response
A successful POST Request returns a200
response code JSON with details:
Example Request using Objects, Strings, and Arrays
Example Response
A successful POST Request returns a200
response code JSON with details:
Example Response
A successful POST Request returns a200
response code JSON with details:
Ingest Events using CSV
The following example request contains events. The structure of theCSV
payload uses a comma to separate values 'value1, value2, value3'
.