Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 68 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52524,6 +52524,39 @@ paths:
permissions:
- dora_metrics_read
/api/v2/dora/deployments/{deployment_id}:
delete:
description: Use this API endpoint to delete a deployment event.
operationId: DeleteDORADeployment
parameters:
- description: The ID of the deployment event to delete.
in: path
name: deployment_id
required: true
schema:
type: string
responses:
'202':
description: Accepted
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
- appKeyAuth: []
summary: Delete a deployment event
tags:
- DORA Metrics
x-permission:
operator: OR
permissions:
- dora_metrics_write
get:
description: Use this API endpoint to get a deployment event.
operationId: GetDORADeployment
Expand Down Expand Up @@ -52647,6 +52680,39 @@ paths:
permissions:
- dora_metrics_read
/api/v2/dora/failures/{failure_id}:
delete:
description: Use this API endpoint to delete a failure event.
operationId: DeleteDORAFailure
parameters:
- description: The ID of the failure event to delete.
in: path
name: failure_id
required: true
schema:
type: string
responses:
'202':
description: Accepted
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
- appKeyAuth: []
summary: Delete a failure event
tags:
- DORA Metrics
x-permission:
operator: OR
permissions:
- dora_metrics_write
get:
description: Use this API endpoint to get a failure event.
operationId: GetDORAFailure
Expand Down Expand Up @@ -70392,8 +70458,8 @@ tags:
See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for
more information.
name: Containers
- description: 'Search or send events for DORA Metrics to measure and improve your
software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
- description: 'Search, send or delete events for DORA Metrics to measure and improve
your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
for more information.


Expand Down
21 changes: 21 additions & 0 deletions examples/v2/dora-metrics/DeleteDORADeployment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Delete a deployment event returns "Accepted" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.DORAMetricsApi(configuration);

const params: v2.DORAMetricsApiDeleteDORADeploymentRequest = {
deploymentId: "{unique_lower}",
};

apiInstance
.deleteDORADeployment(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
21 changes: 21 additions & 0 deletions examples/v2/dora-metrics/DeleteDORAFailure.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Delete a failure event returns "Accepted" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.DORAMetricsApi(configuration);

const params: v2.DORAMetricsApiDeleteDORAFailureRequest = {
failureId: "{unique_lower}",
};

apiInstance
.deleteDORAFailure(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
14 changes: 14 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4801,6 +4801,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "DORAFetchResponse",
},
"v2.DeleteDORADeployment": {
"deploymentId": {
"type": "string",
"format": "",
},
"operationResponseType": "{}",
},
"v2.CreateDORAFailure": {
"body": {
"type": "DORAFailureRequest",
Expand All @@ -4822,6 +4829,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "DORAFetchResponse",
},
"v2.DeleteDORAFailure": {
"failureId": {
"type": "string",
"format": "",
},
"operationResponseType": "{}",
},
"v2.CreateDORAIncident": {
"body": {
"type": "DORAFailureRequest",
Expand Down
28 changes: 27 additions & 1 deletion features/v2/dora_metrics.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@endpoint(dora-metrics) @endpoint(dora-metrics-v2)
Feature: DORA Metrics
Search or send events for DORA Metrics to measure and improve your
Search, send or delete events for DORA Metrics to measure and improve your
software delivery performance. See the [DORA Metrics
page](https://docs.datadoghq.com/dora_metrics/) for more information.
**Note**: DORA Metrics are not available in the US1-FED site.
Expand All @@ -9,6 +9,32 @@ Feature: DORA Metrics
Given a valid "apiKeyAuth" key in the system
And an instance of "DORAMetrics" API

@team:DataDog/ci-app-backend
Scenario: Delete a deployment event returns "Accepted" response
Given new "DeleteDORADeployment" request
And request contains "deployment_id" parameter with value "{unique_lower}"
When the request is sent
Then the response status is 202 Accepted

@team:DataDog/ci-app-backend
Scenario: Delete a deployment event returns "Bad Request" response
Given new "DeleteDORADeployment" request
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/ci-app-backend
Scenario: Delete a failure event returns "Accepted" response
Given new "DeleteDORAFailure" request
And request contains "failure_id" parameter with value "{unique_lower}"
When the request is sent
Then the response status is 202 Accepted

@team:DataDog/ci-app-backend
Scenario: Delete a failure event returns "Bad Request" response
Given new "DeleteDORAFailure" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get a deployment event returns "Bad Request" response
Given new "GetDORADeployment" request
Expand Down
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,12 @@
"type": "safe"
}
},
"DeleteDORADeployment": {
"tag": "DORA Metrics",
"undo": {
"type": "idempotent"
}
},
"GetDORADeployment": {
"tag": "DORA Metrics",
"undo": {
Expand All @@ -973,6 +979,12 @@
"type": "safe"
}
},
"DeleteDORAFailure": {
"tag": "DORA Metrics",
"undo": {
"type": "idempotent"
}
},
"GetDORAFailure": {
"tag": "DORA Metrics",
"undo": {
Expand Down
Loading
Loading