Skip to content

Commit cb29bac

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c875c84 of spec repo
1 parent 507434e commit cb29bac

15 files changed

Lines changed: 871 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39838,6 +39838,10 @@ components:
3983839838
example: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
3983939839
nullable: true
3984039840
type: string
39841+
has_ever_been_published:
39842+
description: Whether this version number has ever appeared in the form's publication history.
39843+
example: true
39844+
type: boolean
3984139845
id:
3984239846
description: The ID of the form version.
3984339847
example: "126"
@@ -39894,6 +39898,15 @@ components:
3989439898
- type
3989539899
- attributes
3989639900
type: object
39901+
FormVersionListType:
39902+
default: form_version_lists
39903+
description: The resource type for a list of form versions.
39904+
enum:
39905+
- form_version_lists
39906+
example: form_version_lists
39907+
type: string
39908+
x-enum-varnames:
39909+
- FORM_VERSION_LISTS
3989739910
FormVersionResponse:
3989839911
description: A response containing a single form version.
3989939912
properties:
@@ -57900,6 +57913,41 @@ components:
5790057913
- data
5790157914
- meta
5790257915
type: object
57916+
ListFormVersionsData:
57917+
description: A list-of-form-versions resource object.
57918+
properties:
57919+
attributes:
57920+
$ref: "#/components/schemas/ListFormVersionsDataAttributes"
57921+
id:
57922+
description: The ID of the form.
57923+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
57924+
type: string
57925+
type:
57926+
$ref: "#/components/schemas/FormVersionListType"
57927+
required:
57928+
- id
57929+
- type
57930+
- attributes
57931+
type: object
57932+
ListFormVersionsDataAttributes:
57933+
description: The attributes for a list of form versions.
57934+
properties:
57935+
versions:
57936+
description: The list of versions for the form.
57937+
items:
57938+
$ref: "#/components/schemas/FormVersionAttributes"
57939+
type: array
57940+
required:
57941+
- versions
57942+
type: object
57943+
ListFormVersionsResponse:
57944+
description: A response containing the list of versions for a form.
57945+
properties:
57946+
data:
57947+
$ref: "#/components/schemas/ListFormVersionsData"
57948+
required:
57949+
- data
57950+
type: object
5790357951
ListHistoricalJobsResponse:
5790457952
description: List of historical jobs.
5790557953
properties:
@@ -138604,6 +138652,71 @@ paths:
138604138652
**Note**: This endpoint is in preview and is subject to change.
138605138653
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
138606138654
/api/v2/forms/{form_id}/versions:
138655+
get:
138656+
description: List all versions of a form.
138657+
operationId: ListFormVersions
138658+
parameters:
138659+
- description: The ID of the form.
138660+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
138661+
in: path
138662+
name: form_id
138663+
required: true
138664+
schema:
138665+
format: uuid
138666+
type: string
138667+
responses:
138668+
"200":
138669+
content:
138670+
application/json:
138671+
examples:
138672+
default:
138673+
value:
138674+
data:
138675+
attributes:
138676+
versions:
138677+
- created_at: "2026-05-29T20:06:14.895921Z"
138678+
data_definition: {}
138679+
definition_signature: '{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}'
138680+
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
138681+
has_ever_been_published: true
138682+
id: "126"
138683+
modified_at: "2026-05-29T20:06:14.949163Z"
138684+
state: draft
138685+
ui_definition: {}
138686+
user_id: 10001
138687+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
138688+
version: 2
138689+
id: 22f6006a-2302-4926-9396-d2dfcf7b0b34
138690+
type: form_version_lists
138691+
schema:
138692+
$ref: "#/components/schemas/ListFormVersionsResponse"
138693+
description: OK
138694+
"400":
138695+
content:
138696+
application/json:
138697+
schema:
138698+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138699+
description: Bad Request
138700+
"401":
138701+
content:
138702+
application/json:
138703+
schema:
138704+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138705+
description: Unauthorized
138706+
"404":
138707+
content:
138708+
application/json:
138709+
schema:
138710+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138711+
description: Not Found
138712+
"429":
138713+
$ref: "#/components/responses/TooManyRequestsResponse"
138714+
summary: List form versions
138715+
tags:
138716+
- Forms
138717+
x-unstable: |-
138718+
**Note**: This endpoint is in preview and is subject to change.
138719+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
138607138720
post:
138608138721
description: |-
138609138722
Create or update the latest draft version of a form. The `upsert_params` field controls
@@ -138686,6 +138799,84 @@ paths:
138686138799
x-unstable: |-
138687138800
**Note**: This endpoint is in preview and is subject to change.
138688138801
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
138802+
/api/v2/forms/{form_id}/versions/revert:
138803+
post:
138804+
description: Revert a form to a prior version by creating a new draft version copied from it.
138805+
operationId: RevertFormVersion
138806+
parameters:
138807+
- description: The ID of the form.
138808+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
138809+
in: path
138810+
name: form_id
138811+
required: true
138812+
schema:
138813+
format: uuid
138814+
type: string
138815+
- description: The version number to revert to.
138816+
example: 1
138817+
in: query
138818+
name: version
138819+
required: true
138820+
schema:
138821+
format: int64
138822+
type: integer
138823+
responses:
138824+
"200":
138825+
content:
138826+
application/json:
138827+
examples:
138828+
default:
138829+
value:
138830+
data:
138831+
attributes:
138832+
created_at: "2026-05-29T20:10:14.895921Z"
138833+
data_definition:
138834+
$ref: "#/components/schemas/FormDataDefinition"
138835+
definition_signature: '{"signature":"c8f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}'
138836+
etag: c61f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
138837+
modified_at: "2026-05-29T20:10:14.949163Z"
138838+
state: draft
138839+
ui_definition: {}
138840+
user_id: 10001
138841+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
138842+
version: 3
138843+
id: "127"
138844+
type: form_versions
138845+
schema:
138846+
$ref: "#/components/schemas/FormVersionResponse"
138847+
description: OK
138848+
"400":
138849+
content:
138850+
application/json:
138851+
schema:
138852+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138853+
description: Bad Request
138854+
"401":
138855+
content:
138856+
application/json:
138857+
schema:
138858+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138859+
description: Unauthorized
138860+
"404":
138861+
content:
138862+
application/json:
138863+
schema:
138864+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138865+
description: Not Found
138866+
"409":
138867+
content:
138868+
application/json:
138869+
schema:
138870+
$ref: "#/components/schemas/JSONAPIErrorResponse"
138871+
description: Conflict
138872+
"429":
138873+
$ref: "#/components/responses/TooManyRequestsResponse"
138874+
summary: Revert a form to a prior version
138875+
tags:
138876+
- Forms
138877+
x-unstable: |-
138878+
**Note**: This endpoint is in preview and is subject to change.
138879+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
138689138880
/api/v2/forms/{form_id}/versions/upsert_and_publish:
138690138881
post:
138691138882
description: Upsert the latest form version and publish it in a single atomic transaction.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* List form versions returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listFormVersions"] = true;
9+
const apiInstance = new v2.FormsApi(configuration);
10+
11+
const params: v2.FormsApiListFormVersionsRequest = {
12+
formId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
13+
};
14+
15+
apiInstance
16+
.listFormVersions(params)
17+
.then((data: v2.ListFormVersionsResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Revert a form to a prior version returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.revertFormVersion"] = true;
9+
const apiInstance = new v2.FormsApi(configuration);
10+
11+
const params: v2.FormsApiRevertFormVersionRequest = {
12+
formId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
13+
version: 9223372036854775807,
14+
};
15+
16+
apiInstance
17+
.revertFormVersion(params)
18+
.then((data: v2.FormVersionResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9554,6 +9554,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
95549554
},
95559555
"operationResponseType": "FormPublicationResponse",
95569556
},
9557+
"v2.ListFormVersions": {
9558+
"formId": {
9559+
"type": "string",
9560+
"format": "uuid",
9561+
},
9562+
"operationResponseType": "ListFormVersionsResponse",
9563+
},
95579564
"v2.UpsertFormVersion": {
95589565
"formId": {
95599566
"type": "string",
@@ -9565,6 +9572,17 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
95659572
},
95669573
"operationResponseType": "FormVersionResponse",
95679574
},
9575+
"v2.RevertFormVersion": {
9576+
"formId": {
9577+
"type": "string",
9578+
"format": "uuid",
9579+
},
9580+
"version": {
9581+
"type": "number",
9582+
"format": "int64",
9583+
},
9584+
"operationResponseType": "FormVersionResponse",
9585+
},
95689586
"v2.UpsertAndPublishFormVersion": {
95699587
"formId": {
95709588
"type": "string",

features/v2/forms.feature

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,30 @@ Feature: Forms
143143
And the response "data.type" is equal to "forms"
144144
And the response "data.attributes.name" is equal to "{{ unique }}"
145145

146+
@generated @skip @team:DataDog/app-builder-backend
147+
Scenario: List form versions returns "Bad Request" response
148+
Given operation "ListFormVersions" enabled
149+
And new "ListFormVersions" request
150+
And request contains "form_id" parameter from "REPLACE.ME"
151+
When the request is sent
152+
Then the response status is 400 Bad Request
153+
154+
@generated @skip @team:DataDog/app-builder-backend
155+
Scenario: List form versions returns "Not Found" response
156+
Given operation "ListFormVersions" enabled
157+
And new "ListFormVersions" request
158+
And request contains "form_id" parameter from "REPLACE.ME"
159+
When the request is sent
160+
Then the response status is 404 Not Found
161+
162+
@generated @skip @team:DataDog/app-builder-backend
163+
Scenario: List form versions returns "OK" response
164+
Given operation "ListFormVersions" enabled
165+
And new "ListFormVersions" request
166+
And request contains "form_id" parameter from "REPLACE.ME"
167+
When the request is sent
168+
Then the response status is 200 OK
169+
146170
@generated @skip @team:DataDog/app-builder-backend
147171
Scenario: List forms returns "Bad Request" response
148172
Given operation "ListForms" enabled
@@ -189,6 +213,42 @@ Feature: Forms
189213
When the request is sent
190214
Then the response status is 200 OK
191215

216+
@generated @skip @team:DataDog/app-builder-backend
217+
Scenario: Revert a form to a prior version returns "Bad Request" response
218+
Given operation "RevertFormVersion" enabled
219+
And new "RevertFormVersion" request
220+
And request contains "form_id" parameter from "REPLACE.ME"
221+
And request contains "version" parameter from "REPLACE.ME"
222+
When the request is sent
223+
Then the response status is 400 Bad Request
224+
225+
@generated @skip @team:DataDog/app-builder-backend
226+
Scenario: Revert a form to a prior version returns "Conflict" response
227+
Given operation "RevertFormVersion" enabled
228+
And new "RevertFormVersion" request
229+
And request contains "form_id" parameter from "REPLACE.ME"
230+
And request contains "version" parameter from "REPLACE.ME"
231+
When the request is sent
232+
Then the response status is 409 Conflict
233+
234+
@generated @skip @team:DataDog/app-builder-backend
235+
Scenario: Revert a form to a prior version returns "Not Found" response
236+
Given operation "RevertFormVersion" enabled
237+
And new "RevertFormVersion" request
238+
And request contains "form_id" parameter from "REPLACE.ME"
239+
And request contains "version" parameter from "REPLACE.ME"
240+
When the request is sent
241+
Then the response status is 404 Not Found
242+
243+
@generated @skip @team:DataDog/app-builder-backend
244+
Scenario: Revert a form to a prior version returns "OK" response
245+
Given operation "RevertFormVersion" enabled
246+
And new "RevertFormVersion" request
247+
And request contains "form_id" parameter from "REPLACE.ME"
248+
And request contains "version" parameter from "REPLACE.ME"
249+
When the request is sent
250+
Then the response status is 200 OK
251+
192252
@generated @skip @team:DataDog/app-builder-backend
193253
Scenario: Update a form returns "Bad Request" response
194254
Given operation "UpdateForm" enabled

0 commit comments

Comments
 (0)