Skip to content

Commit c0e0f03

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

15 files changed

Lines changed: 1039 additions & 12 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// List form versions returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_forms::FormsAPI;
4+
use uuid::Uuid;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.ListFormVersions", true);
10+
let api = FormsAPI::with_config(configuration);
11+
let resp = api
12+
.list_form_versions(
13+
Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
14+
)
15+
.await;
16+
if let Ok(value) = resp {
17+
println!("{:#?}", value);
18+
} else {
19+
println!("{:#?}", resp.unwrap_err());
20+
}
21+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Revert a form to a prior version returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_forms::FormsAPI;
4+
use uuid::Uuid;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.RevertFormVersion", true);
10+
let api = FormsAPI::with_config(configuration);
11+
let resp = api
12+
.revert_form_version(
13+
Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
14+
9223372036854775807,
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}

src/datadog/configuration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,9 @@ impl Default for Configuration {
536536
("v2.delete_form".to_owned(), false),
537537
("v2.get_form".to_owned(), false),
538538
("v2.list_forms".to_owned(), false),
539+
("v2.list_form_versions".to_owned(), false),
539540
("v2.publish_form".to_owned(), false),
541+
("v2.revert_form_version".to_owned(), false),
540542
("v2.update_form".to_owned(), false),
541543
("v2.upsert_and_publish_form_version".to_owned(), false),
542544
("v2.upsert_form_version".to_owned(), false),

0 commit comments

Comments
 (0)