---
title: "Update datastore item"
method: PATCH
path: "/api/v2/actions-datastores/{datastore_id}/items"
tags: ["Actions Datastores"]
---

# Update datastore item

`PATCH /api/v2/actions-datastores/{datastore_id}/items`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/actions-datastores/{datastore_id}/items`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Partially updates an item in a datastore by its key.

## Path parameters

- `datastore_id` string, required

## Request body

- UpdateAppsDatastoreItemRequest: Request to update specific fields on an existing datastore item.
  - `data` UpdateAppsDatastoreItemRequestData: Data wrapper containing the item identifier and the changes to apply during the update operation.
    - `attributes` UpdateAppsDatastoreItemRequestDataAttributes: Attributes for updating a datastore item, including the item key and changes to apply.
      - `id` string: The unique identifier of the item being updated.
      - `item_changes` UpdateAppsDatastoreItemRequestDataAttributesItemChanges, required: Changes to apply to a datastore item using set operations.
        - `ops_set` object: Set operation that contains key-value pairs to set on the datastore item.
      - `item_key` string, required: The primary key that identifies the item to update. Cannot exceed 256 characters.
    - `id` string: The unique identifier of the datastore item.
    - `type` 'items', required: The resource type for datastore items.

## Response `200`

OK

- ItemApiPayload: A single datastore item with its content and metadata.
  - `data` ItemApiPayloadData: Core data and metadata for a single datastore item.
    - `attributes` ItemApiPayloadDataAttributes: Metadata and content of a datastore item.
      - `created_at` string, date-time: Timestamp when the item was first created.
      - `modified_at` string, date-time: Timestamp when the item was last modified.
      - `org_id` integer: The ID of the organization that owns this item.
      - `primary_column_name` string: The name of the primary key column for this datastore. Primary column names: - Must abide by both [PostgreSQL naming conventions](https://www.postgresql.org/docs/7.0/syntax525.htm) - Cannot exceed 63 characters
      - `signature` string: A unique signature identifying this item version.
      - `store_id` string: The unique identifier of the datastore containing this item.
      - `value` ItemApiPayloadDataAttributesValue: The data content (as key-value pairs) of a datastore item.
    - `id` string: The unique identifier of the datastore.
    - `type` 'items', required: The resource type for datastore items.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
