Skip to content

Commit 82d2e35

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 680f743e of spec repo
1 parent 3ebab2a commit 82d2e35

21 files changed

Lines changed: 457 additions & 168 deletions

File tree

.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-05-27 17:12:13.510503",
8-
"spec_repo_commit": "ed439f7c"
7+
"regenerated": "2025-05-30 10:26:23.568839",
8+
"spec_repo_commit": "680f743e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-27 17:12:13.526776",
13-
"spec_repo_commit": "ed439f7c"
12+
"regenerated": "2025-05-30 10:26:23.606356",
13+
"spec_repo_commit": "680f743e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 100 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11096,56 +11096,39 @@ components:
1109611096
description: The type of the event.
1109711097
type: string
1109811098
type: object
11099-
DORAFetchResponse:
11100-
description: Response for the DORA fetch endpoints.
11101-
properties:
11102-
data:
11103-
$ref: '#/components/schemas/DORAEvent'
11104-
type: object
11105-
DORAGitInfo:
11106-
description: Git info for DORA Metrics events.
11107-
properties:
11108-
commit_sha:
11109-
$ref: '#/components/schemas/GitCommitSHA'
11110-
repository_url:
11111-
$ref: '#/components/schemas/GitRepositoryURL'
11112-
required:
11113-
- repository_url
11114-
- commit_sha
11115-
type: object
11116-
DORAIncidentRequest:
11117-
description: Request to create a DORA incident event.
11099+
DORAFailureRequest:
11100+
description: Request to create a DORA failure event.
1111811101
properties:
1111911102
data:
11120-
$ref: '#/components/schemas/DORAIncidentRequestData'
11103+
$ref: '#/components/schemas/DORAFailureRequestData'
1112111104
required:
1112211105
- data
1112311106
type: object
11124-
DORAIncidentRequestAttributes:
11125-
description: Attributes to create a DORA incident event.
11107+
DORAFailureRequestAttributes:
11108+
description: Attributes to create a DORA failure event.
1112611109
properties:
1112711110
env:
11128-
description: Environment name that was impacted by the incident.
11111+
description: Environment name that was impacted by the failure.
1112911112
example: staging
1113011113
type: string
1113111114
finished_at:
11132-
description: Unix timestamp when the incident finished. It must be in nanoseconds,
11115+
description: Unix timestamp when the failure finished. It must be in nanoseconds,
1113311116
milliseconds, or seconds, and it should not be older than 1 hour.
1113411117
example: 1693491984000000000
1113511118
format: int64
1113611119
type: integer
1113711120
git:
1113811121
$ref: '#/components/schemas/DORAGitInfo'
1113911122
id:
11140-
description: Incident ID. Must have at least 16 characters. Required to
11141-
update a previously sent incident.
11123+
description: Failure ID. Must have at least 16 characters. Required to update
11124+
a previously sent failure.
1114211125
type: string
1114311126
name:
11144-
description: Incident name.
11127+
description: Failure name.
1114511128
example: Webserver is down failing all requests.
1114611129
type: string
1114711130
services:
11148-
description: Service names impacted by the incident. If possible, use names
11131+
description: Service names impacted by the failure. If possible, use names
1114911132
registered in the Service Catalog. Required when the team field is not
1115011133
provided.
1115111134
example:
@@ -11154,11 +11137,11 @@ components:
1115411137
type: string
1115511138
type: array
1115611139
severity:
11157-
description: Incident severity.
11140+
description: Failure severity.
1115811141
example: High
1115911142
type: string
1116011143
started_at:
11161-
description: Unix timestamp when the incident started. It must be in nanoseconds,
11144+
description: Unix timestamp when the failure started. It must be in nanoseconds,
1116211145
milliseconds, or seconds.
1116311146
example: 1693491974000000000
1116411147
format: int64
@@ -11176,43 +11159,60 @@ components:
1117611159
required:
1117711160
- started_at
1117811161
type: object
11179-
DORAIncidentRequestData:
11162+
DORAFailureRequestData:
1118011163
description: The JSON:API data.
1118111164
properties:
1118211165
attributes:
11183-
$ref: '#/components/schemas/DORAIncidentRequestAttributes'
11166+
$ref: '#/components/schemas/DORAFailureRequestAttributes'
1118411167
required:
1118511168
- attributes
1118611169
type: object
11187-
DORAIncidentResponse:
11188-
description: Response after receiving a DORA incident event.
11170+
DORAFailureResponse:
11171+
description: Response after receiving a DORA failure event.
1118911172
properties:
1119011173
data:
11191-
$ref: '#/components/schemas/DORAIncidentResponseData'
11174+
$ref: '#/components/schemas/DORAFailureResponseData'
1119211175
required:
1119311176
- data
1119411177
type: object
11195-
DORAIncidentResponseData:
11196-
description: Response after receiving a DORA incident event.
11178+
DORAFailureResponseData:
11179+
description: Response after receiving a DORA failure event.
1119711180
properties:
1119811181
id:
11199-
description: The ID of the received DORA incident event.
11182+
description: The ID of the received DORA failure event.
1120011183
example: 4242fcdd31586083
1120111184
type: string
1120211185
type:
11203-
$ref: '#/components/schemas/DORAIncidentType'
11186+
$ref: '#/components/schemas/DORAFailureType'
1120411187
required:
1120511188
- id
1120611189
type: object
11207-
DORAIncidentType:
11208-
default: dora_incident
11209-
description: JSON:API type for DORA incident events.
11190+
DORAFailureType:
11191+
default: dora_failure
11192+
description: JSON:API type for DORA failure events.
1121011193
enum:
11211-
- dora_incident
11212-
example: dora_incident
11194+
- dora_failure
11195+
example: dora_failure
1121311196
type: string
1121411197
x-enum-varnames:
11215-
- DORA_INCIDENT
11198+
- DORA_FAILURE
11199+
DORAFetchResponse:
11200+
description: Response for the DORA fetch endpoints.
11201+
properties:
11202+
data:
11203+
$ref: '#/components/schemas/DORAEvent'
11204+
type: object
11205+
DORAGitInfo:
11206+
description: Git info for DORA Metrics events.
11207+
properties:
11208+
commit_sha:
11209+
$ref: '#/components/schemas/GitCommitSHA'
11210+
repository_url:
11211+
$ref: '#/components/schemas/GitRepositoryURL'
11212+
required:
11213+
- repository_url
11214+
- commit_sha
11215+
type: object
1121611216
DORAListDeploymentsRequest:
1121711217
description: Request to get a list of deployments.
1121811218
properties:
@@ -45794,9 +45794,6 @@ paths:
4579445794
tags:
4579545795
- DORA Metrics
4579645796
x-codegen-request-body-name: body
45797-
x-unstable: '**Note**: This endpoint is in public beta.
45798-
45799-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4580045797
/api/v2/dora/deployments:
4580145798
post:
4580245799
description: Use this API endpoint to get a list of deployment events.
@@ -45874,6 +45871,52 @@ paths:
4587445871
operator: OR
4587545872
permissions:
4587645873
- dora_metrics_read
45874+
/api/v2/dora/failure:
45875+
post:
45876+
description: 'Use this API endpoint to provide failure data for DORA metrics.
45877+
45878+
45879+
This is necessary for:
45880+
45881+
- Change Failure Rate
45882+
45883+
- Time to Restore'
45884+
operationId: CreateDORAFailure
45885+
requestBody:
45886+
content:
45887+
application/json:
45888+
schema:
45889+
$ref: '#/components/schemas/DORAFailureRequest'
45890+
required: true
45891+
responses:
45892+
'200':
45893+
content:
45894+
application/json:
45895+
schema:
45896+
$ref: '#/components/schemas/DORAFailureResponse'
45897+
description: OK
45898+
'202':
45899+
content:
45900+
application/json:
45901+
schema:
45902+
$ref: '#/components/schemas/DORAFailureResponse'
45903+
description: OK - but delayed due to incident
45904+
'400':
45905+
content:
45906+
application/json:
45907+
schema:
45908+
$ref: '#/components/schemas/JSONAPIErrorResponse'
45909+
description: Bad Request
45910+
'403':
45911+
$ref: '#/components/responses/NotAuthorizedResponse'
45912+
'429':
45913+
$ref: '#/components/responses/TooManyRequestsResponse'
45914+
security:
45915+
- apiKeyAuth: []
45916+
summary: Send a failure event for DORA Metrics
45917+
tags:
45918+
- DORA Metrics
45919+
x-codegen-request-body-name: body
4587745920
/api/v2/dora/failures:
4587845921
post:
4587945922
description: Use this API endpoint to get a list of failure events.
@@ -45953,7 +45996,12 @@ paths:
4595345996
- dora_metrics_read
4595445997
/api/v2/dora/incident:
4595545998
post:
45956-
description: 'Use this API endpoint to provide failure data for DORA metrics.
45999+
deprecated: true
46000+
description: '**Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure`
46001+
instead.
46002+
46003+
46004+
Use this API endpoint to provide failure data for DORA metrics.
4595746005

