Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6553,6 +6553,46 @@ components:
description: The type of the object, must be `budget`.
type: string
type: object
BulkDeleteAppsDatastoreItemsRequest:
description: Request to delete items from a datastore.
properties:
data:
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestData'
type: object
BulkDeleteAppsDatastoreItemsRequestData:
description: Data wrapper containing the data needed to delete items from a
datastore.
properties:
attributes:
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataAttributes'
id:
description: ID for the datastore of the items to delete.
type: string
type:
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataType'
required:
- type
type: object
BulkDeleteAppsDatastoreItemsRequestDataAttributes:
description: Attributes of request data to delete items from a datastore.
properties:
item_keys:
description: List of primary keys identifying items to delete from datastore.
Up to 100 items can be deleted in a single request.
items:
type: string
maxItems: 100
type: array
type: object
BulkDeleteAppsDatastoreItemsRequestDataType:
default: items
description: Items resource type.
enum:
- items
example: items
type: string
x-enum-varnames:
- ITEMS
BulkMuteFindingsRequest:
description: The new bulk mute finding request.
properties:
Expand Down Expand Up @@ -14869,6 +14909,17 @@ components:
data:
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
type: object
DeleteAppsDatastoreItemResponseArray:
description: The definition of `DeleteAppsDatastoreItemResponseArray` object.
properties:
data:
description: The `DeleteAppsDatastoreItemResponseArray` `data`.
items:
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
type: array
required:
- data
type: object
DeleteAppsDatastoreItemResponseData:
description: Data containing the identifier of the datastore item that was successfully
deleted.
Expand Down Expand Up @@ -51257,6 +51308,57 @@ paths:
permissions:
- apps_datastore_write
/api/v2/actions-datastores/{datastore_id}/items/bulk:
delete:
description: Deletes multiple items from a datastore by their keys in a single
operation.
operationId: BulkDeleteDatastoreItems
parameters:
- description: The ID of the datastore.
in: path
name: datastore_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseArray'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Internal Server Error
summary: Bulk delete datastore items
tags:
- Actions Datastores
x-permission:
operator: OR
permissions:
- apps_datastore_write
post:
description: Creates or replaces multiple items in a datastore by their keys
in a single operation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-09-29T19:31:22.205Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-09-29T19:31:56.639Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-09-29T19:32:10.669Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions examples/v2/actions-datastores/BulkDeleteDatastoreItems.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Bulk delete datastore items returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new

# there is a valid "datastore" in the system
DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]

body = DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequest.new({
data: DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequestData.new({
attributes: DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequestDataAttributes.new({
item_keys: [
"test-key",
],
}),
type: DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequestDataType::ITEMS,
}),
})
p api_instance.bulk_delete_datastore_items(DATASTORE_DATA_ID, body)
4 changes: 4 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,10 @@
"datastore_id" => "String",
"body" => "UpdateAppsDatastoreItemRequest",
},
"v2.BulkDeleteDatastoreItems" => {
"datastore_id" => "String",
"body" => "BulkDeleteAppsDatastoreItemsRequest",
},
"v2.BulkWriteDatastoreItems" => {
"datastore_id" => "String",
"body" => "BulkPutAppsDatastoreItemsRequest",
Expand Down
31 changes: 29 additions & 2 deletions features/v2/actions_datastores.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,36 @@ Feature: Actions Datastores
datastores owned by your organization.

Background:
Given an instance of "ActionsDatastores" API
And a valid "apiKeyAuth" key in the system
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "ActionsDatastores" API

@team:DataDog/app-builder-backend
Scenario: Bulk delete datastore items returns "Bad Request" response
Given new "BulkDeleteDatastoreItems" request
And there is a valid "datastore" in the system
And request contains "datastore_id" parameter from "datastore.data.id"
And body with value {"data": {"attributes": {"item_keys": []}, "type": "items"}}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/app-builder-backend
Scenario: Bulk delete datastore items returns "Not Found" response
Given new "BulkDeleteDatastoreItems" request
And request contains "datastore_id" parameter with value "c1eb5bb8-726a-4e59-9a61-ccbb26f95329"
And body with value {"data": {"attributes": {"item_keys": ["nonexistent"]}, "type": "items"}}
When the request is sent
Then the response status is 404 Not Found

@skip-typescript @team:DataDog/app-builder-backend
Scenario: Bulk delete datastore items returns "OK" response
Given new "BulkDeleteDatastoreItems" request
And there is a valid "datastore" in the system
And there is a valid "datastore_item" in the system
And request contains "datastore_id" parameter from "datastore.data.id"
And body with value {"data": {"attributes": {"item_keys": ["test-key"]}, "type": "items"}}
When the request is sent
Then the response status is 200 OK

@team:DataDog/app-builder-backend
Scenario: Bulk write datastore items returns "Bad Request" response
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
"type": "idempotent"
}
},
"BulkDeleteDatastoreItems": {
"tag": "Actions Datastores",
"undo": {
"type": "idempotent"
}
},
"BulkWriteDatastoreItems": {
"tag": "Actions Datastores",
"undo": {
Expand Down
Loading
Loading