Get a list of deployment events
https://api.datadoghq.com/api/v2/dora/deploymentshttps://api.us3.datadoghq.com/api/v2/dora/deploymentshttps://api.us5.datadoghq.com/api/v2/dora/deploymentshttps://api.datadoghq.eu/api/v2/dora/deploymentshttps://api.ap1.datadoghq.com/api/v2/dora/deploymentshttps://api.ap2.datadoghq.com/api/v2/dora/deploymentshttps://api.uk1.datadoghq.com/api/v2/dora/deploymentshttps://api.ddog-gov.com/api/v2/dora/deploymentshttps://api.us2.ddog-gov.com/api/v2/dora/deployments概要
Use this API endpoint to get a list of deployment events.
リクエスト
Body Data (required)
data [required]The JSON:API data.
attributes [required]Attributes to get a list of deployments.
fromMinimum timestamp for requested events.
limitMaximum number of events in the response.
10querySearch query with event platform syntax.
sortSort order (prefixed with - for descending).
toMaximum timestamp for requested events.
typeThe definition of DORAListDeploymentsRequestDataType object.
dora_deployments_list_requestdora_deployments_list_request{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}応答
OK
Response for the list deployments endpoint.
dataThe list of DORA deployment events.
attributesThe attributes of the deployment event.
custom_tagsA list of user-defined tags. The tags must follow the key:value pattern. Up to 100 may be added per event.
envEnvironment name to where the service was deployed.
finished_atThe time when the deployment finished.
gitGit info returned by DORA Metrics events.
commit_sha [required]Git Commit SHA.
repository_id [required]Git Repository ID
service [required]Service name.
started_at [required]The time when the deployment started.
teamName of the team owning the deployed service.
versionVersion to correlate with APM Deployment Tracking.
idThe ID of the deployment event.
typeJSON:API type for DORA deployment events.
dora_deploymentdora_deployment{
"data": [
{
"attributes": {
"custom_tags": [
"language:java",
"department:engineering",
"region:us-east-1"
],
"env": "production",
"finished_at": "2023-08-31T14:26:24Z",
"git": {
"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
"repository_id": "github.com/organization/example-repository"
},
"service": "shopist",
"started_at": "2023-08-31T14:26:14Z",
"team": "backend",
"version": "v1.12.07"
},
"id": "4242fcdd31586083",
"type": "dora_deployment"
},
{
"attributes": {
"custom_tags": [
"language:go",
"department:platform"
],
"env": "production",
"finished_at": "2023-08-31T14:28:04Z",
"git": {
"commit_sha": "77bdc9350f2cc9b250b69abddab733dd55e1a599",
"repository_id": "github.com/organization/api-service"
},
"service": "api-service",
"started_at": "2023-08-31T14:27:54Z",
"team": "backend",
"version": "v2.1.0"
},
"id": "4242fcdd31586084",
"type": "dora_deployment"
}
]
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Not Authorized
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}コード例
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/deployments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T00:00:00Z"
},
"type": "dora_deployments_list_request"
}
}
EOF