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

Crear carga de tabla de referencia

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

Descripción general

Crear una carga de tablas de referencia para la ingesta masiva de datos

Solicitud

Body Data (required)

Campo
Type
Descripción
data
object

Solicitud de creación de una carga de un archivo que se ingerirá en una tabla de referencia.

Respuesta

Created

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

Campo
Type
Descripción
data
object

Upload ID and attributes of the created upload.

Ejemplo de código

# 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