Skip to content

Commit 56c35e5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cd463ad of spec repo
1 parent 3635f82 commit 56c35e5

18 files changed

+940
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6448,6 +6448,46 @@ components:
64486448
description: The type of the object, must be `budget`.
64496449
type: string
64506450
type: object
6451+
BulkDeleteAppsDatastoreItemsRequest:
6452+
description: Request to delete items from a datastore.
6453+
properties:
6454+
data:
6455+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestData'
6456+
type: object
6457+
BulkDeleteAppsDatastoreItemsRequestData:
6458+
description: Data wrapper containing the data needed to delete items from a
6459+
datastore.
6460+
properties:
6461+
attributes:
6462+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataAttributes'
6463+
id:
6464+
description: ID for the datastore of the items to delete.
6465+
type: string
6466+
type:
6467+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataType'
6468+
required:
6469+
- type
6470+
type: object
6471+
BulkDeleteAppsDatastoreItemsRequestDataAttributes:
6472+
description: Attributes of request data to delete items from a datastore.
6473+
properties:
6474+
item_keys:
6475+
description: List of primary keys identifying items to delete from datastore.
6476+
Up to 100 items can be deleted in a single request.
6477+
items:
6478+
type: string
6479+
maxItems: 100
6480+
type: array
6481+
type: object
6482+
BulkDeleteAppsDatastoreItemsRequestDataType:
6483+
default: items
6484+
description: Items resource type.
6485+
enum:
6486+
- items
6487+
example: items
6488+
type: string
6489+
x-enum-varnames:
6490+
- ITEMS
64516491
BulkMuteFindingsRequest:
64526492
description: The new bulk mute finding request.
64536493
properties:
@@ -14780,6 +14820,17 @@ components:
1478014820
data:
1478114821
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
1478214822
type: object
14823+
DeleteAppsDatastoreItemResponseArray:
14824+
description: The definition of `DeleteAppsDatastoreItemResponseArray` object.
14825+
properties:
14826+
data:
14827+
description: The `DeleteAppsDatastoreItemResponseArray` `data`.
14828+
items:
14829+
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
14830+
type: array
14831+
required:
14832+
- data
14833+
type: object
1478314834
DeleteAppsDatastoreItemResponseData:
1478414835
description: Data containing the identifier of the datastore item that was successfully
1478514836
deleted.
@@ -50803,6 +50854,57 @@ paths:
5080350854
permissions:
5080450855
- apps_datastore_write
5080550856
/api/v2/actions-datastores/{datastore_id}/items/bulk:
50857+
delete:
50858+
description: Deletes multiple items from a datastore by their keys in a single
50859+
operation.
50860+
operationId: BulkDeleteDatastoreItems
50861+
parameters:
50862+
- description: The ID of the datastore.
50863+
in: path
50864+
name: datastore_id
50865+
required: true
50866+
schema:
50867+
type: string
50868+
requestBody:
50869+
content:
50870+
application/json:
50871+
schema:
50872+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequest'
50873+
required: true
50874+
responses:
50875+
'200':
50876+
content:
50877+
application/json:
50878+
schema:
50879+
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseArray'
50880+
description: OK
50881+
'400':
50882+
content:
50883+
application/json:
50884+
schema:
50885+
$ref: '#/components/schemas/JSONAPIErrorResponse'
50886+
description: Bad Request
50887+
'404':
50888+
content:
50889+
application/json:
50890+
schema:
50891+
$ref: '#/components/schemas/JSONAPIErrorResponse'
50892+
description: Not Found
50893+
'429':
50894+
$ref: '#/components/responses/TooManyRequestsResponse'
50895+
'500':
50896+
content:
50897+
application/json:
50898+
schema:
50899+
$ref: '#/components/schemas/JSONAPIErrorResponse'
50900+
description: Internal Server Error
50901+
summary: Bulk delete datastore items
50902+
tags:
50903+
- Actions Datastores
50904+
x-permission:
50905+
operator: OR
50906+
permissions:
50907+
- apps_datastore_write
5080650908
post:
5080750909
description: Creates or replaces multiple items in a datastore by their keys
5080850910
in a single operation.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-29T19:31:22.205Z

