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 users.
- In the code samples below, replace
API_TOKENwith the Axiom API token you have generated. For added security, store the API token in an environment variable.
Create users
To create a user, send a POST request to theusers endpoint. In the body of the request, specify the following:
nameemailrole
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 users
Get information about all users
To get information about all the users in your Axiom organization, send a GET request to theusers 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 user
To get information about a specific user, send a GET request to theusers/USER_ID endpoint where USER_ID is the unique ID of the user. 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.