---
name: axiom-ingest
description: Send data to Axiom. Picks an org from ~/.axiom.toml, or provisions a temporary one when none is configured, creates the dataset, ingests JSON, NDJSON, or CSV, and confirms with a query. Use when asked to send, ingest, upload, or load data or events into Axiom or a new Axiom dataset.
title: axiom-ingest
canonical_url: https://skilld.dev/gh/axiomhq/skills/axiom-ingest
last_updated: 2026-10-30T16:09:16.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [README.md](https://skilld.dev/api/skills-raw/axiomhq/skills/axiom-ingest/README.md).
>
> If the user asked to install this Skill, run `npx skilld install axiomhq/skills/axiom-ingest`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/axiom-ingest`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/axiomhq/skills/axiom-ingest) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/axiom-ingest`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/axiom-ingest --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/axiom-ingest --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# axiom-ingest

Get data into an Axiom dataset with the fewest questions.

## 1. Choose an org

List configured deployments:

```bash
grep -o '^\[deployments\.[^]]*\]' ~/.axiom.toml 2>/dev/null
```

| Found | Do |
|-------|----|
| None, and no Axiom MCP connection | Follow the `axiom-create-org` skill to provision a temporary org, then continue here with its org id as the deployment. |
| None, but Axiom MCP is connected | Ask once: create an API token in that org and add it to `~/.axiom.toml`, or use a new temporary org. For a new dataset the token needs dataset create, ingest, and query permissions. MCP alone cannot ingest. |
| One | Use it. Say which org you are writing to before you write. |
| Several | Ask once: which deployment, or a new temporary org. |

If the user named an org or deployment, use it and skip the table.

Load the deployment without printing the token:

```bash
cfg() { awk -F'"' -v d="[deployments.$1]" -v k="$2" '$0==d{f=1;next} /^\[/{f=0} f&&$1~"^"k" *= *$"{print $2}' ~/.axiom.toml; }
d=<deployment>; url=$(cfg "$d" url); token=$(cfg "$d" token); org=$(cfg "$d" org_id)
H=(-sS -H "Authorization: Bearer $token" -H "X-Axiom-Org-Id: $org")
```

## 2. Create the dataset

Names use letters, digits, `-`, `_`, and `.`. Pick a name from the task if the user gave none.

```bash
edge=$(curl "${H[@]}" -H 'Content-Type: application/json' -X POST "$url/v2/datasets" \
  -d '{"name": "<dataset>", "description": "<why>"}' | jq -r '.edgeDeploymentUrl // .message')
```

- `dataset license limit exceeded` (HTTP 400) means the org has no dataset slots left. Ask whether to reuse an existing dataset or use another org.
- `entity exists` (HTTP 409) means the name is taken. For a "new dataset" request, pick another name.
- `token does not have access to resource: datasets with action: create` (HTTP 403) means the token can't create datasets. Ask the user to create the dataset or use a token that can, or send to an existing dataset.

To send to an existing dataset, skip the create call and read its edge URL instead:

```bash
edge=$(curl "${H[@]}" "$url/v2/datasets/<dataset>" | jq -r .edgeDeploymentUrl)
```

## 3. Ingest

Send to the dataset's edge URL. Set `Content-Type` to match the data:

| Data | Content-Type |
|------|--------------|
| JSON array of objects | `application/json` |
| One JSON object per line | `application/x-ndjson` |
| CSV with a header row | `text/csv` |

```bash
curl "${H[@]}" -H 'Content-Type: application/x-ndjson' -X POST "$edge/v1/ingest/<dataset>" \
  --data-binary @events.ndjson | jq '{ingested, failed, failures}'
```

- `_time` sets each event's timestamp. Without it, Axiom uses the ingest time.
- Any `failed` count above 0 needs fixing; `failures` says why.

## 4. Confirm

```bash
curl "${H[@]}" -H 'Content-Type: application/json' -X POST "$edge/v1/query/_apl?format=tabular" \
  -d "{\"apl\": \"['<dataset>'] | count\"}" | jq '.tables[0].columns'
```

New events can take a few seconds to show up. If the query returns HTTP 403, the token can't query; report the `ingested` count from step 3 instead. Report the org, dataset, and event count. If the org is temporary, also give the claim URL and expiry as `axiom-create-org` describes.
