Reference Tables

View and manage Reference Tables in your organization.

POST https://api.ap1.datadoghq.com/api/v2/reference-tables/uploadshttps://api.ap2.datadoghq.com/api/v2/reference-tables/uploadshttps://api.datadoghq.eu/api/v2/reference-tables/uploadshttps://api.ddog-gov.com/api/v2/reference-tables/uploadshttps://api.datadoghq.com/api/v2/reference-tables/uploadshttps://api.us3.datadoghq.com/api/v2/reference-tables/uploadshttps://api.us5.datadoghq.com/api/v2/reference-tables/uploads

概要

Create a reference table upload for bulk data ingestion

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data

object

Request data for creating an upload for a file to be ingested into a reference table.

attributes

object

Upload configuration specifying how data is uploaded by the user, and properties of the table to associate the upload with.

headers [required]

[string]

The CSV file headers that define the schema fields, provided in the same order as the columns in the uploaded file.

part_count [required]

int32

Number of parts to split the file into for multipart upload.

part_size [required]

int64

The size of each part in the upload in bytes. All parts except the last one must be at least 5,000,000 bytes.

table_name [required]

string

Name of the table to associate with this upload.

type [required]

enum

Upload resource type. Allowed enum values: upload

default: upload

{   "data": {     "attributes": {       "headers": [         "field_1",         "field_2"       ],       "part_count": 3,       "part_size": 10000000,       "table_name": ""     },     "type": "upload"   } }

応答

Created

Information about the upload created containing the upload ID and pre-signed URLs to PUT chunks of the CSV file to.

Expand All

フィールド

種類

説明

data

object

Upload ID and attributes of the created upload.

attributes

object

Pre-signed URLs for uploading parts of the file.

part_urls

[string]

The pre-signed URLs for uploading parts. These URLs expire after 5 minutes.

id

string

Unique identifier for this upload. Use this ID when creating the reference table.

type [required]

enum

Upload resource type. Allowed enum values: upload

default: upload

{   "data": {     "attributes": {       "part_urls": []     },     "id": "string",     "type": "upload"   } }

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/uploads" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "headers": [ "field_1", "field_2" ], "part_count": 3, "part_size": 10000000, "table_name": "" }, "type": "upload" } } EOF

POST https://api.ap1.datadoghq.com/api/v2/reference-tables/tableshttps://api.ap2.datadoghq.com/api/v2/reference-tables/tableshttps://api.datadoghq.eu/api/v2/reference-tables/tableshttps://api.ddog-gov.com/api/v2/reference-tables/tableshttps://api.datadoghq.com/api/v2/reference-tables/tableshttps://api.us3.datadoghq.com/api/v2/reference-tables/tableshttps://api.us5.datadoghq.com/api/v2/reference-tables/tables

概要

Creates a reference table. You can provide data in two ways:

  1. Call POST /api/v2/reference-tables/upload to get an upload ID. Then, PUT the CSV data (not the file itself) in chunks to each URL in the request body. Finally, call this POST endpoint with upload_id in file_metadata.
  2. Provide access_details in file_metadata pointing to a CSV file in cloud storage.

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data

object

The data object containing the table definition.

attributes

object

Attributes that define the reference table's configuration and properties.

description

string

Optional text describing the purpose or contents of this reference table.

file_metadata

 <oneOf>

Metadata specifying where and how to access the reference table's data file.

Option 1

object

Cloud storage file metadata for create requests. Both access_details and sync_enabled are required.

access_details [required]

object

Cloud storage access configuration for the reference table data file.

aws_detail

object

Amazon Web Services S3 storage access configuration.

aws_account_id [required]

string

AWS account ID where the S3 bucket is located.

aws_bucket_name [required]

string

S3 bucket containing the CSV file.

file_path [required]

string

The relative file path from the S3 bucket root to the CSV file.

azure_detail

object

Azure Blob Storage access configuration.

azure_client_id [required]

string

Azure service principal (application) client ID with permissions to read from the container.

azure_container_name [required]

