Skip to content

Commit 02b70de

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8db9dd2 of spec repo
1 parent 097b605 commit 02b70de

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:
@@ -139534,7 +139584,9 @@ paths:
139534139584
**Note**: This endpoint is in preview and is subject to change.
139535139585
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139536139586
post:
139537-
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.
139587+
description: |-
139588+
Create a new form. The form is created in draft mode and must be published before it can be used. This
139589+
also creates a new datastore for form responses and links it to the form.
139538139590
operationId: CreateForm
139539139591
requestBody:
139540139592
content:
@@ -139608,7 +139660,9 @@ paths:
139608139660
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
139609139661
/api/v2/forms/create_and_publish:
139610139662
post:
139611-
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.
139663+
description: |-
139664+
Creates a new form and immediately publishes its initial version. This also creates a new datastore for
139665+
form responses and links it to the form.
139612139666
operationId: CreateAndPublishForm
139613139667
requestBody:
139614139668
content:
@@ -139738,7 +139792,9 @@ paths:
139738139792
schema:
139739139793
format: uuid
139740139794
type: string
139741-
- 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.
139795+
- description: |-
139796+
The version of the form to retrieve. Use 'latest' for the most recent draft, 'published' for the
139797+
last published version, or a specific version number.
139742139798
in: query
139743139799
name: version
139744139800
required: false
@@ -140045,6 +140101,72 @@ paths:
140045140101
**Note**: This endpoint is in preview and is subject to change.
140046140102
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
140047140103
/api/v2/forms/{form_id}/versions:
140104+
get:
140105+
description: List all versions of a form.
140106+
operationId: ListFormVersions
140107+
parameters:
140108+
- description: The ID of the form.
140109+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
140110+
in: path
140111+
name: form_id
140112+
required: true
140113+
schema:
140114+
format: uuid
140115+
type: string
140116+
responses:
140117+
"200":
140118+
content:
140119+
application/json:
140120+
examples:
140121+
default:
140122+
value:
140123+
data:
140124+
attributes:
140125+
versions:
140126+
- created_at: "2026-05-29T20:06:14.895921Z"
140127+
data_definition: {}
140128+
definition_signature: >-
140129+
{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
140130+
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
140131+
has_ever_been_published: true
140132+
id: "126"
140133+
modified_at: "2026-05-29T20:06:14.949163Z"
140134+
state: draft
140135+
ui_definition: {}
140136+
user_id: 10001
140137+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
140138+
version: 2
140139+
id: 22f6006a-2302-4926-9396-d2dfcf7b0b34
140140+
type: form_version_lists
140141+
schema:
140142+
$ref: "#/components/schemas/ListFormVersionsResponse"
140143+
description: OK
140144+
"400":
140145+
content:
140146+
application/json:
140147+
schema:
140148+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140149+
description: Bad Request
140150+
"401":
140151+
content:
140152+
application/json:
140153+
schema:
140154+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140155+
description: Unauthorized
140156+
"404":
140157+
content:
140158+
application/json:
140159+
schema:
140160+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140161+
description: Not Found
140162+
"429":
140163+
$ref: "#/components/responses/TooManyRequestsResponse"
140164+
summary: List form versions
140165+
tags:
140166+
- Forms
140167+
x-unstable: |-
140168+
**Note**: This endpoint is in preview and is subject to change.
140169+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
140048140170
post:
140049140171
description: |-
140050140172
Create or update the latest draft version of a form. The `upsert_params` field controls
@@ -140088,7 +140210,8 @@ paths:
140088140210
created_at: "2026-05-29T20:06:14.895921Z"
140089140211
data_definition:
140090140212
$ref: "#/components/schemas/FormDataDefinition"
140091-
definition_signature: '{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}'
140213+
definition_signature: >-
140214+
{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
140092140215
etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
140093140216
modified_at: "2026-05-29T20:06:14.949163Z"
140094140217
state: draft
@@ -140127,6 +140250,85 @@ paths:
140127140250
x-unstable: |-
140128140251
**Note**: This endpoint is in preview and is subject to change.
140129140252
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
140253+
/api/v2/forms/{form_id}/versions/revert:
140254+
post:
140255+
description: Revert a form to a prior version by creating a new draft version copied from it.
140256+
operationId: RevertFormVersion
140257+
parameters:
140258+
- description: The ID of the form.
140259+
example: 22f6006a-2302-4926-9396-d2dfcf7b0b34
140260+
in: path
140261+
name: form_id
140262+
required: true
140263+
schema:
140264+
format: uuid
140265+
type: string
140266+
- description: The version number to revert to.
140267+
example: 1
140268+
in: query
140269+
name: version
140270+
required: true
140271+
schema:
140272+
format: int64
140273+
type: integer
140274+
responses:
140275+
"200":
140276+
content:
140277+
application/json:
140278+
examples:
140279+
default:
140280+
value:
140281+
data:
140282+
attributes:
140283+
created_at: "2026-05-29T20:10:14.895921Z"
140284+
data_definition:
140285+
$ref: "#/components/schemas/FormDataDefinition"
140286+
definition_signature: >-
140287+
{"signature":"c8f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545", "version":1}
140288+
etag: c61f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d
140289+
modified_at: "2026-05-29T20:10:14.949163Z"
140290+
state: draft
140291+
ui_definition: {}
140292+
user_id: 10001
140293+
user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978
140294+
version: 3
140295+
id: "127"
140296+
type: form_versions
140297+
schema:
140298+
$ref: "#/components/schemas/FormVersionResponse"
140299+
description: OK
140300+
"400":
140301+
content:
140302+
application/json:
140303+
schema:
140304+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140305+
description: Bad Request
140306+
"401":
140307+
content:
140308+
application/json:
140309+
schema:
140310+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140311+
description: Unauthorized
140312+
"404":
140313+
content:
140314+
application/json:
140315+
schema:
140316+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140317+
description: Not Found
140318+
"409":
140319+
content:
140320+
application/json:
140321+
schema:
140322+
$ref: "#/components/schemas/JSONAPIErrorResponse"
140323+
description: Conflict
140324+
"429":
140325+
$ref: "#/components/responses/TooManyRequestsResponse"
140326+
summary: Revert a form to a prior version
140327+
tags:
140328+
- Forms
140329+
x-unstable: |-
140330+
**Note**: This endpoint is in preview and is subject to change.
140331+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
140130140332
/api/v2/forms/{form_id}/versions/upsert_and_publish:
140131140333
post:
140132140334
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
@@ -537,7 +537,9 @@ impl Default for Configuration {
537537
("v2.delete_form".to_owned(), false),
538538
("v2.get_form".to_owned(), false),
539539
("v2.list_forms".to_owned(), false),
540+
("v2.list_form_versions".to_owned(), false),
540541
("v2.publish_form".to_owned(), false),
542+
("v2.revert_form_version".to_owned(), false),
541543
("v2.update_form".to_owned(), false),
542544
("v2.upsert_and_publish_form_version".to_owned(), false),
543545
("v2.upsert_form_version".to_owned(), false),

0 commit comments

Comments
 (0)