cassettes/features/v2/actions_datastores/Bulk-delete-datastore-items-returns-Bad-Request-response.yml

Lines changed: 65 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-29T19:31:56.639Z

cassettes/features/v2/actions_datastores/Bulk-delete-datastore-items-returns-Not-Found-response.yml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-29T19:32:10.669Z

cassettes/features/v2/actions_datastores/Bulk-delete-datastore-items-returns-OK-response.yml

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Bulk delete datastore items returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5+
6+
# there is a valid "datastore" in the system
7+
DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8+
9+
body = DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequest.new({
10+
data: DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequestData.new({
11+
attributes: DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequestDataAttributes.new({
12+
item_keys: [
13+
"test-key",
14+
],
15+
}),
16+
type: DatadogAPIClient::V2::BulkDeleteAppsDatastoreItemsRequestDataType::ITEMS,
17+
}),
18+
})
19+
p api_instance.bulk_delete_datastore_items(DATASTORE_DATA_ID, body)

features/scenarios_model_mapping.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,10 @@
867867
"datastore_id" => "String",
868868
"body" => "UpdateAppsDatastoreItemRequest",
869869
},
870+
"v2.BulkDeleteDatastoreItems" => {
871+
"datastore_id" => "String",
872+
"body" => "BulkDeleteAppsDatastoreItemsRequest",
873+
},
870874
"v2.BulkWriteDatastoreItems" => {
871875
"datastore_id" => "String",
872876
"body" => "BulkPutAppsDatastoreItemsRequest",

features/v2/actions_datastores.feature

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,36 @@ Feature: Actions Datastores
44
datastores owned by your organization.
55

66
Background:
7-
Given an instance of "ActionsDatastores" API
8-
And a valid "apiKeyAuth" key in the system
7+
Given a valid "apiKeyAuth" key in the system
98
And a valid "appKeyAuth" key in the system
9+
And an instance of "ActionsDatastores" API
10+
11+
@team:DataDog/app-builder-backend
12+
Scenario: Bulk delete datastore items returns "Bad Request" response
13+
Given new "BulkDeleteDatastoreItems" request
14+
And there is a valid "datastore" in the system
15+
And request contains "datastore_id" parameter from "datastore.data.id"
16+
And body with value {"data": {"attributes": {"item_keys": []}, "type": "items"}}
17+
When the request is sent
18+
Then the response status is 400 Bad Request
19+
20+
@team:DataDog/app-builder-backend
21+
Scenario: Bulk delete datastore items returns "Not Found" response
22+
Given new "BulkDeleteDatastoreItems" request
23+
And request contains "datastore_id" parameter with value "c1eb5bb8-726a-4e59-9a61-ccbb26f95329"
24+
And body with value {"data": {"attributes": {"item_keys": ["nonexistent"]}, "type": "items"}}
25+
When the request is sent
26+
Then the response status is 404 Not Found
27+
28+
@skip-typescript @team:DataDog/app-builder-backend
29+
Scenario: Bulk delete datastore items returns "OK" response
30+
Given new "BulkDeleteDatastoreItems" request
31+
And there is a valid "datastore" in the system
32+
And there is a valid "datastore_item" in the system
33+
And request contains "datastore_id" parameter from "datastore.data.id"
34+
And body with value {"data": {"attributes": {"item_keys": ["test-key"]}, "type": "items"}}
35+
When the request is sent
36+
Then the response status is 200 OK
1037

1138
@team:DataDog/app-builder-backend
1239
Scenario: Bulk write datastore items returns "Bad Request" response

0 commit comments

Comments
 (0)