For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/api/latest/deployment-gates/trigger-a-deployment-gate-evaluation.md. A documentation index is available at /llms.txt.
Language
Datadog site

Trigger a deployment gate evaluation

WARNINGNote: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/deployments/gates/evaluationhttps://api.us3.datadoghq.com/api/v2/deployments/gates/evaluationhttps://api.us5.datadoghq.com/api/v2/deployments/gates/evaluationhttps://api.datadoghq.eu/api/v2/deployments/gates/evaluationhttps://api.ap1.datadoghq.com/api/v2/deployments/gates/evaluationhttps://api.ap2.datadoghq.com/api/v2/deployments/gates/evaluationhttps://api.uk1.datadoghq.com/api/v2/deployments/gates/evaluationhttps://api.ddog-gov.com/api/v2/deployments/gates/evaluationhttps://api.us2.ddog-gov.com/api/v2/deployments/gates/evaluation

Overview

Triggers an asynchronous deployment gate evaluation for the given service and environment. Returns an evaluation ID that can be used to poll for the result via the GET /api/v2/deployments/gates/evaluation/{id} endpoint.

When the configuration attribute is provided, rules are evaluated inline from that configuration and no pre-configured gate is required. When configuration is omitted, rules are resolved from the gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.

This endpoint requires the deployment_gates_evaluate permission.

Request

Body Data (required)

Field
Type
Description
data [required]
object

Data for a deployment gate evaluation request.

Response

Accepted

Response for a deployment gate evaluation request.

Field
Type
Description
data
object

Data for a deployment gate evaluation response.

Code Example

Trigger a deployment gates evaluation returns "Accepted" response
# 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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_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/deployments/gates/evaluation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "env": "production",
      "identifier": "pre",
      "service": "my-service"
    },
    "type": "deployment_gates_evaluation_request"
  }
}
EOF