Skip to content

Commit 007a4e6

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

File tree

21 files changed

+457
-168
lines changed

21 files changed

+457
-168
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:37.542641",
8-
"spec_repo_commit": "38b3c05a"
7+
"regenerated": "2025-06-05 08:11:19.271303",
8+
"spec_repo_commit": "0e7259ca"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-04 17:40:37.559899",
13-
"spec_repo_commit": "38b3c05a"
12+
"regenerated": "2025-06-05 08:11:19.287369",
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.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"log": {
3-
"_recordingName": "DORA Metrics/Send an incident event for DORA Metrics returns \"OK\" response",
3+
"_recordingName": "DORA Metrics/Send a failure event for DORA Metrics returns \"OK\" response",
44
"creator": {
55
"comment": "persister:fs",
66
"name": "Polly.JS",
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/vnd.api+json",
4444
"size": 77,
45-
"text": "{\"data\":{\"id\":\"2775a2d3-6c28-4934-ae60-0ef9ce3720ee\",\"type\":\"dora_incident\"}}"
45+
"text": "{\"data\":{\"id\":\"2775a2d3-6c28-4934-ae60-0ef9ce3720ee\",\"type\":\"dora_failure\"}}"
4646
},
4747
"cookies": [],
4848
"headers": [

examples/v2/dora-metrics/CreateDORADeployment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.createDORADeployment"] = true;
98
const apiInstance = new v2.DORAMetricsApi(configuration);
109

1110
const params: v2.DORAMetricsApiCreateDORADeploymentRequest = {
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.DORAMetricsApi(configuration);
9+
10+
const params: v2.DORAMetricsApiCreateDORAFailureRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
env: "staging",
15+
finishedAt: 1693491984000000000,
16+
git: {
17+
commitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
18+
repositoryUrl: "https://github.com/organization/example-repository",
19+
},
20+
name: "Webserver is down failing all requests.",
21+
services: ["shopist"],
22+
severity: "High",
23+
startedAt: 1693491974000000000,
24+
team: "backend",
25+
version: "v1.12.07",
26+
},
27+
},
28+
},
29+
};
30+
31+
apiInstance
32+
.createDORAFailure(params)
33+
.then((data: v2.DORAFailureResponse) => {
34+
console.log(
35+
"API called successfully. Returned data: " + JSON.stringify(data)
36+
);
37+
})
38+
.catch((error: any) => console.error(error));

examples/v2/dora-metrics/CreateDORAIncident.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.createDORAIncident"] = true;
98
const apiInstance = new v2.DORAMetricsApi(configuration);
109

1110
const params: v2.DORAMetricsApiCreateDORAIncidentRequest = {
1211
body: {
1312
data: {
1413
attributes: {
15-
finishedAt: 1707842944600000000,
14+
env: "staging",
15+
finishedAt: 1693491984000000000,
1616
git: {
1717
commitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
1818
repositoryUrl: "https://github.com/organization/example-repository",
1919
},
20-
name: "Webserver is down failing all requests",
20+
name: "Webserver is down failing all requests.",
2121
services: ["shopist"],
2222
severity: "High",
23-
startedAt: 1707842944500000000,
23+
startedAt: 1693491974000000000,
2424
team: "backend",
2525
version: "v1.12.07",
2626
},
@@ -30,7 +30,7 @@ const params: v2.DORAMetricsApiCreateDORAIncidentRequest = {
3030

3131
apiInstance
3232
.createDORAIncident(params)
33-
.then((data: v2.DORAIncidentResponse) => {
33+
.then((data: v2.DORAFailureResponse) => {
3434
console.log(
3535
"API called successfully. Returned data: " + JSON.stringify(data)
3636
);

0 commit comments

Comments
 (0)