Skip to content

Commit 3f2e17f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 61e9439 of spec repo
1 parent e181b9e commit 3f2e17f

15 files changed

Lines changed: 912 additions & 9 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 207 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39804,7 +39804,9 @@ components:
3980439804
nullable: true
3980539805
type: string
3980639806
has_submitted:
39807-
description: Whether the current user has already submitted this form. Only present for forms with `single_response` set to `true`.
39807+
description: |-
39808+
Whether the current user has already submitted this form. Only present for forms with
39809+
`single_response` set to `true`.
3980839810
nullable: true
3980939811
type: boolean
3981039812
idp_survey:
@@ -40119,6 +40121,10 @@ components:
4011940121
example: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
4012040122
nullable: true
4012140123
type: string
40124+
has_ever_been_published:
40125+
description: Whether this version number has ever appeared in the form's publication history.
40126+
example: true
40127+
type: boolean
4012240128
id:
4012340129
description: The ID of the form version.
4012440130
example: "126"
@@ -40175,6 +40181,15 @@ components:
4017540181
- type
4017640182
- attributes
4017740183
type: object
40184+
FormVersionListType:
40185+
default: form_version_lists
40186+
description: The resource type for a list of form versions.
40187+
enum:
40188+
- form_version_lists
40189+
example: form_version_lists
40190+
type: string
40191+
x-enum-varnames:
40192+
- FORM_VERSION_LISTS
4017840193
FormVersionResponse:
4017940194
description: A response containing a single form version.
4018040195
properties:
@@ -58917,6 +58932,41 @@ components:
5891758932
- data
5891858933
- meta
5891958934
type: object
58935+
ListFormVersionsData:
58936+
description: A list-of-form-versions resource object.
58937+
properties:
58938+
attributes:
58939+
$ref: "#/components/schemas/ListFormVersionsDataAttributes"
58940+
id:
58941+
description: The ID of the form.
58942+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
58943+
type: string
58944+
type:
58945+
$ref: "#/components/schemas/FormVersionListType"
58946+
required:
58947+
- id
58948+
- type
58949+
- attributes
58950+
type: object
58951+
ListFormVersionsDataAttributes:
58952+
description: The attributes for a list of form versions.
58953+
properties:
58954+
versions:
58955+
description: The list of versions for the form.
58956+
items:
58957+
$ref: "#/components/schemas/FormVersionAttributes"
58958+
type: array
58959+
required:
58960+
- versions
58961+
type: object
58962+
ListFormVersionsResponse:
58963+
description: A response containing the list of versions for a form.
58964+
properties:
58965+
data:
58966+
$ref: "#/components/schemas/ListFormVersionsData"
58967+
required:
58968+
- data
58969+
type: object
5892058970
ListHistoricalJobsResponse:
5892158971
description: List of historical jobs.
5892258972
properties:
@@ -139209,7 +139259,9 @@ paths:
139209139259
**Note**: This endpoint is in preview and is subject to change.
139210139260
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139211139261
post:
139212-
description: Create a new form. The form is created in draft mode and must be published before it can be used. This also creates a new datastore for form responses and links it to the form.
139262+
description: |-
139263+
Create a new form. The form is created in draft mode and must be published before it can be used. This
139264+
also creates a new datastore for form responses and links it to the form.
139213139265
operationId: CreateForm
139214139266
requestBody:
139215139267
content:
@@ -139283,7 +139335,9 @@ paths:
139283139335
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139284139336
/api/v2/forms/create_and_publish:
139285139337
post:
139286-
description: Creates a new form and immediately publishes its initial version. This also creates a new datastore for form responses and links it to the form.
139338+
description: |-
139339+
Creates a new form and immediately publishes its initial version. This also creates a new datastore for
139340+
form responses and links it to the form.
139287139341
operationId: CreateAndPublishForm
139288139342
requestBody:
139289139343
content:
@@ -139413,7 +139467,9 @@ paths:
139413139467
schema:
139414139468
format: uuid
139415139469
type: string
139416-
- description: The version of the form to retrieve. Use 'latest' for the most recent draft, 'published' for the last published version, or a specific version number.
139470+
- description: |-
139471+
The version of the form to retrieve. Use 'latest' for the most recent draft, 'published' for the
139472+
last published version, or a specific version number.
139417139473
in: query
139418139474
name: version
139419139475
required: false
@@ -139720,6 +139776,72 @@ paths:
139720139776
**Note**: This endpoint is in preview and is subject to change.
139721139777
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139722139778
/api/v2/forms/{form_id}/versions:
139779+
get:
139780+
description: List all versions of a form.
139781+
operationId: ListFormVersions
139782+
parameters:
139783+
- description: The ID of the form.
139784+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
139785+
in: path
139786+
name: form_id
139787+
required: true
139788+
schema:
139789+
format: uuid
139790+
type: string
139791+
responses:
139792+
"200":
139793+
content:
139794+
application/json:
139795+
examples:
139796+
default:
139797+
value:
139798+
data:
139799+
attributes:
139800+
versions:
139801+
- created_at: "2026-05-29T20:06:14.895921Z"
139802+
data_definition: {}
139803+
definition_signature: >-
139804+
{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
139805+
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
139806+
has_ever_been_published: true
139807+
id: "126"
139808+
modified_at: "2026-05-29T20:06:14.949163Z"
139809+
state: draft
139810+
ui_definition: {}
139811+
user_id: 10001
139812+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
139813+
version: 2
139814+
id: 22f6006a-2302-4926-9396-d2dfcf7b0b34
139815+
type: form_version_lists
139816+
schema:
139817+
$ref: "#/components/schemas/ListFormVersionsResponse"
139818+
description: OK
139819+
"400":
139820+
content:
139821+
application/json:
139822+
schema:
139823+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139824+
description: Bad Request
139825+
"401":
139826+
content:
139827+
application/json:
139828+
schema:
139829+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139830+
description: Unauthorized
139831+
"404":
139832+
content:
139833+
application/json:
139834+
schema:
139835+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139836+
description: Not Found
139837+
"429":
139838+
$ref: "#/components/responses/TooManyRequestsResponse"
139839+
summary: List form versions
139840+
tags:
139841+
- Forms
139842+
x-unstable: |-
139843+
**Note**: This endpoint is in preview and is subject to change.
139844+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139723139845
post:
139724139846
description: |-
139725139847
Create or update the latest draft version of a form. The `upsert_params` field controls
@@ -139763,7 +139885,8 @@ paths:
139763139885
created_at: "2026-05-29T20:06:14.895921Z"
139764139886
data_definition:
139765139887
$ref: "#/components/schemas/FormDataDefinition"
139766-
definition_signature: '{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}'
139888+
definition_signature: >-
139889+
{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
139767139890
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
139768139891
modified_at: "2026-05-29T20:06:14.949163Z"
139769139892
state: draft
@@ -139802,6 +139925,85 @@ paths:
139802139925
x-unstable: |-
139803139926
**Note**: This endpoint is in preview and is subject to change.
139804139927
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139928+
/api/v2/forms/{form_id}/versions/revert:
139929+
post:
139930+
description: Revert a form to a prior version by creating a new draft version copied from it.
139931+
operationId: RevertFormVersion
139932+
parameters:
139933+
- description: The ID of the form.
139934+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
139935+
in: path
139936+
name: form_id
139937+
required: true
139938+
schema:
139939+
format: uuid
139940+
type: string
139941+
- description: The version number to revert to.
139942+
example: 1
139943+
in: query
139944+
name: version
139945+
required: true
139946+
schema:
139947+
format: int64
139948+
type: integer
139949+
responses:
139950+
"200":
139951+
content:
139952+
application/json:
139953+
examples:
139954+
default:
139955+
value:
139956+
data:
139957+
attributes:
139958+
created_at: "2026-05-29T20:10:14.895921Z"
139959+
data_definition:
139960+
$ref: "#/components/schemas/FormDataDefinition"
139961+
definition_signature: >-
139962+
{"signature":"c8f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
139963+
etag: c61f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
139964+
modified_at: "2026-05-29T20:10:14.949163Z"
139965+
state: draft
139966+
ui_definition: {}
139967+
user_id: 10001
139968+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
139969+
version: 3
139970+
id: "127"
139971+
type: form_versions
139972+
schema:
139973+
$ref: "#/components/schemas/FormVersionResponse"
139974+
description: OK
139975+
"400":
139976+
content:
139977+
application/json:
139978+
schema:
139979+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139980+
description: Bad Request
139981+
"401":
139982+
content:
139983+
application/json:
139984+
schema:
139985+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139986+
description: Unauthorized
139987+
"404":
139988+
content:
139989+
application/json:
139990+
schema:
139991+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139992+
description: Not Found
139993+
"409":
139994+
content:
139995+
application/json:
139996+
schema:
139997+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139998+
description: Conflict
139999+
"429":
140000+
$ref: "#/components/responses/TooManyRequestsResponse"
140001+
summary: Revert a form to a prior version
140002+
tags:
140003+
- Forms
140004+
x-unstable: |-
140005+
**Note**: This endpoint is in preview and is subject to change.
140006+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139805140007
/api/v2/forms/{form_id}/versions/upsert_and_publish:
139806140008
post:
139807140009
description: Upsert the latest form version and publish it in a single atomic transaction.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List form versions returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_form_versions".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::FormsAPI.new
8+
p api_instance.list_form_versions("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Revert a form to a prior version returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.revert_form_version".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::FormsAPI.new
8+
p api_instance.revert_form_version("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", 9223372036854775807)

features/scenarios_model_mapping.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3409,10 +3409,17 @@
34093409
"form_id" => "UUID",
34103410
"body" => "PublishFormRequest",
34113411
},
3412+
"v2.ListFormVersions" => {
3413+
"form_id" => "UUID",
3414+
},
34123415
"v2.UpsertFormVersion" => {
34133416
"form_id" => "UUID",
34143417
"body" => "UpsertFormVersionRequest",
34153418
},
3419+
"v2.RevertFormVersion" => {
3420+
"form_id" => "UUID",
3421+
"version" => "Integer",
3422+
},
34163423
"v2.UpsertAndPublishFormVersion" => {
34173424
"form_id" => "UUID",
34183425
"body" => "UpsertAndPublishFormVersionRequest",

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)