Skip to content

Commit 552b55f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 227d668 of spec repo (#3712)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 593548e commit 552b55f

18 files changed

+747
-15
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 135 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7475,23 +7475,89 @@ components:
74757475
properties:
74767476
data:
74777477
items:
7478-
$ref: '#/components/schemas/BatchDeleteRowsRequestData'
7478+
$ref: '#/components/schemas/TableRowResourceIdentifier'
74797479
maxItems: 200
74807480
type: array
74817481
required:
74827482
- data
74837483
type: object
7484-
BatchDeleteRowsRequestData:
7485-
description: Row resource containing a single row identifier for deletion.
7484+
BatchRowsQueryDataType:
7485+
default: reference-tables-batch-rows-query
7486+
description: Resource type identifier for batch queries of reference table rows.
7487+
enum:
7488+
- reference-tables-batch-rows-query
7489+
example: reference-tables-batch-rows-query
7490+
type: string
7491+
x-enum-varnames:
7492+
- REFERENCE_TABLES_BATCH_ROWS_QUERY
7493+
BatchRowsQueryRequest:
7494+
properties:
7495+
data:
7496+
$ref: '#/components/schemas/BatchRowsQueryRequestData'
7497+
type: object
7498+
BatchRowsQueryRequestData:
7499+
properties:
7500+
attributes:
7501+
$ref: '#/components/schemas/BatchRowsQueryRequestDataAttributes'
7502+
type:
7503+
$ref: '#/components/schemas/BatchRowsQueryDataType'
7504+
required:
7505+
- type
7506+
type: object
7507+
BatchRowsQueryRequestDataAttributes:
7508+
properties:
7509+
row_ids:
7510+
example:
7511+
- row_id_1
7512+
- row_id_2
7513+
items:
7514+
type: string
7515+
type: array
7516+
table_id:
7517+
example: 00000000-0000-0000-0000-000000000000
7518+
type: string
7519+
required:
7520+
- row_ids
7521+
- table_id
7522+
type: object
7523+
BatchRowsQueryResponse:
7524+
example:
7525+
data:
7526+
id: 00000000-0000-0000-0000-000000000000
7527+
relationships:
7528+
rows:
7529+
data:
7530+
- id: row_id_1
7531+
type: row
7532+
- id: row_id_2
7533+
type: row
7534+
type: reference-tables-batch-rows-query
7535+
properties:
7536+
data:
7537+
$ref: '#/components/schemas/BatchRowsQueryResponseData'
7538+
type: object
7539+
BatchRowsQueryResponseData:
74867540
properties:
74877541
id:
7488-
example: primary_key_value
74897542
type: string
7543+
relationships:
7544+
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationships'
74907545
type:
7491-
$ref: '#/components/schemas/TableRowResourceDataType'
7546+
$ref: '#/components/schemas/BatchRowsQueryDataType'
74927547
required:
74937548
- type
7494-
- id
7549+
type: object
7550+
BatchRowsQueryResponseDataRelationships:
7551+
properties:
7552+
rows:
7553+
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationshipsRows'
7554+
type: object
7555+
BatchRowsQueryResponseDataRelationshipsRows:
7556+
properties:
7557+
data:
7558+
items:
7559+
$ref: '#/components/schemas/TableRowResourceIdentifier'
7560+
type: array
74957561
type: object
74967562
BatchUpsertRowsRequestArray:
74977563
description: The request body for creating or updating multiple rows into a
@@ -66953,6 +67019,18 @@ components:
6695367019
type: string
6695467020
x-enum-varnames:
6695567021
- ROW
67022+
TableRowResourceIdentifier:
67023+
description: Row resource containing a single row identifier.
67024+
properties:
67025+
id:
67026+
example: primary_key_value
67027+
type: string
67028+
type:
67029+
$ref: '#/components/schemas/TableRowResourceDataType'
67030+
required:
67031+
- type
67032+
- id
67033+
type: object
6695667034
TagsEventAttribute:
6695767035
description: Array of tags associated with your event.
6695867036
example:
@@ -96388,6 +96466,57 @@ paths:
9638896466
operator: OR
9638996467
permissions:
9639096468
- timeseries_query
96469+
/api/v2/reference-tables/queries/batch-rows:
96470+
post:
96471+
description: Batch query reference table rows by their primary key values. Returns
96472+
only found rows in the included array.
96473+
operationId: BatchRowsQuery
96474+
requestBody:
96475+
content:
96476+
application/json:
96477+
examples:
96478+
happy_path:
96479+
summary: Batch query reference table rows by their primary key values.
96480+
value:
96481+
data:
96482+
attributes:
96483+
row_ids:
96484+
- row_id_1
96485+
- row_id_2
96486+
table_id: 00000000-0000-0000-0000-000000000000
96487+
type: reference-tables-batch-rows-query
96488+
schema:
96489+
$ref: '#/components/schemas/BatchRowsQueryRequest'
96490+
required: true
96491+
responses:
96492+
'200':
96493+
content:
96494+
application/json:
96495+
schema:
96496+
$ref: '#/components/schemas/BatchRowsQueryResponse'
96497+
description: Successfully retrieved rows. Some or all requested rows were
96498+
found. Response includes found rows in the included section.
96499+
'400':
96500+
$ref: '#/components/responses/BadRequestResponse'
96501+
'403':
96502+
$ref: '#/components/responses/ForbiddenResponse'
96503+
'404':
96504+
$ref: '#/components/responses/NotFoundResponse'
96505+
'429':
96506+
$ref: '#/components/responses/TooManyRequestsResponse'
96507+
'500':
96508+
content:
96509+
application/json:
96510+
schema:
96511+
$ref: '#/components/schemas/APIErrorResponse'
96512+
description: Internal Server Error
96513+
security:
96514+
- apiKeyAuth: []
96515+
appKeyAuth: []
96516+
- AuthZ: []
96517+
summary: Batch rows query
96518+
tags:
96519+
- Reference Tables
9639196520
/api/v2/reference-tables/tables:
9639296521
get:
9639396522
description: List all reference tables in this organization.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found
3+
* rows in the included section." response
4+
*/
5+
6+
import { client, v2 } from "@datadog/datadog-api-client";
7+
8+
const configuration = client.createConfiguration();
9+
const apiInstance = new v2.ReferenceTablesApi(configuration);
10+
11+
const params: v2.ReferenceTablesApiBatchRowsQueryRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
rowIds: ["row_id_1", "row_id_2"],
16+
tableId: "00000000-0000-0000-0000-000000000000",
17+
},
18+
type: "reference-tables-batch-rows-query",
19+
},
20+
},
21+
};
22+
23+
apiInstance
24+
.batchRowsQuery(params)
25+
.then((data: v2.BatchRowsQueryResponse) => {
26+
console.log(
27+
"API called successfully. Returned data: " + JSON.stringify(data)
28+
);
29+
})
30+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9157,6 +9157,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
91579157
},
91589158
"operationResponseType": "ListConnectionsResponse",
91599159
},
9160+
"v2.BatchRowsQuery": {
9161+
"body": {
9162+
"type": "BatchRowsQueryRequest",
9163+
"format": "",
9164+
},
9165+
"operationResponseType": "BatchRowsQueryResponse",
9166+
},
91609167
"v2.ListTables": {
91619168
"pageLimit": {
91629169
"type": "number",

features/v2/reference_tables.feature

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ Feature: Reference Tables
77
And a valid "appKeyAuth" key in the system
88
And an instance of "ReferenceTables" API
99

10+
@generated @skip @team:DataDog/redapl-experiences
11+
Scenario: Batch rows query returns "Bad Request" response
12+
Given new "BatchRowsQuery" request
13+
And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}}
14+
When the request is sent
15+
Then the response status is 400 Bad Request
16+
17+
@generated @skip @team:DataDog/redapl-experiences
18+
Scenario: Batch rows query returns "Not Found" response
19+
Given new "BatchRowsQuery" request
20+
And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}}
21+
When the request is sent
22+
Then the response status is 404 Not Found
23+
24+
@generated @skip @team:DataDog/redapl-experiences
25+
Scenario: Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section." response
26+
Given new "BatchRowsQuery" request
27+
And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}}
28+
When the request is sent
29+
Then the response status is 200 Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section.
30+
1031
@generated @skip @team:DataDog/redapl-experiences
1132
Scenario: Create reference table returns "Bad Request" response
1233
Given new "CreateReferenceTable" request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3963,6 +3963,12 @@
39633963
"type": "idempotent"
39643964
}
39653965
},
3966+
"BatchRowsQuery": {
3967+
"tag": "Reference Tables",
3968+
"undo": {
3969+
"type": "safe"
3970+
}
3971+
},
39663972
"ListTables": {
39673973
"tag": "Reference Tables",
39683974
"undo": {

0 commit comments

Comments
 (0)