Skip to content

Add public APIs to search DORA events #668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-20 07:21:25.102606",
"spec_repo_commit": "fec20f97"
"regenerated": "2025-05-22 11:17:36.273151",
"spec_repo_commit": "9d0f7c88"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-20 07:21:25.118736",
"spec_repo_commit": "fec20f97"
"regenerated": "2025-05-22 11:17:36.288929",
"spec_repo_commit": "9d0f7c88"
}
}
}
295 changes: 289 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11049,6 +11049,25 @@ components:
type: string
x-enum-varnames:
- DORA_DEPLOYMENT
DORAEvent:
description: A DORA event.
properties:
attributes:
description: The attributes of the event.
type: object
id:
description: The ID of the event.
type: string
type:
description: The type of the event.
type: string
type: object
DORAFetchResponse:
description: Response for the DORA fetch endpoints.
properties:
data:
$ref: '#/components/schemas/DORAEvent'
type: object
DORAGitInfo:
description: Git info for DORA Metrics events.
properties:
Expand Down Expand Up @@ -11084,7 +11103,8 @@ components:
git:
$ref: '#/components/schemas/DORAGitInfo'
id:
description: Incident ID. Required to update a previously sent incident.
description: Incident ID. Must have at least 16 characters. Required to
update a previously sent incident.
type: string
name:
description: Incident name.
Expand Down Expand Up @@ -11159,6 +11179,113 @@ components:
type: string
x-enum-varnames:
- DORA_INCIDENT
DORAListDeploymentsRequest:
description: Request to get a list of deployments.
properties:
data:
$ref: '#/components/schemas/DORAListDeploymentsRequestData'
required:
- data
type: object
DORAListDeploymentsRequestAttributes:
description: Attributes to get a list of deployments.
properties:
from:
description: Minimum timestamp for requested events.
format: date-time
type: string
limit:
default: 10
description: Maximum number of events in the response.
format: int32
maximum: 1000
type: integer
query:
description: Search query with event platform syntax.
type: string
sort:
description: Sort order (prefixed with `-` for descending).
type: string
to:
description: Maximum timestamp for requested events.
format: date-time
type: string
type: object
DORAListDeploymentsRequestData:
description: The JSON:API data.
properties:
attributes:
$ref: '#/components/schemas/DORAListDeploymentsRequestAttributes'
type:
$ref: '#/components/schemas/DORAListDeploymentsRequestDataType'
required:
- attributes
type: object
DORAListDeploymentsRequestDataType:
description: The definition of `DORAListDeploymentsRequestDataType` object.
enum:
- dora_deployments_list_request
type: string
x-enum-varnames:
- DORA_DEPLOYMENTS_LIST_REQUEST
DORAListFailuresRequest:
description: Request to get a list of failures.
properties:
data:
$ref: '#/components/schemas/DORAListFailuresRequestData'
required:
- data
type: object
DORAListFailuresRequestAttributes:
description: Attributes to get a list of failures.
properties:
from:
description: Minimum timestamp for requested events.
format: date-time
type: string
limit:
default: 10
description: Maximum number of events in the response.
format: int32
maximum: 1000
type: integer
query:
description: Search query with event platform syntax.
type: string
sort:
description: Sort order (prefixed with `-` for descending).
type: string
to:
description: Maximum timestamp for requested events.
format: date-time
type: string
type: object
DORAListFailuresRequestData:
description: The JSON:API data.
properties:
attributes:
$ref: '#/components/schemas/DORAListFailuresRequestAttributes'
type:
$ref: '#/components/schemas/DORAListFailuresRequestDataType'
required:
- attributes
type: object
DORAListFailuresRequestDataType:
description: The definition of `DORAListFailuresRequestDataType` object.
enum:
- dora_failures_list_request
type: string
x-enum-varnames:
- DORA_FAILURES_LIST_REQUEST
DORAListResponse:
description: Response for the DORA list endpoints.
properties:
data:
description: The list of DORA events.
items:
$ref: '#/components/schemas/DORAEvent'
type: array
type: object
DashboardListAddItemsRequest:
description: Request containing a list of dashboards to add.
properties:
Expand Down Expand Up @@ -45500,10 +45627,163 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/dora/deployments:
post:
description: Use this API endpoint to get a list of deployment events.
operationId: ListDORADeployments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DORAListDeploymentsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DORAListResponse'
description: OK
'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: Get a list of deployment events
tags:
- DORA Metrics
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- dora_metrics_read
/api/v2/dora/deployments/{deployment_id}:
get:
description: Use this API endpoint to get a deployment event.
operationId: GetDORADeployment
parameters:
- description: The ID of the deployment event.
in: path
name: deployment_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DORAFetchResponse'
description: OK
'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: Get a deployment event
tags:
- DORA Metrics
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- dora_metrics_read
/api/v2/dora/failures:
post:
description: Use this API endpoint to get a list of failure events.
operationId: ListDORAFailures
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DORAListFailuresRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DORAListResponse'
description: OK
'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: Get a list of failure events
tags:
- DORA Metrics
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- dora_metrics_read
/api/v2/dora/failures/{failure_id}:
get:
description: Use this API endpoint to get a failure event.
operationId: GetDORAFailure
parameters:
- description: The ID of the failure event.
in: path
name: failure_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DORAFetchResponse'
description: OK
'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: Get a failure event
tags:
- DORA Metrics
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- dora_metrics_read
/api/v2/dora/incident:
post:
description: 'Use this API endpoint to provide data about incidents for DORA
metrics.
description: 'Use this API endpoint to provide failure data for DORA metrics.


This is necessary for:
Expand Down Expand Up @@ -61873,9 +62153,12 @@ tags:
See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for
more information.
name: Containers
- description: Send events for DORA Metrics to measure and improve software delivery.
See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/) for more
information.
- 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/)
for more information.


**Note**: DORA Metrics are not available in the US1-FED site.'
name: DORA Metrics
- description: 'Interact with your dashboard lists through the API to

Expand Down
15 changes: 15 additions & 0 deletions examples/v2_dora-metrics_GetDORADeployment.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Get a deployment event returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_dora_metrics::DORAMetricsAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = DORAMetricsAPI::with_config(configuration);
let resp = api.get_dora_deployment("deployment_id".to_string()).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
15 changes: 15 additions & 0 deletions examples/v2_dora-metrics_GetDORAFailure.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Get a failure event returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_dora_metrics::DORAMetricsAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = DORAMetricsAPI::with_config(configuration);
let resp = api.get_dora_failure("failure_id".to_string()).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Loading
Loading