Axiom observability platform for logs, events, and analytics via REST API
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Axiom is a cloud-native observability platform for storing, querying, and analyzing log and event data at scale. Use the REST API to ingest data, run queries using APL (Axiom Processing Language), and manage datasets programmatically.
Official docs:
https://axiom.co/docs/restapi/introduction
Use this skill when you need to:
Axiom supports two token types:
| Type | Prefix | Use Case |
|---|---|---|
| API Token | xaat- | Most operations (datasets, ingest, queries, monitors) |
| Personal Access Token (PAT) | xapt- | Full account access (required for /v2/user endpoint) |
Set environment variables:
# Required: API Token for most operations
export AXIOM_API_TOKEN="xaat-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# Optional: For endpoints that require PAT (e.g., Get Current User)
export AXIOM_PERSONAL_ACCESS_TOKEN="xapt-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
export AXIOM_ORG_ID="your-org-id"
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
https://us-east-1.aws.edge.axiom.cohttps://eu-central-1.aws.edge.axiom.cohttps://api.axiom.cobash -c 'curl -s "https://api.axiom.co/v2/datasets" -H "Authorization: Bearer ${AXIOM_API_TOKEN}"' | jq .
bash -c 'curl -s "https://api.axiom.co/v2/datasets/my-logs" -H "Authorization: Bearer ${AXIOM_API_TOKEN}"' | jq .
bash -c 'curl -s -X POST "https://api.axiom.co/v2/datasets" -H "Authorization: Bearer ${AXIOM_API_TOKEN}" -H "Content-Type: application/json" -d '"'"'{"name": "my-logs", "description": "Application logs"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://us-east-1.aws.edge.axiom.co/v1/ingest/my-logs" -H "Authorization: Bearer ${AXIOM_API_TOKEN}" -H "Content-Type: application/json" -d '"'"'[{"message": "User logged in", "user_id": "123", "level": "info"}]'"'"'' | jq .
bash -c 'curl -s -X POST "https://us-east-1.aws.edge.axiom.co/v1/ingest/my-logs" -H "Authorization: Bearer ${AXIOM_API_TOKEN}" -H "Content-Type: application/x-ndjson" -d $'"'"'{"message": "Event 1", "level": "info"}\n{"message": "Event 2", "level": "warn"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.axiom.co/v1/datasets/_apl?format=tabular" -H "Authorization: Bearer ${AXIOM_API_TOKEN}" -H "Content-Type: application/json" -d '"'"'{"apl": "[\"my-logs\"] | where level == \"error\" | limit 10", "startTime": "2024-01-01T00:00:00Z", "endTime": "2025-12-31T23:59:59Z"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.axiom.co/v1/datasets/_apl?format=tabular" -H "Authorization: Bearer ${AXIOM_API_TOKEN}" -H "Content-Type: application/json" -d '"'"'{"apl": "[\"my-logs\"] | summarize count() by level", "startTime": "2024-01-01T00:00:00Z", "endTime": "2025-12-31T23:59:59Z"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.axiom.co/v2/annotations" -H "Authorization: Bearer ${AXIOM_API_TOKEN}" -H "Content-Type: application/json" -d '"'"'{"datasets": ["my-logs"], "type": "deployment", "title": "v1.2.0 deployed", "time": "2024-12-24T10:00:00Z"}'"'"'' | jq .
bash -c 'curl -s "https://api.axiom.co/v2/monitors" -H "Authorization: Bearer ${AXIOM_API_TOKEN}"' | jq .
Note: This endpoint requires a Personal Access Token (PAT), not an API Token.
bash -c 'curl -s "https://api.axiom.co/v2/user" -H "Authorization: Bearer ${AXIOM_PERSONAL_ACCESS_TOKEN}" -H "x-axiom-org-id: ${AXIOM_ORG_ID}"' | jq .
bash -c 'curl -s -X DELETE "https://api.axiom.co/v2/datasets/my-logs" -H "Authorization: Bearer ${AXIOM_API_TOKEN}"' | jq .
APL (Axiom Processing Language) is similar to Kusto Query Language (KQL). Use ["dataset-name"] syntax for dataset names with special characters.
| Query | Description |
|---|---|
["dataset"] | limit 10 | Get first 10 events |
["dataset"] | where level == "error" | Filter by field value |
["dataset"] | where message contains "timeout" | Search in text |
["dataset"] | summarize count() by level | Count by group |
["dataset"] | summarize avg(duration_ms) by bin(_time, 1h) | Hourly average |
["dataset"] | sort by _time desc | limit 100 | Latest 100 events |
["dataset"] | where _time > ago(1h) | Events in last hour |
us-east-1.aws.edge.axiom.co or eu-central-1.aws.edge.axiom.co) for data ingestion, not api.axiom.coX-RateLimit-Remaining header to avoid hitting limitsstartTime and endTime for queries to improve performance