Skip to content

Commit ec82e91

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add BulkDeleteDatastoreItems to Datastore API spec (#2845)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent eb0dde9 commit ec82e91

File tree

18 files changed

+1003
-2
lines changed

18 files changed

+1003
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6553,6 +6553,46 @@ components:
65536553
description: The type of the object, must be `budget`.
65546554
type: string
65556555
type: object
6556+
BulkDeleteAppsDatastoreItemsRequest:
6557+
description: Request to delete items from a datastore.
6558+
properties:
6559+
data:
6560+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestData'
6561+
type: object
6562+
BulkDeleteAppsDatastoreItemsRequestData:
6563+
description: Data wrapper containing the data needed to delete items from a
6564+
datastore.
6565+
properties:
6566+
attributes:
6567+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataAttributes'
6568+
id:
6569+
description: ID for the datastore of the items to delete.
6570+
type: string
6571+
type:
6572+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequestDataType'
6573+
required:
6574+
- type
6575+
type: object
6576+
BulkDeleteAppsDatastoreItemsRequestDataAttributes:
6577+
description: Attributes of request data to delete items from a datastore.
6578+
properties:
6579+
item_keys:
6580+
description: List of primary keys identifying items to delete from datastore.
6581+
Up to 100 items can be deleted in a single request.
6582+
items:
6583+
type: string
6584+
maxItems: 100
6585+
type: array
6586+
type: object
6587+
BulkDeleteAppsDatastoreItemsRequestDataType:
6588+
default: items
6589+
description: Items resource type.
6590+
enum:
6591+
- items
6592+
example: items
6593+
type: string
6594+
x-enum-varnames:
6595+
- ITEMS
65566596
BulkMuteFindingsRequest:
65576597
description: The new bulk mute finding request.
65586598
properties:
@@ -14869,6 +14909,17 @@ components:
1486914909
data:
1487014910
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
1487114911
type: object
14912+
DeleteAppsDatastoreItemResponseArray:
14913+
description: The definition of `DeleteAppsDatastoreItemResponseArray` object.
14914+
properties:
14915+
data:
14916+
description: The `DeleteAppsDatastoreItemResponseArray` `data`.
14917+
items:
14918+
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
14919+
type: array
14920+
required:
14921+
- data
14922+
type: object
1487214923
DeleteAppsDatastoreItemResponseData:
1487314924
description: Data containing the identifier of the datastore item that was successfully
1487414925
deleted.
@@ -51257,6 +51308,57 @@ paths:
5125751308
permissions:
5125851309
- apps_datastore_write
5125951310
/api/v2/actions-datastores/{datastore_id}/items/bulk:
51311+
delete:
51312+
description: Deletes multiple items from a datastore by their keys in a single
51313+
operation.
51314+
operationId: BulkDeleteDatastoreItems
51315+
parameters:
51316+
- description: The ID of the datastore.
51317+
in: path
51318+
name: datastore_id
51319+
required: true
51320+
schema:
51321+
type: string
51322+
requestBody:
51323+
content:
51324+
application/json:
51325+
schema:
51326+
$ref: '#/components/schemas/BulkDeleteAppsDatastoreItemsRequest'
51327+
required: true
51328+
responses:
51329+
'200':
51330+
content:
51331+
application/json:
51332+
schema:
51333+
$ref: '#/components/schemas/DeleteAppsDatastoreItemResponseArray'
51334+
description: OK
51335+
'400':
51336+
content:
51337+
application/json:
51338+
schema:
51339+
$ref: '#/components/schemas/JSONAPIErrorResponse'
51340+
description: Bad Request
51341+
'404':
51342+
content:
51343+
application/json:
51344+
schema:
51345+
$ref: '#/components/schemas/JSONAPIErrorResponse'
51346+
description: Not Found
51347+
'429':
51348+
$ref: '#/components/responses/TooManyRequestsResponse'
51349+
'500':
51350+
content:
51351+
application/json:
51352+
schema:
51353+
$ref: '#/components/schemas/JSONAPIErrorResponse'
51354+
description: Internal Server Error
51355+
summary: Bulk delete datastore items
51356+
tags:
51357+
- Actions Datastores
51358+
x-permission:
51359+
operator: OR
51360+
permissions:
51361+
- apps_datastore_write
5126051362
post:
5126151363
description: Creates or replaces multiple items in a datastore by their keys
5126251364
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"
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"log": {
3+
"_recordingName": "Actions Datastores/Bulk delete datastore items returns \"Bad Request\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "6574cf7e1c5524e145d2b92f9fa74d2c",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 181,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 566,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"description\":\"\",\"name\":\"Test Datastore\",\"org_access\":\"contributor\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"type\":\"datastores\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/actions-datastores"
39+
},
40+
"response": {
41+
"bodySize": 74,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 74,
45+
"text": "{\"data\":{\"id\":\"2b088869-d596-4103-9cff-038b5f81fc0c\",\"type\":\"datastores\"}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 658,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-09-29T19:31:22.210Z",
61+
"time": 127
62+
},
63+
{
64+
"_id": "250acdecc02d6e90debb4e7c003fc3d3",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 55,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
},
76+
{
77+
"_fromType": "array",
78+
"name": "content-type",
79+
"value": "application/json"
80+
}
81+
],
82+
"headersSize": 624,
83+
"httpVersion": "HTTP/1.1",
84+
"method": "DELETE",
85+
"postData": {
86+
"mimeType": "application/json",
87+
"params": [],
88+
"text": "{\"data\":{\"attributes\":{\"item_keys\":[]},\"type\":\"items\"}}"
89+
},
90+
"queryString": [],
91+
"url": "https://api.datadoghq.com/api/v2/actions-datastores/2b088869-d596-4103-9cff-038b5f81fc0c/items/bulk"
92+
},
93+
"response": {
94+
"bodySize": 151,
95+
"content": {
96+
"mimeType": "application/vnd.api+json",
97+
"size": 151,
98+
"text": "{\"errors\":[{\"status\":\"400\",\"id\":\"61325aff-aaa7-4571-80e2-e87ed8ffb103\",\"title\":\"missing required field\",\"detail\":\"at least one item key is required\"}]}"
99+
},
100+
"cookies": [],
101+
"headers": [
102+
{
103+
"name": "content-type",
104+
"value": "application/vnd.api+json"
105+
}
106+
],
107+
"headersSize": 941,
108+
"httpVersion": "HTTP/1.1",
109+
"redirectURL": "",
110+
"status": 400,
111+
"statusText": "Bad Request"
112+
},
113+
"startedDateTime": "2025-09-29T19:31:22.345Z",
114+
"time": 108
115+
},
116+
{
117+
"_id": "510e983293e08107932ce07babeb6246",
118+
"_order": 0,
119+
"cache": {},
120+
"request": {
121+
"bodySize": 0,
122+
"cookies": [],
123+
"headers": [
124+
{
125+
"_fromType": "array",
126+
"name": "accept",
127+
"value": "*/*"
128+
}
129+
],
130+
"headersSize": 539,
131+
"httpVersion": "HTTP/1.1",
132+
"method": "DELETE",
133+
"queryString": [],
134+
"url": "https://api.datadoghq.com/api/v2/actions-datastores/2b088869-d596-4103-9cff-038b5f81fc0c"
135+
},
136+
"response": {
137+
"bodySize": 74,
138+
"content": {
139+
"mimeType": "application/vnd.api+json",
140+
"size": 74,
141+
"text": "{\"data\":{\"id\":\"2b088869-d596-4103-9cff-038b5f81fc0c\",\"type\":\"datastores\"}}"
142+
},
143+
"cookies": [],
144+
"headers": [
145+
{
146+
"name": "content-type",
147+
"value": "application/vnd.api+json"
148+
}
149+
],
150+
"headersSize": 658,
151+
"httpVersion": "HTTP/1.1",
152+
"redirectURL": "",
153+
"status": 200,
154+
"statusText": "OK"
155+
},
156+
"startedDateTime": "2025-09-29T19:31:22.459Z",
157+
"time": 92
158+
}
159+
],
160+
"pages": [],
161+
"version": "1.2"
162+
}
163+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-09-29T19:31:56.639Z"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Actions Datastores/Bulk delete datastore items returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "070d0045b9573b98f36116e1cdf72cf4",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 68,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 622,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "DELETE",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"item_keys\":[\"nonexistent\"]},\"type\":\"items\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/actions-datastores/c1eb5bb8-726a-4e59-9a61-ccbb26f95329/items/bulk"
39+
},
40+
"response": {
41+
"bodySize": 103,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 103,
45+
"text": "{\"errors\":[{\"status\":\"404\",\"id\":\"d53325f5-a7f3-4075-ace7-f8e22a25b72f\",\"title\":\"datastore not found\"}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 941,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 404,
58+
"statusText": "Not Found"
59+
},
60+
"startedDateTime": "2025-09-29T19:31:56.643Z",
61+
"time": 116
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-09-29T19:32:10.669Z"

0 commit comments

Comments
 (0)