For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/reference-tables/create-reference-table-upload.md. A documentation index is available at /llms.txt.
Language
Datadog site

Create reference table upload

POSThttps://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/uploadshttps://api.datadoghq.eu/api/v2/reference-tables/uploadshttps://api.ap1.datadoghq.com/api/v2/reference-tables/uploadshttps://api.ap2.datadoghq.com/api/v2/reference-tables/uploadshttps://api.uk1.datadoghq.com/api/v2/reference-tables/uploadshttps://api.ddog-gov.com/api/v2/reference-tables/uploadshttps://api.us2.ddog-gov.com/api/v2/reference-tables/uploads

Overview

Create a reference table upload for bulk data ingestion

Request

Body Data (required)

Field
Type
Description
data
object

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

Response

Created

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

Field
Type
Description
data
object

Upload ID and attributes of the created upload.

Code Example

Create reference table upload
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/reference-tables/uploads" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "headers": [
        "product_id",
        "product_name",
        "price"
      ],
      "part_count": 3,
      "part_size": 10000000,
      "table_name": "my_products_table"
    },
    "type": "upload"
  }
}
EOF