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/update-reference-table.md. A documentation index is available at /llms.txt.
Language
Datadog site

Actualizar la tabla de referencia

PATCHhttps://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}https://api.datadoghq.eu/api/v2/reference-tables/tables/{id}https://api.ap1.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.ap2.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.uk1.datadoghq.com/api/v2/reference-tables/tables/{id}https://api.ddog-gov.com/api/v2/reference-tables/tables/{id}https://api.us2.ddog-gov.com/api/v2/reference-tables/tables/{id}

Descripción general

Actualiza una tabla de referencia por ID. Puedes actualizar los datos, la descripción y las etiquetas de la tabla. Nota: El tipo de fuente no puede modificarse tras la creación de la tabla. Para actualizar datos: para tablas existentes de tipo source:LOCAL_FILE, llama primero a POST api/v2/reference-tables/uploads para obtener un ID de carga, luego a PUT de partes de datos CSV a cada URL proporcionada, y finalmente llama a este endpoint PATCH con el upload_id en file_metadata. Para las tablas existentes con tipos source: de S3, GCS, o AZURE, proporciona access_details actualizados en file_metadata apuntando a un archivo CSV en el mismo tipo de almacenamiento en la nube.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
id [required]
string

Unique identifier of the reference table to update

Solicitud

Body Data (required)

Campo
Type
Descripción
data
object

Cuerpo de la solicitud de actualización de una tabla de referencia existente.

Respuesta

OK

Ejemplo de código

Actualizar la tabla de referencia
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF
# Path parameters
export id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reference-tables/tables/${id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "this is a cloud table generated via a cloud bucket sync",
      "file_metadata": {
        "access_details": {
          "aws_detail": {
            "aws_account_id": "test-account-id",
            "aws_bucket_name": "test-bucket",
            "file_path": "test_rt.csv"
          }
        },
        "sync_enabled": true
      },
      "schema": {
        "fields": [
          {
            "name": "id",
            "type": "INT32"
          },
          {
            "name": "name",
            "type": "STRING"
          }
        ],
        "primary_keys": [
          "id"
        ]
      },
      "tags": [
        "test_tag"
      ]
    },
    "type": "reference_table"
  }
}
EOF