From 3c8e8871d76307c527ef95903f5585bcbd792996 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 19 Feb 2026 11:20:05 +0000 Subject: [PATCH] Regenerate client from commit 8d04493 of spec repo --- .generator/schemas/v2/openapi.yaml | 100 +++++++++--------- examples/v2/dora-metrics/CreateDORAFailure.ts | 2 +- .../v2/dora-metrics/CreateDORAIncident.ts | 2 +- examples/v2/dora-metrics/DeleteDORAFailure.ts | 4 +- .../DeleteDORAFailure_3462074974.ts | 21 ++++ examples/v2/dora-metrics/GetDORAFailure.ts | 2 +- examples/v2/dora-metrics/ListDORAFailures.ts | 10 +- .../ListDORAFailures_3269988848.ts | 30 ++++++ features/v2/dora_metrics.feature | 90 ++++++++++++---- .../apis/DORAMetricsApi.ts | 28 +++-- .../models/DORADeploymentPatchRemediation.ts | 12 +-- .../DORADeploymentPatchRemediationType.ts | 2 +- .../DORADeploymentPatchRequestAttributes.ts | 2 +- .../models/DORAFailureFetchResponse.ts | 2 +- .../models/DORAFailureRequest.ts | 2 +- .../models/DORAFailureRequestAttributes.ts | 16 +-- .../models/DORAFailureRequestData.ts | 2 +- .../models/DORAFailureResponse.ts | 4 +- .../models/DORAFailureResponseData.ts | 6 +- .../models/DORAFailureType.ts | 2 +- .../models/DORAFailuresListResponse.ts | 2 +- .../models/DORAIncidentObject.ts | 2 +- .../models/DORAListFailuresRequest.ts | 2 +- .../DORAListFailuresRequestAttributes.ts | 2 +- .../models/DORAListFailuresRequestData.ts | 2 +- 25 files changed, 221 insertions(+), 128 deletions(-) create mode 100644 examples/v2/dora-metrics/DeleteDORAFailure_3462074974.ts create mode 100644 examples/v2/dora-metrics/ListDORAFailures_3269988848.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b9a63afce0a1..b01929137f56 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17794,20 +17794,20 @@ components: - finished_at type: object DORADeploymentPatchRemediation: - description: Remediation details for the deployment. + description: Remediation details for the deployment. Optional, but required + to calculate failed deployment recovery time. properties: id: - description: The ID of the remediation action. + description: The ID of the remediation deployment. Required when the failed + deployment must be linked to a remediation deployment. example: eG42zNIkVjM type: string type: $ref: '#/components/schemas/DORADeploymentPatchRemediationType' - required: - - id - - type type: object DORADeploymentPatchRemediationType: - description: The type of remediation action taken. + description: The type of remediation action taken. Required when the failed + deployment must be linked to a remediation deployment. enum: - rollback - rollforward @@ -18011,13 +18011,13 @@ components: type: array type: object DORAFailureFetchResponse: - description: Response for fetching a single failure event. + description: Response for fetching a single incident event. properties: data: $ref: '#/components/schemas/DORAIncidentObject' type: object DORAFailureRequest: - description: Request to create a DORA failure event. + description: Request to create a DORA incident event. properties: data: $ref: '#/components/schemas/DORAFailureRequestData' @@ -18025,16 +18025,16 @@ components: - data type: object DORAFailureRequestAttributes: - description: Attributes to create a DORA failure event. + description: Attributes to create a DORA incident event. properties: custom_tags: $ref: '#/components/schemas/DORACustomTags' env: - description: Environment name that was impacted by the failure. + description: Environment name that was impacted by the incident. example: staging type: string finished_at: - description: Unix timestamp when the failure finished. It must be in nanoseconds, + description: Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds. example: 1693491984000000000 format: int64 @@ -18042,16 +18042,16 @@ components: git: $ref: '#/components/schemas/DORAGitInfo' id: - description: Failure ID. Must be 16-128 characters and contain only alphanumeric + description: Incident ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :). type: string name: - description: Failure name. + description: Incident name. example: Webserver is down failing all requests. type: string services: - description: Service names impacted by the failure. If possible, use names + description: Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided. example: @@ -18060,11 +18060,11 @@ components: type: string type: array severity: - description: Failure severity. + description: Incident severity. example: High type: string started_at: - description: Unix timestamp when the failure started. It must be in nanoseconds, + description: Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds. example: 1693491974000000000 format: int64 @@ -18091,7 +18091,7 @@ components: - attributes type: object DORAFailureResponse: - description: Response after receiving a DORA failure event. + description: Response after receiving a DORA incident event. properties: data: $ref: '#/components/schemas/DORAFailureResponseData' @@ -18099,10 +18099,10 @@ components: - data type: object DORAFailureResponseData: - description: Response after receiving a DORA failure event. + description: Response after receiving a DORA incident event. properties: id: - description: The ID of the received DORA failure event. + description: The ID of the received DORA incident event. example: 4242fcdd31586083 type: string type: @@ -18112,7 +18112,7 @@ components: type: object DORAFailureType: default: dora_failure - description: JSON:API type for DORA failure events. + description: JSON:API type for DORA incident events. enum: - dora_failure example: dora_failure @@ -18120,7 +18120,7 @@ components: x-enum-varnames: - DORA_FAILURE DORAFailuresListResponse: - description: Response for the list failures endpoint. + description: Response for the list incidents endpoint. example: data: - attributes: @@ -18254,7 +18254,7 @@ components: from: '2025-01-01T00:00:00Z' limit: 100 query: service:(shopist OR api-service) env:production team:backend - sort: -started_at + sort: -finished_at to: '2025-01-31T23:59:59Z' type: dora_deployments_list_request properties: @@ -18285,7 +18285,7 @@ components: type: string sort: description: Sort order (prefixed with `-` for descending). - example: -started_at + example: -finished_at type: string to: description: Maximum timestamp for requested events. @@ -18321,7 +18321,7 @@ components: x-enum-varnames: - DORA_DEPLOYMENTS_LIST_REQUEST DORAListFailuresRequest: - description: Request to get a list of failures. + description: Request to get a list of incidents. example: data: attributes: @@ -18338,7 +18338,7 @@ components: - data type: object DORAListFailuresRequestAttributes: - description: Attributes to get a list of failures. + description: Attributes to get a list of incidents. properties: from: description: Minimum timestamp for requested events. @@ -77825,7 +77825,9 @@ paths: - Change Lead Time - - Change Failure Rate' + - Change Failure Rate + + - Failed Deployment Recovery Time' operationId: CreateDORADeployment requestBody: content: @@ -77974,7 +77976,9 @@ paths: permissions: - dora_metrics_read patch: - description: Use this API endpoint to patch a deployment event. + description: Update a deployment's change failure status. Use this to mark a + deployment as a change failure or back to stable. You can optionally include + remediation details to enable failed deployment recovery time calculation. operationId: PatchDORADeployment parameters: - description: The ID of the deployment event. @@ -78015,14 +78019,14 @@ paths: - dora_metrics_write /api/v2/dora/failure: post: - description: 'Use this API endpoint to provide failure data. + description: 'Use this API endpoint to provide incident data for DORA Metrics. + Note that change failure rate and failed deployment recovery time are computed + from change failures detected on deployments, not from incident events sent + through this endpoint. - This is necessary for: - - - Change Failure Rate - - - Time to Restore' + Tracking incidents gives a side-by-side view of how failed deployments translate + into real-world incidents, including their severity and frequency.' operationId: CreateDORAFailure requestBody: content: @@ -78055,16 +78059,16 @@ paths: $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] - summary: Send a failure event + summary: Send an incident event tags: - DORA Metrics x-codegen-request-body-name: body /api/v2/dora/failure/{failure_id}: delete: - description: Use this API endpoint to delete a failure event. + description: Use this API endpoint to delete an incident event. operationId: DeleteDORAFailure parameters: - - description: The ID of the failure event to delete. + - description: The ID of the incident event to delete. in: path name: failure_id required: true @@ -78086,7 +78090,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Delete a failure event + summary: Delete an incident event tags: - DORA Metrics x-permission: @@ -78095,7 +78099,7 @@ paths: - dora_metrics_write /api/v2/dora/failures: post: - description: Use this API endpoint to get a list of failure events. + description: Use this API endpoint to get a list of incident events. operationId: ListDORAFailures requestBody: content: @@ -78123,7 +78127,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a list of failure events + summary: Get a list of incident events tags: - DORA Metrics x-codegen-request-body-name: body @@ -78133,10 +78137,10 @@ paths: - dora_metrics_read /api/v2/dora/failures/{failure_id}: get: - description: Use this API endpoint to get a failure event. + description: Use this API endpoint to get an incident event. operationId: GetDORAFailure parameters: - - description: The ID of the failure event. + - description: The ID of the incident event. in: path name: failure_id required: true @@ -78162,7 +78166,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a failure event + summary: Get an incident event tags: - DORA Metrics x-codegen-request-body-name: body @@ -78177,14 +78181,10 @@ paths: instead. - Use this API endpoint to provide failure data. - + Use this API endpoint to provide incident data. - This is necessary for: - - - Change Failure Rate - - - Time to Restore' + Tracking incidents gives a side-by-side view of how failed deployments translate + into real-world incidents.' operationId: CreateDORAIncident requestBody: content: @@ -78217,7 +78217,7 @@ paths: $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] - summary: Send an incident event + summary: Send an incident event (legacy) tags: - DORA Metrics x-codegen-request-body-name: body diff --git a/examples/v2/dora-metrics/CreateDORAFailure.ts b/examples/v2/dora-metrics/CreateDORAFailure.ts index b0a82d522e9d..2be91518bc82 100644 --- a/examples/v2/dora-metrics/CreateDORAFailure.ts +++ b/examples/v2/dora-metrics/CreateDORAFailure.ts @@ -1,5 +1,5 @@ /** - * Send a failure event returns "OK - but delayed due to incident" response + * Send an incident event returns "OK" response */ import { client, v2 } from "@datadog/datadog-api-client"; diff --git a/examples/v2/dora-metrics/CreateDORAIncident.ts b/examples/v2/dora-metrics/CreateDORAIncident.ts index fe87e42f2304..ef9a85533108 100644 --- a/examples/v2/dora-metrics/CreateDORAIncident.ts +++ b/examples/v2/dora-metrics/CreateDORAIncident.ts @@ -1,5 +1,5 @@ /** - * Send an incident event returns "OK" response + * Send an incident event (legacy) returns "OK" response */ import { client, v2 } from "@datadog/datadog-api-client"; diff --git a/examples/v2/dora-metrics/DeleteDORAFailure.ts b/examples/v2/dora-metrics/DeleteDORAFailure.ts index eaf1a1fa185f..6990f34cf286 100644 --- a/examples/v2/dora-metrics/DeleteDORAFailure.ts +++ b/examples/v2/dora-metrics/DeleteDORAFailure.ts @@ -1,5 +1,5 @@ /** - * Delete a failure event returns "Accepted" response + * Delete an incident event returns "Accepted" response */ import { client, v2 } from "@datadog/datadog-api-client"; @@ -8,7 +8,7 @@ const configuration = client.createConfiguration(); const apiInstance = new v2.DORAMetricsApi(configuration); const params: v2.DORAMetricsApiDeleteDORAFailureRequest = { - failureId: "NO_VALUE", + failureId: "failure_id", }; apiInstance diff --git a/examples/v2/dora-metrics/DeleteDORAFailure_3462074974.ts b/examples/v2/dora-metrics/DeleteDORAFailure_3462074974.ts new file mode 100644 index 000000000000..eaf1a1fa185f --- /dev/null +++ b/examples/v2/dora-metrics/DeleteDORAFailure_3462074974.ts @@ -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: "NO_VALUE", +}; + +apiInstance + .deleteDORAFailure(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/dora-metrics/GetDORAFailure.ts b/examples/v2/dora-metrics/GetDORAFailure.ts index 833bb49a550d..f164805b0f07 100644 --- a/examples/v2/dora-metrics/GetDORAFailure.ts +++ b/examples/v2/dora-metrics/GetDORAFailure.ts @@ -1,5 +1,5 @@ /** - * Get a failure event returns "OK" response + * Get an incident event returns "OK" response */ import { client, v2 } from "@datadog/datadog-api-client"; diff --git a/examples/v2/dora-metrics/ListDORAFailures.ts b/examples/v2/dora-metrics/ListDORAFailures.ts index 826004b85727..00bd971b6398 100644 --- a/examples/v2/dora-metrics/ListDORAFailures.ts +++ b/examples/v2/dora-metrics/ListDORAFailures.ts @@ -1,5 +1,5 @@ /** - * Get a list of failure events returns "OK" response + * Get a list of incident events returns "OK" response */ import { client, v2 } from "@datadog/datadog-api-client"; @@ -11,9 +11,11 @@ const params: v2.DORAMetricsApiListDORAFailuresRequest = { body: { data: { attributes: { - from: new Date(2025, 3, 23, 0, 0, 0, 0), - limit: 1, - to: new Date(2025, 3, 24, 0, 0, 0, 0), + from: new Date(2025, 1, 1, 0, 0, 0, 0), + limit: 100, + query: "severity:(SEV-1 OR SEV-2) env:production team:backend", + sort: "-started_at", + to: new Date(2025, 1, 31, 23, 59, 59, 0), }, type: "dora_failures_list_request", }, diff --git a/examples/v2/dora-metrics/ListDORAFailures_3269988848.ts b/examples/v2/dora-metrics/ListDORAFailures_3269988848.ts new file mode 100644 index 000000000000..826004b85727 --- /dev/null +++ b/examples/v2/dora-metrics/ListDORAFailures_3269988848.ts @@ -0,0 +1,30 @@ +/** + * Get a list of failure events returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.DORAMetricsApi(configuration); + +const params: v2.DORAMetricsApiListDORAFailuresRequest = { + body: { + data: { + attributes: { + from: new Date(2025, 3, 23, 0, 0, 0, 0), + limit: 1, + to: new Date(2025, 3, 24, 0, 0, 0, 0), + }, + type: "dora_failures_list_request", + }, + }, +}; + +apiInstance + .listDORAFailures(params) + .then((data: v2.DORAFailuresListResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/v2/dora_metrics.feature b/features/v2/dora_metrics.feature index 7a3275b54bf7..768442f37f5c 100644 --- a/features/v2/dora_metrics.feature +++ b/features/v2/dora_metrics.feature @@ -41,34 +41,34 @@ Feature: DORA Metrics Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a deployment event returns "Bad Request" response + Scenario: Delete an incident event returns "Accepted" response Given a valid "appKeyAuth" key in the system - And new "GetDORADeployment" request - And request contains "deployment_id" parameter from "REPLACE.ME" + And new "DeleteDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 400 Bad Request + Then the response status is 202 Accepted @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a deployment event returns "OK" response + Scenario: Delete an incident event returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And new "GetDORADeployment" request - And request contains "deployment_id" parameter from "REPLACE.ME" + And new "DeleteDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 200 OK + Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a failure event returns "Bad Request" response + Scenario: Get a deployment event returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And new "GetDORAFailure" request - And request contains "failure_id" parameter from "REPLACE.ME" + And new "GetDORADeployment" request + And request contains "deployment_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a failure event returns "OK" response + Scenario: Get a deployment event returns "OK" response Given a valid "appKeyAuth" key in the system - And new "GetDORAFailure" request - And request contains "failure_id" parameter from "REPLACE.ME" + And new "GetDORADeployment" request + And request contains "deployment_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @@ -104,6 +104,38 @@ Feature: DORA Metrics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get a list of incident events returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "ListDORAFailures" request + And body with value {"data": {"attributes": {"from": "2025-01-01T00:00:00Z", "limit": 100, "query": "severity:(SEV-1 OR SEV-2) env:production team:backend", "sort": "-started_at", "to": "2025-01-31T23:59:59Z"}, "type": "dora_failures_list_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get a list of incident events returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListDORAFailures" request + And body with value {"data": {"attributes": {"from": "2025-01-01T00:00:00Z", "limit": 100, "query": "severity:(SEV-1 OR SEV-2) env:production team:backend", "sort": "-started_at", "to": "2025-01-31T23:59:59Z"}, "type": "dora_failures_list_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get an incident event returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "GetDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get an incident event returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "GetDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend Scenario: Patch a deployment event returns "Accepted" response Given a valid "appKeyAuth" key in the system @@ -150,37 +182,51 @@ Feature: DORA Metrics When the request is sent Then the response status is 400 Bad Request + @replay-only @team:DataDog/ci-app-backend + Scenario: Send a failure event returns "OK" response + Given new "CreateDORAIncident" request + And body with value {"data": {"attributes": {"finished_at": 1707842944600000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 1707842944500000000, "team": "backend", "version": "v1.12.07"}}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend - Scenario: Send a failure event returns "OK - but delayed due to incident" response - Given new "CreateDORAFailure" request + Scenario: Send an incident event (legacy) returns "Bad Request" response + Given new "CreateDORAIncident" request + And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Send an incident event (legacy) returns "OK - but delayed due to incident" response + Given new "CreateDORAIncident" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 202 OK - but delayed due to incident - @replay-only @team:DataDog/ci-app-backend - Scenario: Send a failure event returns "OK" response + @generated @skip @team:DataDog/ci-app-backend + Scenario: Send an incident event (legacy) returns "OK" response Given new "CreateDORAIncident" request - And body with value {"data": {"attributes": {"finished_at": 1707842944600000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 1707842944500000000, "team": "backend", "version": "v1.12.07"}}} + And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/ci-app-backend Scenario: Send an incident event returns "Bad Request" response - Given new "CreateDORAIncident" request + Given new "CreateDORAFailure" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Send an incident event returns "OK - but delayed due to incident" response - Given new "CreateDORAIncident" request + Given new "CreateDORAFailure" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 202 OK - but delayed due to incident @generated @skip @team:DataDog/ci-app-backend Scenario: Send an incident event returns "OK" response - Given new "CreateDORAIncident" request + Given new "CreateDORAFailure" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 200 OK diff --git a/packages/datadog-api-client-v2/apis/DORAMetricsApi.ts b/packages/datadog-api-client-v2/apis/DORAMetricsApi.ts index e23acac202cc..459f15bba81f 100644 --- a/packages/datadog-api-client-v2/apis/DORAMetricsApi.ts +++ b/packages/datadog-api-client-v2/apis/DORAMetricsApi.ts @@ -1220,7 +1220,7 @@ export interface DORAMetricsApiDeleteDORADeploymentRequest { export interface DORAMetricsApiDeleteDORAFailureRequest { /** - * The ID of the failure event to delete. + * The ID of the incident event to delete. * @type string */ failureId: string; @@ -1236,7 +1236,7 @@ export interface DORAMetricsApiGetDORADeploymentRequest { export interface DORAMetricsApiGetDORAFailureRequest { /** - * The ID of the failure event. + * The ID of the incident event. * @type string */ failureId: string; @@ -1292,6 +1292,7 @@ export class DORAMetricsApi { * - Deployment Frequency * - Change Lead Time * - Change Failure Rate + * - Failed Deployment Recovery Time * @param param The request object */ public createDORADeployment( @@ -1312,11 +1313,9 @@ export class DORAMetricsApi { } /** - * Use this API endpoint to provide failure data. - * - * This is necessary for: - * - Change Failure Rate - * - Time to Restore + * Use this API endpoint to provide incident data for DORA Metrics. + * Note that change failure rate and failed deployment recovery time are computed from change failures detected on deployments, not from incident events sent through this endpoint. + * Tracking incidents gives a side-by-side view of how failed deployments translate into real-world incidents, including their severity and frequency. * @param param The request object */ public createDORAFailure( @@ -1339,11 +1338,8 @@ export class DORAMetricsApi { /** * **Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure` instead. * - * Use this API endpoint to provide failure data. - * - * This is necessary for: - * - Change Failure Rate - * - Time to Restore + * Use this API endpoint to provide incident data. + * Tracking incidents gives a side-by-side view of how failed deployments translate into real-world incidents. * @param param The request object */ public createDORAIncident( @@ -1385,7 +1381,7 @@ export class DORAMetricsApi { } /** - * Use this API endpoint to delete a failure event. + * Use this API endpoint to delete an incident event. * @param param The request object */ public deleteDORAFailure( @@ -1427,7 +1423,7 @@ export class DORAMetricsApi { } /** - * Use this API endpoint to get a failure event. + * Use this API endpoint to get an incident event. * @param param The request object */ public getDORAFailure( @@ -1469,7 +1465,7 @@ export class DORAMetricsApi { } /** - * Use this API endpoint to get a list of failure events. + * Use this API endpoint to get a list of incident events. * @param param The request object */ public listDORAFailures( @@ -1490,7 +1486,7 @@ export class DORAMetricsApi { } /** - * Use this API endpoint to patch a deployment event. + * Update a deployment's change failure status. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation. * @param param The request object */ public patchDORADeployment( diff --git a/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediation.ts b/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediation.ts index edaaeac14a41..c7f1c70fea97 100644 --- a/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediation.ts +++ b/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediation.ts @@ -8,17 +8,17 @@ import { DORADeploymentPatchRemediationType } from "./DORADeploymentPatchRemedia import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Remediation details for the deployment. + * Remediation details for the deployment. Optional, but required to calculate failed deployment recovery time. */ export class DORADeploymentPatchRemediation { /** - * The ID of the remediation action. + * The ID of the remediation deployment. Required when the failed deployment must be linked to a remediation deployment. */ - "id": string; + "id"?: string; /** - * The type of remediation action taken. + * The type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment. */ - "type": DORADeploymentPatchRemediationType; + "type"?: DORADeploymentPatchRemediationType; /** * A container for additional, undeclared properties. @@ -39,12 +39,10 @@ export class DORADeploymentPatchRemediation { id: { baseName: "id", type: "string", - required: true, }, type: { baseName: "type", type: "DORADeploymentPatchRemediationType", - required: true, }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediationType.ts b/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediationType.ts index f2fa11b4326a..1278bb5578b4 100644 --- a/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediationType.ts +++ b/packages/datadog-api-client-v2/models/DORADeploymentPatchRemediationType.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * The type of remediation action taken. + * The type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment. */ export type DORADeploymentPatchRemediationType = diff --git a/packages/datadog-api-client-v2/models/DORADeploymentPatchRequestAttributes.ts b/packages/datadog-api-client-v2/models/DORADeploymentPatchRequestAttributes.ts index 1592506472ed..043c98fdee9b 100644 --- a/packages/datadog-api-client-v2/models/DORADeploymentPatchRequestAttributes.ts +++ b/packages/datadog-api-client-v2/models/DORADeploymentPatchRequestAttributes.ts @@ -16,7 +16,7 @@ export class DORADeploymentPatchRequestAttributes { */ "changeFailure"?: boolean; /** - * Remediation details for the deployment. + * Remediation details for the deployment. Optional, but required to calculate failed deployment recovery time. */ "remediation"?: DORADeploymentPatchRemediation; diff --git a/packages/datadog-api-client-v2/models/DORAFailureFetchResponse.ts b/packages/datadog-api-client-v2/models/DORAFailureFetchResponse.ts index 09aa1e86cc87..a95195444810 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureFetchResponse.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureFetchResponse.ts @@ -8,7 +8,7 @@ import { DORAIncidentObject } from "./DORAIncidentObject"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Response for fetching a single failure event. + * Response for fetching a single incident event. */ export class DORAFailureFetchResponse { /** diff --git a/packages/datadog-api-client-v2/models/DORAFailureRequest.ts b/packages/datadog-api-client-v2/models/DORAFailureRequest.ts index 9e4d12082978..af96de781c46 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureRequest.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureRequest.ts @@ -8,7 +8,7 @@ import { DORAFailureRequestData } from "./DORAFailureRequestData"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Request to create a DORA failure event. + * Request to create a DORA incident event. */ export class DORAFailureRequest { /** diff --git a/packages/datadog-api-client-v2/models/DORAFailureRequestAttributes.ts b/packages/datadog-api-client-v2/models/DORAFailureRequestAttributes.ts index 9d4ab78a5e14..e52f09fe4136 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureRequestAttributes.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureRequestAttributes.ts @@ -8,7 +8,7 @@ import { DORAGitInfo } from "./DORAGitInfo"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Attributes to create a DORA failure event. + * Attributes to create a DORA incident event. */ export class DORAFailureRequestAttributes { /** @@ -16,11 +16,11 @@ export class DORAFailureRequestAttributes { */ "customTags"?: Array; /** - * Environment name that was impacted by the failure. + * Environment name that was impacted by the incident. */ "env"?: string; /** - * Unix timestamp when the failure finished. It must be in nanoseconds, milliseconds, or seconds. + * Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds. */ "finishedAt"?: number; /** @@ -28,23 +28,23 @@ export class DORAFailureRequestAttributes { */ "git"?: DORAGitInfo; /** - * Failure ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :). + * Incident ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :). */ "id"?: string; /** - * Failure name. + * Incident name. */ "name"?: string; /** - * Service names impacted by the failure. If possible, use names registered in the Service Catalog. Required when the team field is not provided. + * Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided. */ "services"?: Array; /** - * Failure severity. + * Incident severity. */ "severity"?: string; /** - * Unix timestamp when the failure started. It must be in nanoseconds, milliseconds, or seconds. + * Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds. */ "startedAt": number; /** diff --git a/packages/datadog-api-client-v2/models/DORAFailureRequestData.ts b/packages/datadog-api-client-v2/models/DORAFailureRequestData.ts index 5dc357da60ed..3a4616c745b4 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureRequestData.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureRequestData.ts @@ -12,7 +12,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class DORAFailureRequestData { /** - * Attributes to create a DORA failure event. + * Attributes to create a DORA incident event. */ "attributes": DORAFailureRequestAttributes; diff --git a/packages/datadog-api-client-v2/models/DORAFailureResponse.ts b/packages/datadog-api-client-v2/models/DORAFailureResponse.ts index 73092123715f..2ee9a59de7c4 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureResponse.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureResponse.ts @@ -8,11 +8,11 @@ import { DORAFailureResponseData } from "./DORAFailureResponseData"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Response after receiving a DORA failure event. + * Response after receiving a DORA incident event. */ export class DORAFailureResponse { /** - * Response after receiving a DORA failure event. + * Response after receiving a DORA incident event. */ "data": DORAFailureResponseData; diff --git a/packages/datadog-api-client-v2/models/DORAFailureResponseData.ts b/packages/datadog-api-client-v2/models/DORAFailureResponseData.ts index aadd5365f2e5..bbbd77b9d955 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureResponseData.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureResponseData.ts @@ -8,15 +8,15 @@ import { DORAFailureType } from "./DORAFailureType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Response after receiving a DORA failure event. + * Response after receiving a DORA incident event. */ export class DORAFailureResponseData { /** - * The ID of the received DORA failure event. + * The ID of the received DORA incident event. */ "id": string; /** - * JSON:API type for DORA failure events. + * JSON:API type for DORA incident events. */ "type"?: DORAFailureType; diff --git a/packages/datadog-api-client-v2/models/DORAFailureType.ts b/packages/datadog-api-client-v2/models/DORAFailureType.ts index 9ba09efb2d31..ebc5eccf0b3d 100644 --- a/packages/datadog-api-client-v2/models/DORAFailureType.ts +++ b/packages/datadog-api-client-v2/models/DORAFailureType.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * JSON:API type for DORA failure events. + * JSON:API type for DORA incident events. */ export type DORAFailureType = typeof DORA_FAILURE | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/DORAFailuresListResponse.ts b/packages/datadog-api-client-v2/models/DORAFailuresListResponse.ts index b02008e3e12a..ff55e22c1441 100644 --- a/packages/datadog-api-client-v2/models/DORAFailuresListResponse.ts +++ b/packages/datadog-api-client-v2/models/DORAFailuresListResponse.ts @@ -8,7 +8,7 @@ import { DORAIncidentObject } from "./DORAIncidentObject"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Response for the list failures endpoint. + * Response for the list incidents endpoint. */ export class DORAFailuresListResponse { /** diff --git a/packages/datadog-api-client-v2/models/DORAIncidentObject.ts b/packages/datadog-api-client-v2/models/DORAIncidentObject.ts index 3fac6b130a01..3d8ceab95d0b 100644 --- a/packages/datadog-api-client-v2/models/DORAIncidentObject.ts +++ b/packages/datadog-api-client-v2/models/DORAIncidentObject.ts @@ -21,7 +21,7 @@ export class DORAIncidentObject { */ "id"?: string; /** - * JSON:API type for DORA failure events. + * JSON:API type for DORA incident events. */ "type"?: DORAFailureType; diff --git a/packages/datadog-api-client-v2/models/DORAListFailuresRequest.ts b/packages/datadog-api-client-v2/models/DORAListFailuresRequest.ts index f14c40e6908b..f3c1d2ac7568 100644 --- a/packages/datadog-api-client-v2/models/DORAListFailuresRequest.ts +++ b/packages/datadog-api-client-v2/models/DORAListFailuresRequest.ts @@ -8,7 +8,7 @@ import { DORAListFailuresRequestData } from "./DORAListFailuresRequestData"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Request to get a list of failures. + * Request to get a list of incidents. */ export class DORAListFailuresRequest { /** diff --git a/packages/datadog-api-client-v2/models/DORAListFailuresRequestAttributes.ts b/packages/datadog-api-client-v2/models/DORAListFailuresRequestAttributes.ts index 433b98a8d86d..b51c22b8d79b 100644 --- a/packages/datadog-api-client-v2/models/DORAListFailuresRequestAttributes.ts +++ b/packages/datadog-api-client-v2/models/DORAListFailuresRequestAttributes.ts @@ -7,7 +7,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Attributes to get a list of failures. + * Attributes to get a list of incidents. */ export class DORAListFailuresRequestAttributes { /** diff --git a/packages/datadog-api-client-v2/models/DORAListFailuresRequestData.ts b/packages/datadog-api-client-v2/models/DORAListFailuresRequestData.ts index 48f4a5190429..041be380ab23 100644 --- a/packages/datadog-api-client-v2/models/DORAListFailuresRequestData.ts +++ b/packages/datadog-api-client-v2/models/DORAListFailuresRequestData.ts @@ -13,7 +13,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class DORAListFailuresRequestData { /** - * Attributes to get a list of failures. + * Attributes to get a list of incidents. */ "attributes": DORAListFailuresRequestAttributes; /**