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 notifiers
To create a notifier, send a POST request to thenotifiers
endpoint. In the body of the request, specify the following:
name
of the notifier.- The
properties
field takes an object that defines the attributes of the notifier. The required attributes depend on the type of notifier you create. For example, to create an email notifier, specify the list of emails to be notified.
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 notifiers
Get information about all notifiers
To get information about all the notifiers in your Axiom organization, send a GET request to thenotifiers
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 notifier
To get information about a specific notifier, send a GET request to thenotifiers/NOTIFIER_ID
endpoint where NOTIFIER_ID
is the unique ID of the notifier. 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 notifiers
To update a notifier, send a PUT request to thenotifiers/NOTIFIER_ID
endpoint where NOTIFIER_ID
is the unique ID of the notifier. In the body of the request, specify the properties you want to update. Include the name
field even if you don’t want to change it. 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 notifiers
To delete a notifier, send a DELETE request to thenotifiers/NOTIFIER_ID
endpoint where NOTIFIER_ID
is the unique ID of the notifier. 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.