string

Azure Blob Storage container containing the CSV file.

azure_storage_account_name [required]

string

Azure storage account where the container is located.

azure_tenant_id [required]

string

Azure Active Directory tenant ID.

file_path [required]

string

The relative file path from the Azure container root to the CSV file.

gcp_detail

object

Google Cloud Platform storage access configuration.

file_path [required]

string

The relative file path from the GCS bucket root to the CSV file.

gcp_bucket_name [required]

string

GCP bucket containing the CSV file.

gcp_project_id [required]

string

GCP project ID where the bucket is located.

gcp_service_account_email [required]

string

Service account email with read permissions for the GCS bucket.

sync_enabled [required]

boolean

Whether this table is synced automatically.

Option 2

object

Local file metadata for create requests using the upload ID.

upload_id [required]

string

The upload ID.

schema [required]

object

Schema defining the structure and columns of the reference table.

fields [required]

[object]

The schema fields.

name [required]

string

The field name.

type [required]

enum

The field type for reference table schema fields. Allowed enum values: STRING,INT32

primary_keys [required]

[string]

List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows.

source [required]

enum

The source type for creating reference table data. Only these source types can be created through this API. Allowed enum values: LOCAL_FILE,S3,GCS,AZURE

table_name [required]

string

Name to identify this reference table.

tags

[string]

Tags for organizing and filtering reference tables.

type [required]

enum

Reference table resource type. Allowed enum values: reference_table

default: reference_table

{   "data": {     "attributes": {       "description": "string",       "file_metadata": {         "access_details": {           "aws_detail": {             "aws_account_id": "123456789000",             "aws_bucket_name": "example-data-bucket",             "file_path": "reference-tables/users.csv"           },           "azure_detail": {             "azure_client_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb",             "azure_container_name": "reference-data",             "azure_storage_account_name": "examplestorageaccount",             "azure_tenant_id": "cccccccc-4444-5555-6666-dddddddddddd",             "file_path": "tables/users.csv"           },           "gcp_detail": {             "file_path": "data/reference_tables/users.csv",             "gcp_bucket_name": "example-data-bucket",             "gcp_project_id": "example-gcp-project-12345",             "gcp_service_account_email": "example-service@example-gcp-project-12345.iam.gserviceaccount.com"           }         },         "sync_enabled": false       },       "schema": {         "fields": [           {             "name": "field_1",             "type": "STRING"           }         ],         "primary_keys": [           "field_1"         ]       },       "source": "LOCAL_FILE",       "table_name": "table_1",       "tags": [         "tag_1",         "tag_2"       ]     },     "type": "reference_table"   } }

応答

Created

A reference table resource containing its full configuration and state.

Expand All

フィールド

種類

説明

data

object

The data object containing the reference table configuration and state.

attributes

object

Attributes that define the reference table's configuration and properties.

created_by

string

UUID of the user who created the reference table.

description

string

Optional text describing the purpose or contents of this reference table.

file_metadata

 <oneOf>

Metadata specifying where and how to access the reference table's data file.

Option 1

object

File metadata for reference tables created by cloud storage.

access_details [required]

object

Cloud storage access configuration for the reference table data file.

aws_detail

object

Amazon Web Services S3 storage access configuration.

aws_account_id

string

AWS account ID where the S3 bucket is located.

aws_bucket_name

string

S3 bucket containing the CSV file.

file_path

string

The relative file path from the S3 bucket root to the CSV file.

azure_detail

object

Azure Blob Storage access configuration.

azure_client_id

string

Azure service principal (application) client ID with permissions to read from the container.

azure_container_name

string

Azure Blob Storage container containing the CSV file.

azure_storage_account_name

string

Azure storage account where the container is located.

azure_tenant_id

string

Azure Active Directory tenant ID.

file_path

string

The relative file path from the Azure container root to the CSV file.

gcp_detail

object

Google Cloud Platform storage access configuration.

file_path

string

The relative file path from the GCS bucket root to the CSV file.

gcp_bucket_name

string

