Skip to content

Commit d7c0ab6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8aade0bf of spec repo
1 parent 8b728a3 commit d7c0ab6

18 files changed

+548
-276
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 10:47:59.772145",
8-
"spec_repo_commit": "1f58e760"
7+
"regenerated": "2025-06-04 12:13:31.080445",
8+
"spec_repo_commit": "8aade0bf"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-04 10:47:59.788728",
13-
"spec_repo_commit": "1f58e760"
12+
"regenerated": "2025-06-04 12:13:31.096619",
13+
"spec_repo_commit": "8aade0bf"
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:
@@ -45887,9 +45887,6 @@ paths:
4588745887
tags:
4588845888
- DORA Metrics
4588945889
x-codegen-request-body-name: body
45890-
x-unstable: '**Note**: This endpoint is in public beta.
45891-
45892-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4589345890
/api/v2/dora/deployments:
4589445891
post:
4589545892
description: Use this API endpoint to get a list of deployment events.
@@ -45967,6 +45964,52 @@ paths:
4596745964
operator: OR
4596845965
permissions:
4596945966
- dora_metrics_read
45967+
/api/v2/dora/failure:
45968+
post:
45969+
description: 'Use this API endpoint to provide failure data for DORA metrics.
45970+
45971+
45972+
This is necessary for:
45973+
45974+
- Change Failure Rate
45975+
45976+
- Time to Restore'
45977+
operationId: CreateDORAFailure
45978+
requestBody:
45979+
content:
45980+
application/json:
45981+
schema:
45982+
$ref: '#/components/schemas/DORAFailureRequest'
45983+
required: true
45984+
responses:
45985+
'200':
45986+
content:
45987+
application/json:
45988+
schema:
45989+
$ref: '#/components/schemas/DORAFailureResponse'
45990+
description: OK
45991+
'202':
45992+
content:
45993+
application/json:
45994+
schema:
45995+
$ref: '#/components/schemas/DORAFailureResponse'
45996+
description: OK - but delayed due to incident
45997+
'400':
45998+
content:
45999+
application/json:
46000+
schema:
46001+
$ref: '#/components/schemas/JSONAPIErrorResponse'
46002+
description: Bad Request
46003+
'403':
46004+
$ref: '#/components/responses/NotAuthorizedResponse'
46005+
'429':
46006+
$ref: '#/components/responses/TooManyRequestsResponse'
46007+
security:
46008+
- apiKeyAuth: []
46009+
summary: Send a failure event for DORA Metrics
46010+
tags:
46011+
- DORA Metrics
46012+
x-codegen-request-body-name: body
4597046013
/api/v2/dora/failures:
4597146014
post:
4597246015
description: Use this API endpoint to get a list of failure events.
@@ -46046,7 +46089,12 @@ paths:
4604646089
- dora_metrics_read
4604746090
/api/v2/dora/incident:
4604846091
post:
46049-
description: 'Use this API endpoint to provide failure data for DORA metrics.
46092+
deprecated: true
46093+
description: '**Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure`
46094+
instead.
46095+
46096+
46097+
Use this API endpoint to provide failure data for DORA metrics.
4605046098

4605146099

4605246100
This is necessary for:
@@ -46059,20 +46107,20 @@ paths:
4605946107
content:
4606046108
application/json:
4606146109
schema:
46062-
$ref: '#/components/schemas/DORAIncidentRequest'
46110+
$ref: '#/components/schemas/DORAFailureRequest'
4606346111
required: true
4606446112
responses:
4606546113
'200':
4606646114
content:
4606746115
application/json:
4606846116
schema:
46069-
$ref: '#/components/schemas/DORAIncidentResponse'
46117+
$ref: '#/components/schemas/DORAFailureResponse'
4607046118
description: OK
4607146119
'202':
4607246120
content:
4607346121
application/json:
4607446122
schema:
46075-
$ref: '#/components/schemas/DORAIncidentResponse'
46123+
$ref: '#/components/schemas/DORAFailureResponse'
4607646124
description: OK - but delayed due to incident
4607746125
'400':
4607846126
content:
@@ -46090,9 +46138,6 @@ paths:
4609046138
tags:
4609146139
- DORA Metrics
4609246140
x-codegen-request-body-name: body
46093-
x-unstable: '**Note**: This endpoint is in public beta.
46094-
46095-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4609646141
/api/v2/downtime:
4609746142
get:
4609846143
description: Get all scheduled downtimes.

