Skip to content

Commit be4ff07

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8f82938 of spec repo
1 parent ce45a5c commit be4ff07

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
@@ -6557,6 +6557,46 @@ components:
65576557
description: The type of the object, must be `budget`.
65586558
type: string
65596559
type: object
6560+
BulkDeleteAppsDatastoreItemsRequest:
6561+
description: Request to delete items from a datastore.
6562+
properties:
6563+
data:
6564+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestData'
6565+
type: object
6566+
BulkDeleteAppsDatastoreItemsRequestData:
6567+
description: Data wrapper containing the data needed to delete items from a
6568+
datastore.
6569+
properties:
6570+
attributes:
6571+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataAttributes'
6572+
id:
6573+
description: ID for the datastore of the items to delete.
6574+
type: string
6575+
type:
6576+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataType'
6577+
required:
6578+
- type
6579+
type: object
6580+
BulkDeleteAppsDatastoreItemsRequestDataAttributes:
6581+
description: Attributes of request data to delete items from a datastore.
6582+
properties:
6583+
item_keys:
6584+
description: List of primary keys identifying items to delete from datastore.
6585+
Up to 100 items can be deleted in a single request.
6586+
items:
6587+
type: string
6588+
maxItems: 100
6589+
type: array
6590+
type: object
6591+
BulkDeleteAppsDatastoreItemsRequestDataType:
6592+
default: items
6593+
description: Items resource type.
6594+
enum:
6595+
- items
6596+
example: items
6597+
type: string
6598+
x-enum-varnames:
6599+
- ITEMS
65606600
BulkMuteFindingsRequest:
65616601
description: The new bulk mute finding request.
65626602
properties:
@@ -14889,6 +14929,17 @@ components:
1488914929
data:
1489014930
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
1489114931
type: object
14932+
DeleteAppsDatastoreItemResponseArray:
14933+
description: The definition of `DeleteAppsDatastoreItemResponseArray` object.
14934+
properties:
14935+
data:
14936+
description: The `DeleteAppsDatastoreItemResponseArray` `data`.
14937+
items:
14938+
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
14939+
type: array
14940+
required:
14941+
- data
14942+
type: object
1489214943
DeleteAppsDatastoreItemResponseData:
1489314944
description: Data containing the identifier of the datastore item that was successfully
1489414945
deleted.
@@ -51282,6 +51333,57 @@ paths:
5128251333
permissions:
5128351334
- apps_datastore_write
5128451335
/api/v2/actions-datastores/{datastore_id}/items/bulk:
51336+
delete:
51337+
description: Deletes multiple items from a datastore by their keys in a single
51338+
operation.
51339+
operationId: BulkDeleteDatastoreItems
51340+
parameters:
51341+
- description: The ID of the datastore.
51342+
in: path
51343+
name: datastore_id
51344+
required: true
51345+
schema:
51346+
type: string
51347+
requestBody:
51348+
content:
51349+
application/json:
51350+
schema:
51351+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequest'
51352+
required: true
51353+
responses:
51354+
'200':
51355+
content:
51356+
application/json:
51357+
schema:
51358+
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseArray'
51359+
description: OK
51360+
'400':
51361+
content:
51362+
application/json:
51363+
schema:
51364+
$ref: '#/components/schemas/JSONAPIErrorResponse'
51365+
description: Bad Request
51366+
'404':
51367+
content:
51368+
application/json:
51369+
schema:
51370+
$ref: '#/components/schemas/JSONAPIErrorResponse'
51371+
description: Not Found
51372+
'429':
51373+
$ref: '#/components/responses/TooManyRequestsResponse'
51374+
'500':
51375+
content:
51376+
application/json:
51377+
schema:
51378+
$ref: '#/components/schemas/JSONAPIErrorResponse'
51379+
description: Internal Server Error
51380+
summary: Bulk delete datastore items
51381+
tags:
51382+
- Actions Datastores
51383+
x-permission:
51384+
operator: OR
51385+
permissions:
51386+
- apps_datastore_write
5128551387
post:
5128651388
description: Creates or replaces multiple items in a datastore by their keys
5128751389
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)