Skip to content

Commit 9a4fbc9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c1a4596 of spec repo
1 parent 6916e26 commit 9a4fbc9

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:
@@ -139326,7 +139376,9 @@ paths:
139326139376
**Note**: This endpoint is in preview and is subject to change.
139327139377
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139328139378
post:
139329-
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.
139379+
description: |-
139380+
Create a new form. The form is created in draft mode and must be published before it can be used. This
139381+
also creates a new datastore for form responses and links it to the form.
139330139382
operationId: CreateForm
139331139383
requestBody:
139332139384
content:
@@ -139400,7 +139452,9 @@ paths:
139400139452
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139401139453
/api/v2/forms/create_and_publish:
139402139454
post:
139403-
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.
139455+
description: |-
139456+
Creates a new form and immediately publishes its initial version. This also creates a new datastore for
139457+
form responses and links it to the form.
139404139458
operationId: CreateAndPublishForm
139405139459
requestBody:
139406139460
content:
@@ -139530,7 +139584,9 @@ paths:
139530139584
schema:
139531139585
format: uuid
139532139586
type: string
139533-
- 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.
139587+
- description: |-
139588+
The version of the form to retrieve. Use 'latest' for the most recent draft, 'published' for the
139589+
last published version, or a specific version number.
139534139590
in: query
139535139591
name: version
139536139592
required: false
@@ -139837,6 +139893,72 @@ paths:
139837139893
**Note**: This endpoint is in preview and is subject to change.
139838139894
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139839139895
/api/v2/forms/{form_id}/versions:
139896+
get:
139897+
description: List all versions of a form.
139898+
operationId: ListFormVersions
139899+
parameters:
139900+
- description: The ID of the form.
139901+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
139902+
in: path
139903+
name: form_id
139904+
required: true
139905+
schema:
139906+
format: uuid
139907+
type: string
139908+
responses:
139909+
"200":
139910+
content:
139911+
application/json:
139912+
examples:
139913+
default:
139914+
value:
139915+
data:
139916+
attributes:
139917+
versions:
139918+
- created_at: "2026-05-29T20:06:14.895921Z"
139919+
data_definition: {}
139920+
definition_signature: >-
139921+
{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
139922+
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
139923+
has_ever_been_published: true
139924+
id: "126"
139925+
modified_at: "2026-05-29T20:06:14.949163Z"
139926+
state: draft
139927+
ui_definition: {}
139928+
user_id: 10001
139929+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
139930+
version: 2
139931+
id: 22f6006a-2302-4926-9396-d2dfcf7b0b34
139932+
type: form_version_lists
139933+
schema:
139934+
$ref: "#/components/schemas/ListFormVersionsResponse"
139935+
description: OK
139936+
"400":
139937+
content:
139938+
application/json:
139939+
schema:
139940+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139941+
description: Bad Request
139942+
"401":
139943+
content:
139944+
application/json:
139945+
schema:
139946+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139947+
description: Unauthorized
139948+
"404":
139949+
content:
139950+
application/json:
139951+
schema:
139952+
$ref: "#/components/schemas/JSONAPIErrorResponse"
139953+
description: Not Found
139954+
"429":
139955+
$ref: "#/components/responses/TooManyRequestsResponse"
139956+
summary: List form versions
139957+
tags:
139958+
- Forms
139959+
x-unstable: |-
139960+
**Note**: This endpoint is in preview and is subject to change.
139961+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139840139962
post:
139841139963
description: |-
139842139964
Create or update the latest draft version of a form. The `upsert_params` field controls
@@ -139880,7 +140002,8 @@ paths:
139880140002
created_at: "2026-05-29T20:06:14.895921Z"
139881140003
data_definition:
139882140004
$ref: "#/components/schemas/FormDataDefinition"
139883-
definition_signature: '{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}'
140005+
definition_signature: >-
140006+
{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
139884140007
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
139885140008
modified_at: "2026-05-29T20:06:14.949163Z"
139886140009
state: draft
@@ -139919,6 +140042,85 @@ paths:
139919140042
x-unstable: |-
139920140043
**Note**: This endpoint is in preview and is subject to change.
139921140044
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
140045+
/api/v2/forms/{form_id}/versions/revert:
140046+
post:
140047+
description: Revert a form to a prior version by creating a new draft version copied from it.
140048+
operationId: RevertFormVersion
140049+
parameters:
140050+
- description: The ID of the form.
140051+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
140052+
in: path
140053+
name: form_id
140054+
required: true
140055+
schema:
140056+
format: uuid
140057+
type: string
140058+
- description: The version number to revert to.
140059+
example: 1
140060+
in: query
140061+
name: version
140062+
required: true
140063+
schema:
140064+
format: int64
140065+
type: integer
140066+
responses:
140067+
"200":
140068+
content:
140069+
application/json:
140070+
examples:
140071+
default:
140072+
value:
140073+
data:
140074+
attributes:
140075+
created_at: "2026-05-29T20:10:14.895921Z"
140076+
data_definition:
140077+
$ref: "#/components/schemas/FormDataDefinition"
140078+
definition_signature: >-
140079+
{"signature":"c8f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
140080+
etag: c61f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
140081+
modified_at: "2026-05-29T20:10:14.949163Z"
140082+
state: draft
140083+
ui_definition: {}
140084+
user_id: 10001
140085+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
140086+
version: 3
140087+
id: "127"
140088+
type: form_versions
140089+
schema:
140090+
$ref: "#/components/schemas/FormVersionResponse"
140091+
description: OK
140092+
"400":
140093+
content:
140094+
application/json:
140095+
schema:
140096+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140097+
description: Bad Request
140098+
"401":
140099+
content:
140100+
application/json:
140101+
schema:
140102+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140103+
description: Unauthorized
140104+
"404":
140105+
content:
140106+
application/json:
140107+
schema:
140108+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140109+
description: Not Found
140110+
"409":
140111+
content:
140112+
application/json:
140113+
schema:
140114+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140115+
description: Conflict
140116+
"429":
140117+
$ref: "#/components/responses/TooManyRequestsResponse"
140118+
summary: Revert a form to a prior version
140119+
tags:
140120+
- Forms
140121+
x-unstable: |-
140122+
**Note**: This endpoint is in preview and is subject to change.
140123+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139922140124
/api/v2/forms/{form_id}/versions/upsert_and_publish:
139923140125
post:
139924140126
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
@@ -579,7 +579,9 @@ impl Default for Configuration {
579579
("v2.delete_form".to_owned(), false),
580580
("v2.get_form".to_owned(), false),
581581
("v2.list_forms".to_owned(), false),
582+
("v2.list_form_versions".to_owned(), false),
582583
("v2.publish_form".to_owned(), false),
584+
("v2.revert_form_version".to_owned(), false),
583585
("v2.update_form".to_owned(), false),
584586
("v2.upsert_and_publish_form_version".to_owned(), false),
585587
("v2.upsert_form_version".to_owned(), false),

0 commit comments

Comments
 (0)