Skip to content

Commit 2e28a9d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 680f743e of spec repo
1 parent c08b647 commit 2e28a9d

File tree

143 files changed

+733
-461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+733
-461
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-05-27 17:12:14.968856",
8-
"spec_repo_commit": "ed439f7c"
7+
"regenerated": "2025-05-30 10:26:20.012254",
8+
"spec_repo_commit": "680f743e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-27 17:12:14.988382",
13-
"spec_repo_commit": "ed439f7c"
12+
"regenerated": "2025-05-30 10:26:20.028007",
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.

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)