examples/v2/dora-metrics/CreateDORADeployment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
public class Example {
1313
public static void main(String[] args) {
1414
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15-
defaultClient.setUnstableOperationEnabled("v2.createDORADeployment", true);
1615
DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient);
1716

1817
DORADeploymentRequest body =
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DoraMetricsApi;
6+
import com.datadog.api.client.v2.model.DORAFailureRequest;
7+
import com.datadog.api.client.v2.model.DORAFailureRequestAttributes;
8+
import com.datadog.api.client.v2.model.DORAFailureRequestData;
9+
import com.datadog.api.client.v2.model.DORAFailureResponse;
10+
import com.datadog.api.client.v2.model.DORAGitInfo;
11+
import java.util.Collections;
12+
13+
public class Example {
14+
public static void main(String[] args) {
15+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
16+
DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient);
17+
18+
DORAFailureRequest body =
19+
new DORAFailureRequest()
20+
.data(
21+
new DORAFailureRequestData()
22+
.attributes(
23+
new DORAFailureRequestAttributes()
24+
.env("staging")
25+
.finishedAt(1693491984000000000L)
26+
.git(
27+
new DORAGitInfo()
28+
.commitSha("66adc9350f2cc9b250b69abddab733dd55e1a588")
29+
.repositoryUrl(
30+
"https://github.com/organization/example-repository"))
31+
.name("Webserver is down failing all requests.")
32+
.services(Collections.singletonList("shopist"))
33+
.severity("High")
34+
.startedAt(1693491974000000000L)
35+
.team("backend")
36+
.version("v1.12.07")));
37+
38+
try {
39+
DORAFailureResponse result = apiInstance.createDORAFailure(body);
40+
System.out.println(result);
41+
} catch (ApiException e) {
42+
System.err.println("Exception when calling DoraMetricsApi#createDORAFailure");
43+
System.err.println("Status code: " + e.getCode());
44+
System.err.println("Reason: " + e.getResponseBody());
45+
System.err.println("Response headers: " + e.getResponseHeaders());
46+
e.printStackTrace();
47+
}
48+
}
49+
}

examples/v2/dora-metrics/CreateDORAIncident.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@
33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
55
import com.datadog.api.client.v2.api.DoraMetricsApi;
6+
import com.datadog.api.client.v2.model.DORAFailureRequest;
7+
import com.datadog.api.client.v2.model.DORAFailureRequestAttributes;
8+
import com.datadog.api.client.v2.model.DORAFailureRequestData;
9+
import com.datadog.api.client.v2.model.DORAFailureResponse;
610
import com.datadog.api.client.v2.model.DORAGitInfo;
7-
import com.datadog.api.client.v2.model.DORAIncidentRequest;
8-
import com.datadog.api.client.v2.model.DORAIncidentRequestAttributes;
9-
import com.datadog.api.client.v2.model.DORAIncidentRequestData;
10-
import com.datadog.api.client.v2.model.DORAIncidentResponse;
1111
import java.util.Collections;
1212

1313
public class Example {
1414
public static void main(String[] args) {
1515
ApiClient defaultClient = ApiClient.getDefaultApiClient();
16-
defaultClient.setUnstableOperationEnabled("v2.createDORAIncident", true);
1716
DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient);
1817

19-
DORAIncidentRequest body =
20-
new DORAIncidentRequest()
18+
DORAFailureRequest body =
19+
new DORAFailureRequest()
2120
.data(
22-
new DORAIncidentRequestData()
21+
new DORAFailureRequestData()
2322
.attributes(
24-
new DORAIncidentRequestAttributes()
25-
.finishedAt(1707842944600000000L)
23+
new DORAFailureRequestAttributes()
24+
.env("staging")
25+
.finishedAt(1693491984000000000L)
2626
.git(
2727
new DORAGitInfo()
2828
.commitSha("66adc9350f2cc9b250b69abddab733dd55e1a588")
2929
.repositoryUrl(
3030
"https://github.com/organization/example-repository"))
31-
.name("Webserver is down failing all requests")
31+
.name("Webserver is down failing all requests.")
3232
.services(Collections.singletonList("shopist"))
3333
.severity("High")
34-
.startedAt(1707842944500000000L)
34+
.startedAt(1693491974000000000L)
3535
.team("backend")
3636
.version("v1.12.07")));
3737

3838
try {
39-
DORAIncidentResponse result = apiInstance.createDORAIncident(body);
39+
DORAFailureResponse result = apiInstance.createDORAIncident(body);
4040
System.out.println(result);
4141
} catch (ApiException e) {
4242
System.err.println("Exception when calling DoraMetricsApi#createDORAIncident");

0 commit comments

Comments
 (0)