Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to create, read, update, and delete datasets.
- In the code samples below, replace
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.
Create datasets
To create a dataset, send a POST request to thedatasets
endpoint. In the body of the request, specify the name and the description of the dataset. For example:
Replace
AXIOM_DOMAIN
with api.axiom.co
if your organization uses the US region, and with api.eu.axiom.co
if your organization uses the EU region. For more information, see Regions.Replace API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Get information about datasets
Get information about all datasets
To get information about all the datasets in your Axiom organization, send a GET request to thedatasets
endpoint. For example:
Replace
AXIOM_DOMAIN
with api.axiom.co
if your organization uses the US region, and with api.eu.axiom.co
if your organization uses the EU region. For more information, see Regions.Replace API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Get information about specific dataset
To get information about a specific dataset, send a GET request to thedatasets/DATASET_ID
endpoint where DATASET_ID
is the unique ID of the dataset. For example:
Replace
AXIOM_DOMAIN
with api.axiom.co
if your organization uses the US region, and with api.eu.axiom.co
if your organization uses the EU region. For more information, see Regions.Replace API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Update datasets
To update a dataset, send a PUT request to thedatasets/DATASET_ID
endpoint where DATASET_ID
is the unique ID of the dataset. In the body of the request, specify the properties you want to update. For example:
Replace
AXIOM_DOMAIN
with api.axiom.co
if your organization uses the US region, and with api.eu.axiom.co
if your organization uses the EU region. For more information, see Regions.Replace API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Delete datasets
To delete a dataset, send a DELETE request to thedatasets/DATASET_ID
endpoint where DATASET_ID
is the unique ID of the dataset. For example: