At a glance
- Availability: Experimental (how to enable).
- Auth: API key.
- Connection: The key comes from
AXIOM_TOKEN. - Docs: https://axiom.co/docs/reference/tokens
Credentials
Set these per environment. See Connect an integration.| Variable | Required | Description |
|---|---|---|
AXIOM_TOKEN | Yes | Axiom API token with query (and optionally ingest) permissions Docs. |
Setup
- Sign up for Axiom: Create a free account at https://app.axiom.co - the free plan includes API access. Create a dataset and send a few test events so queries return data.
- Create an API token: Go to Settings → API tokens (https://app.axiom.co/settings/api-tokens) and create a token. Grant query permission on the datasets you want to read, and ingest permission if you will use Ingest Events.
- Set the environment variable: Add the token to your .env as AXIOM_TOKEN=…
- Verify access: Run List Datasets, then Run APL Query with [‘<dataset>’] | limit 10.
- Requests authenticate with ‘Authorization: Bearer <token>’ against https://api.axiom.co
- APL queries POST to /v1/query/_apl; startTime/endTime accept RFC3339 timestamps or relative expressions like now-1d
- API tokens have granular dataset permissions - a query-only token cannot ingest; personal access tokens additionally require an org ID header and are not used here
Tools
| Tool | Access | Description |
|---|---|---|
| List Datasets | Read | List datasets in the Axiom organization |
| Get Dataset | Read | Get a dataset’s details |
| Run APL Query | Read | Run an APL (Axiom Processing Language) query across datasets |
| Ingest Events | Write | Ingest a batch of JSON events into a dataset |
Example prompts
- Run an Axiom APL query for error-level events in my main dataset over the last hour and summarize them.
- List my Axiom datasets and tell me what kind of data each one holds.