> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Get dataset field

> Retrieves one dataset field definition.

`axiom.getDatasetField` retrieves one dataset field definition. The result includes its type, visibility, description, and unit.

```ts automations/axiom-get-dataset-field.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Get dataset field", () => {
  onHttpRequest({ scope: "automation" })
  axiom.getDatasetField({
    datasetName: "production",
    fieldName: "service.name",
  })
})
```

## Inputs

`datasetName` selects an events, logs, or traces dataset by name or ID. `fieldName` selects one non-empty field name.

## Output

Returns the field's `name` and `type`, with `hidden`, `description`, and `unit` when configured.

## Permission and failures

The API token needs the organization-level `datasets|read` capability and access to the target dataset. Axiom returns an error when the dataset or field is missing or inaccessible.