GCP bucket containing the CSV file.

gcp_project_id

string

GCP project ID where the bucket is located.

gcp_service_account_email

string

Service account email with read permissions for the GCS bucket.

error_message

string

The error message returned from the sync.

error_row_count

int64

The number of rows that failed to sync.

error_type

enum

The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. Allowed enum values: TABLE_SCHEMA_ERROR,FILE_FORMAT_ERROR,CONFIGURATION_ERROR,QUOTA_EXCEEDED,CONFLICT_ERROR,VALIDATION_ERROR,STATE_ERROR,OPERATION_ERROR,SYSTEM_ERROR

sync_enabled

boolean

Whether this table is synced automatically.

Option 2

object

File metadata for reference tables created by upload. Note that upload_id is only returned in the immediate create/replace response and is not available in subsequent GET requests.

error_message

string

The error message returned from the creation/update.

error_row_count

int64

The number of rows that failed to create/update.

last_updated_by

string

UUID of the user who last updated the reference table.

row_count

int64

The number of successfully processed rows in the reference table.

schema

object

Schema defining the structure and columns of the reference table.

fields [required]

[object]

The schema fields.

name [required]

string

The field name.

type [required]

enum

The field type for reference table schema fields. Allowed enum values: STRING,INT32

primary_keys [required]

[string]

List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows.

source

enum

The source type for reference table data. Includes all possible source types that can appear in responses. Allowed enum values: LOCAL_FILE,S3,GCS,AZURE,SERVICENOW,SALESFORCE,DATABRICKS,SNOWFLAKE

status

string

The processing status of the table.

table_name

string

Unique name to identify this reference table. Used in enrichment processors and API calls.

tags

[string]

Tags for organizing and filtering reference tables.

updated_at

string

When the reference table was last updated, in ISO 8601 format.

id

string

Unique identifier for the reference table.

type [required]

enum

Reference table resource type. Allowed enum values: reference_table

default: reference_table

