For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/api/latest/reference-tables/list-rows.md. A documentation index is available at /llms.txt.

GET https://api.ap1.datadoghq.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.ap2.datadoghq.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.datadoghq.eu/api/v2/reference-tables/tables/{id}/rows/listhttps://api.ddog-gov.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.us2.ddog-gov.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.uk1.datadoghq.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.datadoghq.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.us3.datadoghq.com/api/v2/reference-tables/tables/{id}/rows/listhttps://api.us5.datadoghq.com/api/v2/reference-tables/tables/{id}/rows/list

Overview

List all rows in a reference table using cursor-based pagination. Pass the page[continuation_token] from the previous response to fetch the next page on the same consistent snapshot. Returns 400 for tables with more than 10,000,000 rows.

Arguments

Path Parameters

Name

Type

Description

id [required]

string

Unique identifier of the reference table to list rows from.

Query Strings

Name

Type

Description

page[limit]

integer

Number of rows to return per page. Defaults to 100, maximum is 1000.

page[continuation_token]

string

Opaque cursor from the previous response’s next link. Pass this to retrieve the next page on the same consistent snapshot.

Response

OK

Paginated list of reference table rows.

Expand All

Field

Type

Description

data [required]

[object]

The rows.

attributes

object

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 [required]

enum

Row resource type. Allowed enum values: row

default: row

links [required]

object

Pagination links for the list rows response.

first [required]

string

Link to the first page of results.

next

string

Link to the next page of results. Only present when more rows are available.

self [required]

string

Link to the current page of results.

meta

object

Contains pagination details, including the continuation token for fetching additional rows.

page

object

Contains the continuation token for navigating to the next page of rows.

next_continuation_token

string

Opaque token to pass as the page[continuation_token] query parameter to fetch the next page of results. Only present when more rows are available.

{
  "data": [
    {
      "attributes": {
        "values": {
          "category": "tor",
          "intention": "suspicious",
          "ip_address": "102.130.113.9"
        }
      },
      "id": "102.130.113.9",
      "type": "row"
    }
  ],
  "links": {
    "first": "/api/v2/reference-tables/tables/<TABLE_ID>/rows/list?page[limit]=100",
    "self": "/api/v2/reference-tables/tables/<TABLE_ID>/rows/list?page[continuation_token]=<CONTINUATION_TOKEN>"
  },
  "meta": {
    "page": {
      "next_continuation_token": "eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ=="
    }
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Path parameters
export id="00000000-0000-0000-0000-000000000000"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables/${id}/rows/list" \ -H "Accept: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}"
"""
List rows returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
    api_instance = ReferenceTablesApi(api_client)
    response = api_instance.list_reference_table_rows(
        id="id",
    )

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
# List rows returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::ReferenceTablesAPI.new
p api_instance.list_reference_table_rows("id")

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
// List rows returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewReferenceTablesApi(apiClient)
	resp, r, err := api.ListReferenceTableRows(ctx, "id", *datadogV2.NewListReferenceTableRowsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ReferenceTablesApi.ListReferenceTableRows`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `ReferenceTablesApi.ListReferenceTableRows`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"
// List rows returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ReferenceTablesApi;
import com.datadog.api.client.v2.model.ListRowsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
    ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);

    try {
      ListRowsResponse result =
          apiInstance.listReferenceTableRows("00000000-0000-0000-0000-000000000000");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ReferenceTablesApi#listReferenceTableRows");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"
// List rows returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_reference_tables::ListReferenceTableRowsOptionalParams;
use datadog_api_client::datadogV2::api_reference_tables::ReferenceTablesAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = ReferenceTablesAPI::with_config(configuration);
    let resp = api
        .list_reference_table_rows(
            "id".to_string(),
            ListReferenceTableRowsOptionalParams::default(),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * List rows returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration({
  authMethods: {
    AuthZ: {
      accessToken: process.env.DD_BEARER_TOKEN as string,
    },
  },
});
const apiInstance = new v2.ReferenceTablesApi(configuration);

const params: v2.ReferenceTablesApiListReferenceTableRowsRequest = {
  id: "id",
};

apiInstance
  .listReferenceTableRows(params)
  .then((data: v2.ListRowsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"