---
title: "Get Fields from Dataset (v1.2)"
method: GET
path: "/api/v1_2/datasets/{datasetName}/fields"
tags: ["Datasets", "Public API"]
---

# Get Fields from Dataset (v1.2)

`GET /api/v1_2/datasets/{datasetName}/fields`

Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via "Get Data from Dataset (v2)". Use "List Datasets (v1.2)" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side.

The `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other.

For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list.

Note: Compared to "Get Fields from Dataset (v1)", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header.

OAuth Scopes: report

## Path parameters

- `datasetName` string, required

## Query parameters

- `page` integer
- `page_size` integer

## Response `200`

Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.

- DatasetFieldsResponse
  - `pagination` Pagination
    - `total_records` integer
    - `current_page` integer
    - `total_pages` integer
    - `next_page` string, nullable
    - `prev_page` string, nullable
  - `name` string — Machine-readable dataset identifier matching the requested datasetName.
  - `label` string — Human-readable display name for the dataset.
  - `fields` Field[] — Paginated array of field descriptors for this dataset.
    - `name` string — Machine-readable field identifier. Use this value in the `fields` array when querying data.
    - `label` string — Human-readable display name for the field.
    - `parentType` string — The type of the parent section (e.g. `page`, `table`).
    - `parentName` string — The name of the parent section this field belongs to.
    - `entityName` string — The entity name for the field, used in `showHistory` when querying historical table fields.

## Other responses

- `403` — Insufficient permissions to access dataset fields. Uses RFC 7807 problem+json.
- `422` — The specified dataset name was not found. The `code` field is `DATASET_NOT_FOUND`.
- `500` — Internal server error while fetching the dataset configuration.

---

[API](https://skmtc.net/bamboohr/apis/bamboohr-api.md) · [All operations](https://skmtc.net/bamboohr/apis/bamboohr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bamboohr/bamboohr-api/revisions/19ebf391a399/schema)
