Skip to content

Commit a50313c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update DORA endpoints (#682)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent f956a2b commit a50313c

20 files changed

+513
-209
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-06-04 17:40:40.467497",
8-
"spec_repo_commit": "38b3c05a"
7+
"regenerated": "2025-06-05 08:11:20.110994",
8+
"spec_repo_commit": "0e7259ca"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-04 17:40:40.483266",
13-
"spec_repo_commit": "38b3c05a"
12+
"regenerated": "2025-06-05 08:11:20.126935",
13+
"spec_repo_commit": "0e7259ca"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 100 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11189,56 +11189,39 @@ components:
1118911189
description: The type of the event.
1119011190
type: string
1119111191
type: object
11192-
DORAFetchResponse:
11193-
description: Response for the DORA fetch endpoints.
11194-
properties:
11195-
data:
11196-
$ref: '#/components/schemas/DORAEvent'
11197-
type: object
11198-
DORAGitInfo:
11199-
description: Git info for DORA Metrics events.
11200-
properties:
11201-
commit_sha:
11202-
$ref: '#/components/schemas/GitCommitSHA'
11203-
repository_url:
11204-
$ref: '#/components/schemas/GitRepositoryURL'
11205-
required:
11206-
- repository_url
11207-
- commit_sha
11208-
type: object
11209-
DORAIncidentRequest:
11210-
description: Request to create a DORA incident event.
11192+
DORAFailureRequest:
11193+
description: Request to create a DORA failure event.
1121111194
properties:
1121211195
data:
11213-
$ref: '#/components/schemas/DORAIncidentRequestData'
11196+
$ref: '#/components/schemas/DORAFailureRequestData'
1121411197
required:
1121511198
- data
1121611199
type: object
11217-
DORAIncidentRequestAttributes:
11218-
description: Attributes to create a DORA incident event.
11200+
DORAFailureRequestAttributes:
11201+
description: Attributes to create a DORA failure event.
1121911202
properties:
1122011203
env:
11221-
description: Environment name that was impacted by the incident.
11204+
description: Environment name that was impacted by the failure.
1122211205
example: staging
1122311206
type: string
1122411207
finished_at:
11225-
description: Unix timestamp when the incident finished. It must be in nanoseconds,
11208+
description: Unix timestamp when the failure finished. It must be in nanoseconds,
1122611209
milliseconds, or seconds, and it should not be older than 1 hour.
1122711210
example: 1693491984000000000
1122811211
format: int64
1122911212
type: integer
1123011213
git:
1123111214
$ref: '#/components/schemas/DORAGitInfo'
1123211215
id:
11233-
description: Incident ID. Must have at least 16 characters. Required to
11234-
update a previously sent incident.
11216+
description: Failure ID. Must have at least 16 characters. Required to update
11217+
a previously sent failure.
1123511218
type: string
1123611219
name:
11237-
description: Incident name.
11220+
description: Failure name.
1123811221
example: Webserver is down failing all requests.
1123911222
type: string
1124011223
services:
11241-
description: Service names impacted by the incident. If possible, use names
11224+
description: Service names impacted by the failure. If possible, use names
1124211225
registered in the Service Catalog. Required when the team field is not
1124311226
provided.
1124411227
example:
@@ -11247,11 +11230,11 @@ components:
1124711230
type: string
1124811231
type: array
1124911232
severity:
11250-
description: Incident severity.
11233+
description: Failure severity.
1125111234
example: High
1125211235
type: string
1125311236
started_at:
11254-
description: Unix timestamp when the incident started. It must be in nanoseconds,
11237+
description: Unix timestamp when the failure started. It must be in nanoseconds,
1125511238
milliseconds, or seconds.
1125611239
example: 1693491974000000000
1125711240
format: int64
@@ -11269,43 +11252,60 @@ components:
1126911252
required:
1127011253
- started_at
1127111254
type: object
11272-
DORAIncidentRequestData:
11255+
DORAFailureRequestData:
1127311256
description: The JSON:API data.
1127411257
properties:
1127511258
attributes:
11276-
$ref: '#/components/schemas/DORAIncidentRequestAttributes'
11259+
$ref: '#/components/schemas/DORAFailureRequestAttributes'
1127711260
required:
1127811261
- attributes
1127911262
type: object
11280-
DORAIncidentResponse:
11281-
description: Response after receiving a DORA incident event.
11263+
DORAFailureResponse:
11264+
description: Response after receiving a DORA failure event.
1128211265
properties:
1128311266
data:
11284-
$ref: '#/components/schemas/DORAIncidentResponseData'
11267+
$ref: '#/components/schemas/DORAFailureResponseData'
1128511268
required:
1128611269
- data
1128711270
type: object
11288-
DORAIncidentResponseData:
11289-
description: Response after receiving a DORA incident event.
11271+
DORAFailureResponseData:
11272+
description: Response after receiving a DORA failure event.
1129011273
properties:
1129111274
id:
11292-
description: The ID of the received DORA incident event.
11275+
description: The ID of the received DORA failure event.
1129311276
example: 4242fcdd31586083
1129411277
type: string
1129511278
type:
11296-
$ref: '#/components/schemas/DORAIncidentType'
11279+
$ref: '#/components/schemas/DORAFailureType'
1129711280
required:
1129811281
- id
1129911282
type: object
11300-
DORAIncidentType:
11301-
default: dora_incident
11302-
description: JSON:API type for DORA incident events.
11283+
DORAFailureType:
11284+
default: dora_failure
11285+
description: JSON:API type for DORA failure events.
1130311286
enum:
11304-
- dora_incident
11305-
example: dora_incident
11287+
- dora_failure
11288+
example: dora_failure
1130611289
type: string
1130711290
x-enum-varnames:
11308-
- DORA_INCIDENT
11291+
- DORA_FAILURE
11292+
DORAFetchResponse:
11293+
description: Response for the DORA fetch endpoints.
11294+
properties:
11295+
data:
11296+
$ref: '#/components/schemas/DORAEvent'
11297+
type: object
11298+
DORAGitInfo:
11299+
description: Git info for DORA Metrics events.
11300+
properties:
11301+
commit_sha:
11302+
$ref: '#/components/schemas/GitCommitSHA'
11303+
repository_url:
11304+
$ref: '#/components/schemas/GitRepositoryURL'
11305+
required:
11306+
- repository_url
11307+
- commit_sha
11308+
type: object
1130911309
DORAListDeploymentsRequest:
1131011310
description: Request to get a list of deployments.
1131111311
properties:
@@ -46094,9 +46094,6 @@ paths:
4609446094
tags:
4609546095
- DORA Metrics
4609646096
x-codegen-request-body-name: body
46097-
x-unstable: '**Note**: This endpoint is in public beta.
46098-
46099-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4610046097
/api/v2/dora/deployments:
4610146098
post:
4610246099
description: Use this API endpoint to get a list of deployment events.
@@ -46174,6 +46171,52 @@ paths:
4617446171
operator: OR
4617546172
permissions:
4617646173
- dora_metrics_read
46174+
/api/v2/dora/failure:
46175+
post:
46176+
description: 'Use this API endpoint to provide failure data for DORA metrics.
46177+
46178+
46179+
This is necessary for:
46180+
46181+
- Change Failure Rate
46182+
46183+
- Time to Restore'
46184+
operationId: CreateDORAFailure
46185+
requestBody:
46186+
content:
46187+
application/json:
46188+
schema:
46189+
$ref: '#/components/schemas/DORAFailureRequest'
46190+
required: true
46191+
responses:
46192+
'200':
46193+
content:
46194+
application/json:
46195+
schema:
46196+
$ref: '#/components/schemas/DORAFailureResponse'
46197+
description: OK
46198+
'202':
46199+
content:
46200+
application/json:
46201+
schema:
46202+
$ref: '#/components/schemas/DORAFailureResponse'
46203+
description: OK - but delayed due to incident
46204+
'400':
46205+
content:
46206+
application/json:
46207+
schema:
46208+
$ref: '#/components/schemas/JSONAPIErrorResponse'
46209+
description: Bad Request
46210+
'403':
46211+
$ref: '#/components/responses/NotAuthorizedResponse'
46212+
'429':
46213+
$ref: '#/components/responses/TooManyRequestsResponse'
46214+
security:
46215+
- apiKeyAuth: []
46216+
summary: Send a failure event for DORA Metrics
46217+
tags:
46218+
- DORA Metrics
46219+
x-codegen-request-body-name: body
4617746220
/api/v2/dora/failures:
4617846221
post:
4617946222
description: Use this API endpoint to get a list of failure events.
@@ -46253,7 +46296,12 @@ paths:
4625346296
- dora_metrics_read
4625446297
/api/v2/dora/incident:
4625546298
post:
46256-
description: 'Use this API endpoint to provide failure data for DORA metrics.
46299+
deprecated: true
46300+
description: '**Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure`
46301+
instead.
46302+
46303+
46304+
Use this API endpoint to provide failure data for DORA metrics.
4625746305

4625846306

4625946307
This is necessary for:
@@ -46266,20 +46314,20 @@ paths:
4626646314
content:
4626746315
application/json:
4626846316
schema:
46269-
$ref: '#/components/schemas/DORAIncidentRequest'
46317+
$ref: '#/components/schemas/DORAFailureRequest'
4627046318
required: true
4627146319
responses:
4627246320
'200':
4627346321
content:
4627446322
application/json:
4627546323
schema:
46276-
$ref: '#/components/schemas/DORAIncidentResponse'
46324+
$ref: '#/components/schemas/DORAFailureResponse'
4627746325
description: OK
4627846326
'202':
4627946327
content:
4628046328
application/json:
4628146329
schema:
46282-
$ref: '#/components/schemas/DORAIncidentResponse'
46330+
$ref: '#/components/schemas/DORAFailureResponse'
4628346331
description: OK - but delayed due to incident
4628446332
'400':
4628546333
content:
@@ -46297,9 +46345,6 @@ paths:
4629746345
tags:
4629846346
- DORA Metrics
4629946347
x-codegen-request-body-name: body
46300-
x-unstable: '**Note**: This endpoint is in public beta.
46301-
46302-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4630346348
/api/v2/downtime:
4630446349
get:
4630546350
description: Get all scheduled downtimes.

examples/v2_dora-metrics_CreateDORADeployment.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ async fn main() {
2020
))
2121
.version("v1.12.07".to_string()),
2222
));
23-
let mut configuration = datadog::Configuration::new();
24-
configuration.set_unstable_operation_enabled("v2.CreateDORADeployment", true);
23+
let configuration = datadog::Configuration::new();
2524
let api = DORAMetricsAPI::with_config(configuration);
2625
let resp = api.create_dora_deployment(body).await;
2726
if let Ok(value) = resp {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Send a failure event for DORA Metrics returns "OK - but delayed due to
2+
// incident" response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV2::api_dora_metrics::DORAMetricsAPI;
5+
use datadog_api_client::datadogV2::model::DORAFailureRequest;
6+
use datadog_api_client::datadogV2::model::DORAFailureRequestAttributes;
7+
use datadog_api_client::datadogV2::model::DORAFailureRequestData;
8+
use datadog_api_client::datadogV2::model::DORAGitInfo;
9+
10+
#[tokio::main]
11+
async fn main() {
12+
let body = DORAFailureRequest::new(DORAFailureRequestData::new(
13+
DORAFailureRequestAttributes::new(1693491974000000000)
14+
.env("staging".to_string())
15+
.finished_at(1693491984000000000)
16+
.git(DORAGitInfo::new(
17+
"66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
18+
"https://github.com/organization/example-repository".to_string(),
19+
))
20+
.name("Webserver is down failing all requests.".to_string())
21+
.services(vec!["shopist".to_string()])
22+
.severity("High".to_string())
23+
.team("backend".to_string())
24+
.version("v1.12.07".to_string()),
25+
));
26+
let configuration = datadog::Configuration::new();
27+
let api = DORAMetricsAPI::with_config(configuration);
28+
let resp = api.create_dora_failure(body).await;
29+
if let Ok(value) = resp {
30+
println!("{:#?}", value);
31+
} else {
32+
println!("{:#?}", resp.unwrap_err());
33+
}
34+
}

examples/v2_dora-metrics_CreateDORAIncident.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
// Send an incident event for DORA Metrics returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_dora_metrics::DORAMetricsAPI;
4+
use datadog_api_client::datadogV2::model::DORAFailureRequest;
5+
use datadog_api_client::datadogV2::model::DORAFailureRequestAttributes;
6+
use datadog_api_client::datadogV2::model::DORAFailureRequestData;
47
use datadog_api_client::datadogV2::model::DORAGitInfo;
5-
use datadog_api_client::datadogV2::model::DORAIncidentRequest;
6-
use datadog_api_client::datadogV2::model::DORAIncidentRequestAttributes;
7-
use datadog_api_client::datadogV2::model::DORAIncidentRequestData;
88

99
#[tokio::main]
1010
async fn main() {
11-
let body = DORAIncidentRequest::new(DORAIncidentRequestData::new(
12-
DORAIncidentRequestAttributes::new(1707842944500000000)
13-
.finished_at(1707842944600000000)
11+
let body = DORAFailureRequest::new(DORAFailureRequestData::new(
12+
DORAFailureRequestAttributes::new(1693491974000000000)
13+
.env("staging".to_string())
14+
.finished_at(1693491984000000000)
1415
.git(DORAGitInfo::new(
1516
"66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
1617
"https://github.com/organization/example-repository".to_string(),
1718
))
18-
.name("Webserver is down failing all requests".to_string())
19+
.name("Webserver is down failing all requests.".to_string())
1920
.services(vec!["shopist".to_string()])
2021
.severity("High".to_string())
2122
.team("backend".to_string())
2223
.version("v1.12.07".to_string()),
2324
));
24-
let mut configuration = datadog::Configuration::new();
25-
configuration.set_unstable_operation_enabled("v2.CreateDORAIncident", true);
25+
let configuration = datadog::Configuration::new();
2626
let api = DORAMetricsAPI::with_config(configuration);
2727
let resp = api.create_dora_incident(body).await;
2828
if let Ok(value) = resp {

0 commit comments

Comments
 (0)