---
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`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/reference-tables/queries/batch-rows`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`

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.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
