Skip to content

Commit 884f808

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b75df79 of spec repo
1 parent 574877b commit 884f808

File tree

12 files changed

+786
-0
lines changed

12 files changed

+786
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6788,6 +6788,72 @@ components:
67886788
required:
67896789
- data
67906790
type: object
6791+
BatchDeleteRowsRequestArray:
6792+
description: The request body for deleting multiple rows from a reference table.
6793+
properties:
6794+
data:
6795+
items:
6796+
$ref: '#/components/schemas/BatchDeleteRowsRequestData'
6797+
maxItems: 200
6798+
type: array
6799+
required:
6800+
- data
6801+
type: object
6802+
BatchDeleteRowsRequestData:
6803+
description: Row resource containing a single row identifier for deletion.
6804+
properties:
6805+
id:
6806+
example: primary_key_value
6807+
type: string
6808+
type:
6809+
$ref: '#/components/schemas/TableRowResourceDataType'
6810+
required:
6811+
- type
6812+
- id
6813+
type: object
6814+
BatchUpsertRowsRequestArray:
6815+
description: The request body for creating or updating multiple rows into a
6816+
reference table.
6817+
properties:
6818+
data:
6819+
items:
6820+
$ref: '#/components/schemas/BatchUpsertRowsRequestData'
6821+
maxItems: 200
6822+
type: array
6823+
required:
6824+
- data
6825+
type: object
6826+
BatchUpsertRowsRequestData:
6827+
description: Row resource containing a single row identifier and its column
6828+
values.
6829+
properties:
6830+
attributes:
6831+
$ref: '#/components/schemas/BatchUpsertRowsRequestDataAttributes'
6832+
id:
6833+
example: primary_key_value
6834+
type: string
6835+
type:
6836+
$ref: '#/components/schemas/TableRowResourceDataType'
6837+
required:
6838+
- type
6839+
- id
6840+
type: object
6841+
BatchUpsertRowsRequestDataAttributes:
6842+
description: Attributes containing row data values for row creation or update
6843+
operations.
6844+
properties:
6845+
values:
6846+
additionalProperties:
6847+
x-required-field: true
6848+
description: Key-value pairs representing row data, where keys are field
6849+
names from the schema.
6850+
example:
6851+
example_key_value: primary_key_value
6852+
name: row_name
6853+
type: object
6854+
required:
6855+
- values
6856+
type: object
67916857
BillConfig:
67926858
description: Bill config.
67936859
properties:
@@ -73670,6 +73736,47 @@ paths:
7367073736
tags:
7367173737
- Reference Tables
7367273738
/api/v2/reference-tables/tables/{id}/rows:
73739+
delete:
73740+
description: Delete multiple rows from a Reference Table by their primary key
73741+
values.
73742+
operationId: DeleteRows
73743+
parameters:
73744+
- description: Unique identifier of the reference table to delete rows from
73745+
in: path
73746+
name: id
73747+
required: true
73748+
schema:
73749+
type: string
73750+
requestBody:
73751+
content:
73752+
application/json:
73753+
schema:
73754+
$ref: '#/components/schemas/BatchDeleteRowsRequestArray'
73755+
required: true
73756+
responses:
73757+
'200':
73758+
description: Rows deleted successfully
73759+
'400':
73760+
$ref: '#/components/responses/BadRequestResponse'
73761+
'403':
73762+
$ref: '#/components/responses/ForbiddenResponse'
73763+
'404':
73764+
$ref: '#/components/responses/NotFoundResponse'
73765+
'429':
73766+
$ref: '#/components/responses/TooManyRequestsResponse'
73767+
'500':
73768+
content:
73769+
application/json:
73770+
schema:
73771+
$ref: '#/components/schemas/APIErrorResponse'
73772+
description: Internal Server Error
73773+
security:
73774+
- apiKeyAuth: []
73775+
appKeyAuth: []
73776+
- AuthZ: []
73777+
summary: Delete rows
73778+
tags:
73779+
- Reference Tables
7367373780
get:
7367473781
description: Get reference table rows by their primary key values.
7367573782
operationId: GetRowsByID
@@ -73714,6 +73821,48 @@ paths:
7371473821
summary: Get rows by id
7371573822
tags:
7371673823
- Reference Tables
73824+
post:
73825+
description: Create or update rows in a Reference Table by their primary key
73826+
values. If a row with the specified primary key exists, it is updated; otherwise,
73827+
a new row is created.
73828+
operationId: UpsertRows
73829+
parameters:
73830+
- description: Unique identifier of the reference table to upsert rows into
73831+
in: path
73832+
name: id
73833+
required: true
73834+
schema:
73835+
type: string
73836+
requestBody:
73837+
content:
73838+
application/json:
73839+
schema:
73840+
$ref: '#/components/schemas/BatchUpsertRowsRequestArray'
73841+
required: true
73842+
responses:
73843+
'200':
73844+
description: Rows created or updated successfully
73845+
'400':
73846+
$ref: '#/components/responses/BadRequestResponse'
73847+
'403':
73848+
$ref: '#/components/responses/ForbiddenResponse'
73849+
'404':
73850+
$ref: '#/components/responses/NotFoundResponse'
73851+
'429':
73852+
$ref: '#/components/responses/TooManyRequestsResponse'
73853+
'500':
73854+
content:
73855+
application/json:
73856+
schema:
73857+
$ref: '#/components/schemas/APIErrorResponse'
73858+
description: Internal Server Error
73859+
security:
73860+
- apiKeyAuth: []
73861+
appKeyAuth: []
73862+
- AuthZ: []
73863+
summary: Upsert rows
73864+
tags:
73865+
- Reference Tables
7371773866
/api/v2/reference-tables/uploads:
7371873867
post:
7371973868
description: Create a reference table upload for bulk data ingestion