{   "data": {     "attributes": {       "created_by": "00000000-0000-0000-0000-000000000000",       "description": "example description",       "file_metadata": {         "access_details": {           "aws_detail": {             "aws_account_id": "123456789000",             "aws_bucket_name": "my-bucket",             "file_path": "path/to/file.csv"           }         },         "sync_enabled": true       },       "last_updated_by": "00000000-0000-0000-0000-000000000000",       "row_count": 5,       "schema": {         "fields": [           {             "name": "id",             "type": "INT32"           },           {             "name": "name",             "type": "STRING"           }         ],         "primary_keys": [           "id"         ]       },       "source": "S3",       "status": "DONE",       "table_name": "test_reference_table",       "tags": [         "tag1",         "tag2"       ],       "updated_at": "2000-01-01T01:00:00+00:00"     },     "id": "00000000-0000-0000-0000-000000000000",     "type": "reference_table"   } }

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "file_metadata": { "access_details": { "aws_detail": { "aws_account_id": "123456789000", "aws_bucket_name": "example-data-bucket", "file_path": "reference-tables/users.csv" }, "azure_detail": { "azure_client_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "azure_container_name": "reference-data", "azure_storage_account_name": "examplestorageaccount", "azure_tenant_id": "cccccccc-4444-5555-6666-dddddddddddd", "file_path": "tables/users.csv" }, "gcp_detail": { "file_path": "data/reference_tables/users.csv", "gcp_bucket_name": "example-data-bucket", "gcp_project_id": "example-gcp-project-12345", "gcp_service_account_email": "example-service@example-gcp-project-12345.iam.gserviceaccount.com" } } }, "schema": { "fields": [ { "name": "field_1", "type": "STRING" } ], "primary_keys": [ "field_1" ] }, "source": "LOCAL_FILE", "table_name": "table_1" }, "type": "reference_table" } } EOF

GET https://api.ap1.datadoghq.com/api/v2/reference-tables/tableshttps://api.ap2.datadoghq.com/api/v2/reference-tables/tableshttps://api.datadoghq.eu/api/v2/reference-tables/tableshttps://api.ddog-gov.com/api/v2/reference-tables/tableshttps://api.datadoghq.com/api/v2/reference-tables/tableshttps://api.us3.datadoghq.com/api/v2/reference-tables/tableshttps://api.us5.datadoghq.com/api/v2/reference-tables/tables

概要

List all reference tables in this organization.

引数

クエリ文字列

名前

種類

説明

page[limit]

integer

Number of tables to return.

page[offset]

integer

Number of tables to skip for pagination.

sort

enum

Sort field and direction for the list of reference tables. Use field name for ascending, prefix with “-” for descending.
Allowed enum values: updated_at, table_name, status, -updated_at, -table_name, -status

filter[status]

string

Filter by table status.

filter[table_name][exact]

string

Filter by exact table name match.

filter[table_name][contains]

string

Filter by table name containing substring.

応答

OK

List of reference tables.

Expand All

フィールド

種類

説明

data [required]

[object]

The reference tables.

attributes

object

Attributes that define the reference table's configuration and properties.

created_by

string

UUID of the user who created the reference table.

description

string

Optional text describing the purpose or contents of this reference table.

file_metadata

 <oneOf>

Metadata specifying where and how to access the reference table's data file.

Option 1

object

File metadata for reference tables created by cloud storage.

access_details [required]

object

Cloud storage access configuration for the reference table data file.

aws_detail

object

Amazon Web Services S3 storage access configuration.

aws_account_id

string

AWS account ID where the S3 bucket is located.

aws_bucket_name

string

S3 bucket containing the CSV file.

file_path

string

The relative file path from the S3 bucket root to the CSV file.

azure_detail

object

Azure Blob Storage access configuration.

azure_client_id

string

Azure service principal (application) client ID with permissions to read from the container.

azure_container_name

string

Azure Blob Storage container containing the CSV file.

azure_storage_account_name

string

Azure storage account where the container is located.

azure_tenant_id

string

Azure Active Directory tenant ID.

file_path

string

The relative file path from the Azure container root to the CSV file.

gcp_detail

object

Google Cloud Platform storage access configuration.

file_path

string

The relative file path from the GCS bucket root to the CSV file.

gcp_bucket_name

string

GCP bucket containing the CSV file.

gcp_project_id

string

GCP project ID where the bucket is located.

gcp_service_account_email

string

Service account email with read permissions for the GCS bucket.

error_message

string

The error message returned from the sync.

error_row_count

int64

The number of rows that failed to sync.

error_type

enum

The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. Allowed enum values: TABLE_SCHEMA_ERROR,FILE_FORMAT_ERROR,CONFIGURATION_ERROR,QUOTA_EXCEEDED,CONFLICT_ERROR,VALIDATION_ERROR,STATE_ERROR,OPERATION_ERROR,SYSTEM_ERROR

sync_enabled

boolean

Whether this table is synced automatically.

Option 2

object

File metadata for reference tables created by upload. Note that upload_id is only returned in the immediate create/replace response and is not available in subsequent GET requests.

error_message

string

The error message returned from the creation/update.

error_row_count

int64

The number of rows that failed to create/update.

last_updated_by

string

UUID of the user who last updated the reference table.

row_count

int64

The number of successfully processed rows in the reference table.

schema

object

Schema defining the structure and columns of the reference table.

fields [required]

[object]

The schema fields.

name [required]

string

The field name.

type [required]

enum

The field type for reference table schema fields. Allowed enum values: STRING,INT32

primary_keys [required]

[string]

List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows.

source

enum

The source type for reference table data. Includes all possible source types that can appear in responses. Allowed enum values: LOCAL_FILE,S3,GCS,AZURE,SERVICENOW,SALESFORCE,DATABRICKS,SNOWFLAKE

status

string

The processing status of the table.

table_name

string

Unique name to identify this reference table. Used in enrichment processors and API calls.

tags

[string]

Tags for organizing and filtering reference tables.

updated_at

string

When the reference table was last updated, in ISO 8601 format.

id

string

Unique identifier for the reference table.

type [required]

enum

Reference table resource type. Allowed enum values: reference_table

default: reference_table

{   "data": [     {       "attributes": {         "created_by": "00000000-0000-0000-0000-000000000000",         "description": "example description",         "file_metadata": {           "access_details": {},           "error_message": "",           "error_row_count": 0,           "upload_id": "00000000-0000-0000-0000-000000000000"         },         "last_updated_by": "",         "row_count": 5,         "schema": {           "fields": [             {               "name": "id",               "type": "INT32"             },             {               "name": "name",               "type": "STRING"             }           ],           "primary_keys": [             "id"           ]         },         "source": "LOCAL_FILE",         "status": "DONE",         "table_name": "test_reference_table",         "tags": [           "tag1",           "tag2"         ],         "updated_at": "2000-01-01T01:00:00+00:00"       },       "id": "00000000-0000-0000-0000-000000000000",       "type": "reference_table"     },     {       "attributes": {         "created_by": "00000000-0000-0000-0000-000000000000",         "description": "example description",         "file_metadata": {           "access_details": {             "aws_detail": {               "aws_account_id": "test-account-id",               "aws_bucket_name": "test-bucket",               "file_path": "test_rt.csv"             }           },           "error_message": "",           "error_row_count": 0,           "sync_enabled": true         },         "last_updated_by": "00000000-0000-0000-0000-000000000000",         "row_count": 5,         "schema": {           "fields": [             {               "name": "location",               "type": "STRING"             },             {               "name": "file_name",               "type": "STRING"             }           ],           "primary_keys": [             "location"           ]         },         "source": "S3",         "status": "DONE",         "table_name": "test_reference_table_2",         "tags": [           "test_tag1",           "tag2",           "3"         ],         "updated_at": "2000-01-01T01:00:00+00:00"       },       "id": "00000000-0000-0000-0000-000000000000",       "type": "reference_table"     }   ] }

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

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

概要

Get a reference table by ID

引数

パスパラメーター

名前

種類

説明

id [required]

string

Unique identifier of the reference table to retrieve

応答

OK

A reference table resource containing its full configuration and state.

Expand All

フィールド

種類

説明

data

object

The data object containing the reference table configuration and state.

attributes

object

Attributes that define the reference table's configuration and properties.

created_by

string

UUID of the user who created the reference table.

description

string

Optional text describing the purpose or contents of this reference table.

file_metadata

 <oneOf>

Metadata specifying where and how to access the reference table's data file.

Option 1

object

File metadata for reference tables created by cloud storage.

access_details [required]

object

Cloud storage access configuration for the reference table data file.

aws_detail

object

Amazon Web Services S3 storage access configuration.

aws_account_id

string

AWS account ID where the S3 bucket is located.

aws_bucket_name

string

S3 bucket containing the CSV file.

file_path

string

The relative file path from the S3 bucket root to the CSV file.

azure_detail

object

Azure Blob Storage access configuration.

azure_client_id

string

Azure service principal (application) client ID with permissions to read from the container.

azure_container_name

string

Azure Blob Storage container containing the CSV file.

azure_storage_account_name

string

Azure storage account where the container is located.

azure_tenant_id

string

Azure Active Directory tenant ID.

file_path

string

The relative file path from the Azure container root to the CSV file.

gcp_detail

object

Google Cloud Platform storage access configuration.

file_path

string

The relative file path from the GCS bucket root to the CSV file.

gcp_bucket_name

string

GCP bucket containing the CSV file.

gcp_project_id

string

GCP project ID where the bucket is located.

gcp_service_account_email

string

Service account email with read permissions for the GCS bucket.

error_message

string

The error message returned from the sync.

error_row_count

int64

The number of rows that failed to sync.

error_type

enum

The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. Allowed enum values: TABLE_SCHEMA_ERROR,FILE_FORMAT_ERROR,CONFIGURATION_ERROR,QUOTA_EXCEEDED,CONFLICT_ERROR,VALIDATION_ERROR,STATE_ERROR,OPERATION_ERROR,SYSTEM_ERROR

sync_enabled

boolean

Whether this table is synced automatically.

Option 2

object

File metadata for reference tables created by upload. Note that upload_id is only returned in the immediate create/replace response and is not available in subsequent GET requests.

error_message

string

The error message returned from the creation/update.

error_row_count

int64

The number of rows that failed to create/update.

last_updated_by

string

UUID of the user who last updated the reference table.

row_count

int64

The number of successfully processed rows in the reference table.

schema

object

Schema defining the structure and columns of the reference table.

fields [required]

[object]

The schema fields.

name [required]

string

The field name.

type [required]

enum

The field type for reference table schema fields. Allowed enum values: STRING,INT32

primary_keys [required]

[string]

List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows.

source

enum

The source type for reference table data. Includes all possible source types that can appear in responses. Allowed enum values: LOCAL_FILE,S3,GCS,AZURE,SERVICENOW,SALESFORCE,DATABRICKS,SNOWFLAKE

status

string

The processing status of the table.

table_name

string

Unique name to identify this reference table. Used in enrichment processors and API calls.

tags

[string]

Tags for organizing and filtering reference tables.

updated_at

string

When the reference table was last updated, in ISO 8601 format.

id

string

Unique identifier for the reference table.

type [required]

enum

Reference table resource type. Allowed enum values: reference_table

default: reference_table

{   "data": {     "attributes": {       "created_by": "00000000-0000-0000-0000-000000000000",       "description": "example description",       "file_metadata": {         "access_details": {           "aws_detail": {             "aws_account_id": "123456789000",             "aws_bucket_name": "my-bucket",             "file_path": "path/to/file.csv"           }         },         "sync_enabled": true       },       "last_updated_by": "00000000-0000-0000-0000-000000000000",       "row_count": 5,       "schema": {         "fields": [           {             "name": "id",             "type": "INT32"           },           {             "name": "name",             "type": "STRING"           }         ],         "primary_keys": [           "id"         ]       },       "source": "S3",       "status": "DONE",       "table_name": "test_reference_table",       "tags": [         "tag1",         "tag2"       ],       "updated_at": "2000-01-01T01:00:00+00:00"     },     "id": "00000000-0000-0000-0000-000000000000",     "type": "reference_table"   } }

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # Path parameters
export id="CHANGE_ME"
# 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables/${id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

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

概要

Get reference table rows by their primary key values.

引数

パスパラメーター

名前

種類

説明

id [required]

string

Unique identifier of the reference table to get rows from

クエリ文字列

名前

種類

説明

row_id [required]

array

List of row IDs (primary key values) to retrieve from the reference table.

応答

Some or all requested rows were found.

List of rows from a reference table query.

Expand All

フィールド

種類

説明

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

{   "data": [     {       "attributes": {         "values": {}       },       "id": "string",       "type": "row"     }   ] }

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # Path parameters
export id="table-123"
# Required query arguments
export row_id="[row1 row2]"
# 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables/${id}/rows?row_id=${row_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

PATCH https://api.ap1.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.ap2.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.datadoghq.eu/api/v2/reference-tables/tables/{id}https://api.ddog-gov.com/api/v2/reference-tables/tables/{id}https://api.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.us3.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.us5.datadoghq.com/api/v2/reference-tables/tables/{id}

概要

Update a reference table by ID. You can update the table’s data, description, and tags. Note: The source type cannot be changed after table creation. For data updates: For existing tables of type source:LOCAL_FILE, call POST api/v2/reference-tables/uploads first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint with the upload_id in file_metadata. For existing tables with source: types of S3, GCS, or AZURE, provide updated access_details in file_metadata pointing to a CSV file in the same type of cloud storage.

引数

パスパラメーター

名前

種類

説明

id [required]

string

Unique identifier of the reference table to update

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data

object

The data object containing the partial table definition updates.

attributes

object

Attributes that define the updates to the reference table's configuration and properties.

description

string

Optional text describing the purpose or contents of this reference table.

file_metadata

 <oneOf>

Metadata specifying where and how to access the reference table's data file.

Option 1

object

Cloud storage file metadata for patch requests. Allows partial updates of access_details and sync_enabled.

access_details

object

Cloud storage access configuration for the reference table data file.

aws_detail

object

Amazon Web Services S3 storage access configuration.

aws_account_id

string

AWS account ID where the S3 bucket is located.

aws_bucket_name

string

S3 bucket containing the CSV file.

file_path

string

The relative file path from the S3 bucket root to the CSV file.

azure_detail

object

Azure Blob Storage access configuration.

azure_client_id

string

Azure service principal (application) client ID with permissions to read from the container.

azure_container_name

string

Azure Blob Storage container containing the CSV file.

azure_storage_account_name

string

Azure storage account where the container is located.

azure_tenant_id

string

Azure Active Directory tenant ID.

file_path

string

The relative file path from the Azure container root to the CSV file.

gcp_detail

object

Google Cloud Platform storage access configuration.

file_path

string

The relative file path from the GCS bucket root to the CSV file.

gcp_bucket_name

string

GCP bucket containing the CSV file.

gcp_project_id

string

GCP project ID where the bucket is located.

gcp_service_account_email

string

Service account email with read permissions for the GCS bucket.

sync_enabled

boolean

Whether this table is synced automatically.

Option 2

object

Local file metadata for patch requests using upload ID.

upload_id [required]

string

The upload ID.

schema

object

Schema defining the updates to the structure and columns of the reference table. Schema fields cannot be deleted or renamed.

fields [required]

[object]

The schema fields.

name [required]

string

The field name.

type [required]

enum

The field type for reference table schema fields. Allowed enum values: STRING,INT32

primary_keys [required]

[string]

List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. Primary keys cannot be changed after table creation.

sync_enabled

boolean

Whether this table is synced automatically.

tags

[string]

Tags for organizing and filtering reference tables.

type [required]

enum

Reference table resource type. Allowed enum values: reference_table

default: reference_table

{   "data": {     "attributes": {       "description": "example description",       "file_metadata": {         "access_details": {           "aws_detail": {             "aws_account_id": "123456789000",             "aws_bucket_name": "example-data-bucket",             "file_path": "reference-tables/users.csv"           },           "azure_detail": {             "azure_client_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb",             "azure_container_name": "reference-data",             "azure_storage_account_name": "examplestorageaccount",             "azure_tenant_id": "cccccccc-4444-5555-6666-dddddddddddd",             "file_path": "tables/users.csv"           },           "gcp_detail": {             "file_path": "data/reference_tables/users.csv",             "gcp_bucket_name": "example-data-bucket",             "gcp_project_id": "example-gcp-project-12345",             "gcp_service_account_email": "example-service@example-gcp-project-12345.iam.gserviceaccount.com"           }         },         "sync_enabled": false       },       "schema": {         "fields": [           {             "name": "field_1",             "type": "STRING"           }         ],         "primary_keys": [           "field_1"         ]       },       "sync_enabled": false,       "tags": [         "tag_1",         "tag_2"       ]     },     "type": "reference_table"   } }

応答

OK

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # Path parameters
export id="CHANGE_ME"
# Curl command
curl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables/${id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "schema": { "fields": [ { "name": "field_1", "type": "STRING" } ], "primary_keys": [ "field_1" ] } }, "type": "reference_table" } } EOF

DELETE https://api.ap1.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.ap2.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.datadoghq.eu/api/v2/reference-tables/tables/{id}https://api.ddog-gov.com/api/v2/reference-tables/tables/{id}https://api.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.us3.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.us5.datadoghq.com/api/v2/reference-tables/tables/{id}

概要

Delete a reference table by ID

引数

パスパラメーター

名前

種類

説明

id [required]

string

Unique identifier of the reference table to delete

応答

OK

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                   # Path parameters
export id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/reference-tables/tables/${id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"