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
104 changes: 56 additions & 48 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17457,20 +17457,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 type
field is provided.
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 id field
is provided.
enum:
- rollback
- rollforward
Expand Down Expand Up @@ -17674,47 +17674,47 @@ 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'
required:
- 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
type: integer
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:
Expand All @@ -17723,11 +17723,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
Expand All @@ -17754,18 +17754,18 @@ 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'
required:
- 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:
Expand All @@ -17775,15 +17775,15 @@ 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
type: string
x-enum-varnames:
- DORA_FAILURE
DORAFailuresListResponse:
description: Response for the list failures endpoint.
description: Response for the list incidents endpoint.
example:
data:
- attributes:
Expand Down Expand Up @@ -17917,7 +17917,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:
Expand Down Expand Up @@ -17948,7 +17948,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.
Expand Down Expand Up @@ -17984,7 +17984,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:
Expand All @@ -18001,7 +18001,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.
Expand Down Expand Up @@ -76477,7 +76477,9 @@ paths:

- Change Lead Time

- Change Failure Rate'
- Change Failure Rate

- Failed Deployment Recovery Time'
operationId: CreateDORADeployment
requestBody:
content:
Expand Down Expand Up @@ -76626,7 +76628,13 @@ 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.
Expand Down Expand Up @@ -76667,14 +76675,18 @@ 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

This is necessary for:
change failures detected on deployments,

- Change Failure Rate
not from incident events sent through this endpoint.

- 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:
Expand Down Expand Up @@ -76707,16 +76719,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
Expand All @@ -76738,7 +76750,7 @@ paths:
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Delete a failure event
summary: Delete an incident event
tags:
- DORA Metrics
x-permission:
Expand All @@ -76747,7 +76759,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:
Expand Down Expand Up @@ -76775,7 +76787,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
Expand All @@ -76785,10 +76797,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
Expand All @@ -76814,7 +76826,7 @@ paths:
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Get a failure event
summary: Get an incident event
tags:
- DORA Metrics
x-codegen-request-body-name: body
Expand All @@ -76829,14 +76841,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:
Expand Down Expand Up @@ -76869,7 +76877,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
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/dora-metrics/CreateDORAFailure.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Send a failure event returns "OK - but delayed due to incident" response
Send an incident event returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/dora-metrics/CreateDORAIncident.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Send an incident event returns "OK" response
Send an incident event (legacy) returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
Expand Down
4 changes: 2 additions & 2 deletions examples/v2/dora-metrics/DeleteDORAFailure.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Delete a failure event returns "Accepted" response
Delete an incident event returns "Accepted" response
"""

from datadog_api_client import ApiClient, Configuration
Expand All @@ -9,5 +9,5 @@
with ApiClient(configuration) as api_client:
api_instance = DORAMetricsApi(api_client)
api_instance.delete_dora_failure(
failure_id="NO_VALUE",
failure_id="failure_id",
)
13 changes: 13 additions & 0 deletions examples/v2/dora-metrics/DeleteDORAFailure_3462074974.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
Delete a failure event returns "Accepted" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = DORAMetricsApi(api_client)
api_instance.delete_dora_failure(
failure_id="NO_VALUE",
)
2 changes: 1 addition & 1 deletion examples/v2/dora-metrics/GetDORAFailure.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Get a failure event returns "OK" response
Get an incident event returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
Expand Down
10 changes: 6 additions & 4 deletions examples/v2/dora-metrics/ListDORAFailures.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Get a list of failure events returns "OK" response
Get a list of incident events returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
Expand All @@ -14,9 +14,11 @@
body = DORAListFailuresRequest(
data=DORAListFailuresRequestData(
attributes=DORAListFailuresRequestAttributes(
_from=datetime(2025, 3, 23, 0, 0, tzinfo=tzutc()),
limit=1,
to=datetime(2025, 3, 24, 0, 0, tzinfo=tzutc()),
_from=datetime(2025, 1, 1, 0, 0, tzinfo=tzutc()),
limit=100,
query="severity:(SEV-1 OR SEV-2) env:production team:backend",
sort="-started_at",
to=datetime(2025, 1, 31, 23, 59, 59, tzinfo=tzutc()),
),
type=DORAListFailuresRequestDataType.DORA_FAILURES_LIST_REQUEST,
),
Expand Down
Loading