Manage users via API
Learn how to manage Axiom users via API.
This page explains how to manage users programmatically via the API.
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 users
To create a user, send a POST request to the users
endpoint. In the body of the request, specify the following:
name
For example:
The example response contains the user ID that you can later use to access the user programmatically.
For more information, see the API reference.
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 the users
endpoint. For example:
The example response is a list of user objects. Each object contains a unique user ID that you can later use to access the user programmatically.
For more information, see the API reference.
Get information about specific user
To get information about a specific user, send a GET request to the users/ID
endpoint where ID
is the unique ID of the user. For example:
Example response:
For more information, see the API reference.
Update users
To update a user, send a PUT request to the users/ID
endpoint where ID
is the unique ID of the user. 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:
Example response:
For more information, see the API reference.
Delete users
To delete a user, send a DELETE request to the users/ID
endpoint where ID
is the unique ID of the user. For example:
For more information, see the API reference.
Was this page helpful?