4595846006

4595946007
This is necessary for:
@@ -45966,20 +46014,20 @@ paths:
4596646014
content:
4596746015
application/json:
4596846016
schema:
45969-
$ref: '#/components/schemas/DORAIncidentRequest'
46017+
$ref: '#/components/schemas/DORAFailureRequest'
4597046018
required: true
4597146019
responses:
4597246020
'200':
4597346021
content:
4597446022
application/json:
4597546023
schema:
45976-
$ref: '#/components/schemas/DORAIncidentResponse'
46024+
$ref: '#/components/schemas/DORAFailureResponse'
4597746025
description: OK
4597846026
'202':
4597946027
content:
4598046028
application/json:
4598146029
schema:
45982-
$ref: '#/components/schemas/DORAIncidentResponse'
46030+
$ref: '#/components/schemas/DORAFailureResponse'
4598346031
description: OK - but delayed due to incident
4598446032
'400':
4598546033
content:
@@ -45997,9 +46045,6 @@ paths:
4599746045
tags:
4599846046
- DORA Metrics
4599946047
x-codegen-request-body-name: body
46000-
x-unstable: '**Note**: This endpoint is in public beta.
46001-
46002-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4600346048
/api/v2/downtime:
4600446049
get:
4600546050
description: Get all scheduled downtimes.

cassettes/v2/DORA-Metrics_482886860/Send-an-incident-event-for-DORA-Metrics-returns-OK-response_1500109814/frozen.json renamed to cassettes/v2/DORA-Metrics_482886860/Send-a-failure-event-for-DORA-Metrics-returns-OK-response_1860345512/frozen.json

File renamed without changes.

cassettes/v2/DORA-Metrics_482886860/Send-an-incident-event-for-DORA-Metrics-returns-OK-response_1500109814/recording.har renamed to cassettes/v2/DORA-Metrics_482886860/Send-a-failure-event-for-DORA-Metrics-returns-OK-response_1860345512/recording.har

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)