features/v2/reference_tables.feature

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,30 @@ Feature: Reference Tables
5353
When the request is sent
5454
Then the response status is 400 Bad Request
5555

56+
@generated @skip @team:DataDog/redapl-experiences
57+
Scenario: Delete rows returns "Bad Request" response
58+
Given new "DeleteRows" request
59+
And request contains "id" parameter from "REPLACE.ME"
60+
And body with value {"data": [{"id": "primary_key_value", "type": "row"}]}
61+
When the request is sent
62+
Then the response status is 400 Bad Request
63+
64+
@generated @skip @team:DataDog/redapl-experiences
65+
Scenario: Delete rows returns "Not Found" response
66+
Given new "DeleteRows" request
67+
And request contains "id" parameter from "REPLACE.ME"
68+
And body with value {"data": [{"id": "primary_key_value", "type": "row"}]}
69+
When the request is sent
70+
Then the response status is 404 Not Found
71+
72+
@generated @skip @team:DataDog/redapl-experiences
73+
Scenario: Delete rows returns "Rows deleted successfully" response
74+
Given new "DeleteRows" request
75+
And request contains "id" parameter from "REPLACE.ME"
76+
And body with value {"data": [{"id": "primary_key_value", "type": "row"}]}
77+
When the request is sent
78+
Then the response status is 200 Rows deleted successfully
79+
5680
@generated @skip @team:DataDog/redapl-experiences
5781
Scenario: Delete table returns "Not Found" response
5882
Given new "DeleteTable" request
@@ -119,3 +143,27 @@ Feature: Reference Tables
119143
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "type": "reference_table"}}
120144
When the request is sent
121145
Then the response status is 200 OK
146+
147+
@generated @skip @team:DataDog/redapl-experiences
148+
Scenario: Upsert rows returns "Bad Request" response
149+
Given new "UpsertRows" request
150+
And request contains "id" parameter from "REPLACE.ME"
151+
And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
152+
When the request is sent
153+
Then the response status is 400 Bad Request
154+
155+
@generated @skip @team:DataDog/redapl-experiences
156+
Scenario: Upsert rows returns "Not Found" response
157+
Given new "UpsertRows" request
158+
And request contains "id" parameter from "REPLACE.ME"
159+
And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
160+
When the request is sent
161+
Then the response status is 404 Not Found
162+
163+
@generated @skip @team:DataDog/redapl-experiences
164+
Scenario: Upsert rows returns "Rows created or updated successfully" response
165+
Given new "UpsertRows" request
166+
And request contains "id" parameter from "REPLACE.ME"
167+
And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
168+
When the request is sent
169+
Then the response status is 200 Rows created or updated successfully

features/v2/undo.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,12 +3012,26 @@
30123012
"type": "idempotent"
30133013
}
30143014
},
3015+
"DeleteRows": {
3016+
"tag": "Reference Tables",
3017+
"undo": {
3018+
"type": "idempotent"
3019+
}
3020+
},
30153021
"GetRowsByID": {
30163022
"tag": "Reference Tables",
30173023
"undo": {
30183024
"type": "safe"
30193025
}
30203026
},
3027+
"UpsertRows": {
3028+
"tag": "Reference Tables",
3029+
"undo": {
3030+
"operationId": "DeleteRows",
3031+
"parameters": [],
3032+
"type": "unsafe"
3033+
}
3034+
},
30213035
"CreateReferenceTableUpload": {
30223036
"tag": "Reference Tables",
30233037
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7721,6 +7721,28 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
77217721
},
77227722
operationResponseType: "TableRowResourceArray",
77237723
},
7724+
"ReferenceTablesApi.V2.UpsertRows": {
7725+
id: {
7726+
type: "string",
7727+
format: "",
7728+
},
7729+
body: {
7730+
type: "BatchUpsertRowsRequestArray",
7731+
format: "",
7732+
},
7733+
operationResponseType: "{}",
7734+
},
7735+
"ReferenceTablesApi.V2.DeleteRows": {
7736+
id: {
7737+
type: "string",
7738+
format: "",
7739+
},
7740+
body: {
7741+
type: "BatchDeleteRowsRequestArray",
7742+
format: "",
7743+
},
7744+
operationResponseType: "{}",
7745+
},
77247746
"ReferenceTablesApi.V2.CreateReferenceTableUpload": {
77257747
body: {
77267748
type: "CreateUploadRequest",

0 commit comments

Comments
 (0)