---
title: "Batch rows query"
method: POST
path: "/api/v2/reference-tables/queries/batch-rows"
tags: ["Reference Tables"]
---

# Batch rows query

`POST /api/v2/reference-tables/queries/batch-rows`

Batch query reference table rows by their primary key values.  Returns only found rows in the included array.

## Request body

- BatchRowsQueryRequest — Request object for querying multiple rows from a reference table by their identifiers.
  - `data` BatchRowsQueryRequestData — Data object for a batch rows query request.
    - `attributes` BatchRowsQueryRequestDataAttributes — Attributes for a batch rows query request.
      - `row_ids` string[], required — List of row identifiers to query from the reference table.
      - `table_id` string, required — Unique identifier of the reference table to query.
    - `type` 'reference-tables-batch-rows-query', required — Resource type identifier for batch queries of reference table rows.

## Response `200`

Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section.

- BatchRowsQueryResponse — Response object for a batch rows query against a reference table.
  - `data` BatchRowsQueryResponseData — Data object for a batch rows query response.
    - `id` string — Unique identifier of the batch query.
    - `relationships` BatchRowsQueryResponseDataRelationships — Relationships of the batch rows query response data.
      - `rows` BatchRowsQueryResponseDataRelationshipsRows — Relationship data containing the list of matching rows.
        - `data` TableRowResourceIdentifier[]
          - `id` string, required — The primary key value that uniquely identifies the row to delete.
          - `type` 'row', required — Row resource type.
    - `type` 'reference-tables-batch-rows-query', required — Resource type identifier for batch queries of reference table rows.
  - `included` TableRowResourceData[] — Full row resources matching the query, included alongside the relationship references in `data`.
    - `attributes` TableRowResourceDataAttributes — Column values for this row in the reference table.
      - `values` object — Key-value pairs representing the row data, where keys are field names from the schema.
    - `id` string — Row identifier, corresponding to the primary key value.
    - `type` 'row', required — Row resource type.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/versions/da68bf029e4c/schema)
