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/actions-datastores/update-datastore-item.md. A documentation index is available at /llms.txt.
Language
Datadog site

Actualizar elemento del almacén de datos

PATCHhttps://api.datadoghq.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.us3.datadoghq.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.us5.datadoghq.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.datadoghq.eu/api/v2/actions-datastores/{datastore_id}/itemshttps://api.ap1.datadoghq.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.ap2.datadoghq.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.uk1.datadoghq.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.ddog-gov.com/api/v2/actions-datastores/{datastore_id}/itemshttps://api.us2.ddog-gov.com/api/v2/actions-datastores/{datastore_id}/items

Descripción general

Actualiza parcialmente un elemento de un almacén de datos por su clave.

This endpoint requires the apps_datastore_write permission.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
datastore_id [required]
string

The unique identifier of the datastore to retrieve.

Solicitud

Body Data (required)

Campo
Type
Descripción
data
object

Solicitud para actualizar campos específicos en un elemento existente del almacén de datos.

Respuesta

OK

A single datastore item with its content and metadata.

Campo
Type
Descripción
data
object

Core data and metadata for a single datastore item.

Ejemplo de código

Update datastore item returns "OK" response
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF
# Path parameters
export datastore_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/actions-datastores/${datastore_id}/items" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "item_changes": {},
      "item_key": "test-key"
    },
    "type": "items"
  }
}
EOF