---
title: Get a deployment gate evaluation result
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Deployment Gates
---

# Get a deployment gate evaluation result{% #get-a-deployment-gate-evaluation-result %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in preview and may be subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                               |
| ----------------- | -------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/deployments/gates/evaluation/{id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/deployments/gates/evaluation/{id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/deployments/gates/evaluation/{id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/deployments/gates/evaluation/{id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/deployments/gates/evaluation/{id}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/deployments/gates/evaluation/{id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/deployments/gates/evaluation/{id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/deployments/gates/evaluation/{id} |

### Overview

Retrieves the result of a deployment gate evaluation by its evaluation ID. If the evaluation is still in progress, `data.attributes.gate_status` will be `in_progress`; continue polling until it returns `pass` or `fail`. Polling every 10-20 seconds is recommended. The endpoint may return a 404 if called too soon after triggering; retry after a few seconds. This endpoint requires the `deployment_gates_evaluate` permission.

### Arguments

#### Path Parameters

| Name                 | Type   | Description                                         |
| -------------------- | ------ | --------------------------------------------------- |
| id [*required*] | string | The evaluation ID returned by the trigger endpoint. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the result of a deployment gate evaluation.

| Parent field | Field                            | Type     | Description                                                                                                                        |
| ------------ | -------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|              | data                             | object   | Data for a deployment gate evaluation result response.                                                                             |
| data         | attributes [*required*]     | object   | Attributes for a deployment gate evaluation result response.                                                                       |
| attributes   | dry_run [*required*]        | boolean  | Whether the gate was evaluated in dry-run mode.                                                                                    |
| attributes   | evaluation_id [*required*]  | string   | The unique identifier of the gate evaluation.                                                                                      |
| attributes   | evaluation_url [*required*] | string   | A URL to view the evaluation details in the Datadog UI.                                                                            |
| attributes   | gate_id [*required*]        | uuid     | The unique identifier of the deployment gate.                                                                                      |
| attributes   | gate_status [*required*]    | enum     | The overall status of the gate evaluation.                                                                                         |
| attributes   | rules [*required*]          | [object] | The results of individual rule evaluations.                                                                                        |
| rules        | dry_run                          | boolean  | Whether this rule was evaluated in dry-run mode.                                                                                   |
| rules        | name                             | string   | The name of the rule.                                                                                                              |
| rules        | reason                           | string   | The reason for the rule result, if applicable.                                                                                     |
| rules        | status                           | enum     | The overall status of the gate evaluation.                                                                                         |
| data         | id [*required*]             | string   | The unique identifier of the evaluation.                                                                                           |
| data         | type [*required*]           | enum     | JSON:API type for a deployment gate evaluation result response. Allowed enum values: `deployment_gates_evaluation_result_response` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "dry_run": false,
      "evaluation_id": "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9",
      "evaluation_url": "https://app.datadoghq.com/ci/deployment-gates/evaluations?index=cdgates\u0026query=level%3Agate+%40evaluation_id%3Ae9d2f04f-4f4b-494b-86e5-52f03e10c8e9",
      "gate_id": "e140302e-0cba-40d2-978c-6780647f8f1c",
      "gate_status": "pass",
      "rules": [
        {
          "dry_run": false,
          "name": "Check service monitors",
          "reason": "One or more monitors in ALERT state",
          "status": "pass"
        }
      ]
    },
    "id": "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9",
    "type": "deployment_gates_evaluation_result_response"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad request.
{% tab title="Model" %}
Bad request.

| Parent field | Field  | Type     | Description        |
| ------------ | ------ | -------- | ------------------ |
|              | errors | [object] | Structured errors. |
| errors       | detail | string   | Error message.     |
| errors       | status | string   | Error code.        |
| errors       | title  | string   | Error title.       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Deployment gate not found.
{% tab title="Model" %}
Deployment gate not found.

| Parent field | Field  | Type     | Description        |
| ------------ | ------ | -------- | ------------------ |
|              | errors | [object] | Structured errors. |
| errors       | detail | string   | Error message.     |
| errors       | status | string   | Error code.        |
| errors       | title  | string   | Error title.       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="500" %}
Internal Server Error
{% tab title="Model" %}
Errors occurred.

| Parent field | Field  | Type     | Description        |
| ------------ | ------ | -------- | ------------------ |
|              | errors | [object] | Structured errors. |
| errors       | detail | string   | Error message.     |
| errors       | status | string   | Error code.        |
| errors       | title  | string   | Error title.       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export id="CHANGE_ME" \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/deployments/gates/evaluation/${id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```python
"""
Get a deployment gate evaluation result returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.deployment_gates_api import DeploymentGatesApi
from uuid import UUID

configuration = Configuration()
configuration.unstable_operations["get_deployment_gates_evaluation_result"] = True
with ApiClient(configuration) as api_client:
    api_instance = DeploymentGatesApi(api_client)
    response = api_instance.get_deployment_gates_evaluation_result(
        id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a deployment gate evaluation result returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.get_deployment_gates_evaluation_result".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DeploymentGatesAPI.new
p api_instance.get_deployment_gates_evaluation_result("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a deployment gate evaluation result returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
	"github.com/google/uuid"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.GetDeploymentGatesEvaluationResult", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewDeploymentGatesApi(apiClient)
	resp, r, err := api.GetDeploymentGatesEvaluationResult(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"))

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DeploymentGatesApi.GetDeploymentGatesEvaluationResult`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `DeploymentGatesApi.GetDeploymentGatesEvaluationResult`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a deployment gate evaluation result returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DeploymentGatesApi;
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationResultResponse;
import java.util.UUID;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setUnstableOperationEnabled("v2.getDeploymentGatesEvaluationResult", true);
    DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);

    try {
      DeploymentGatesEvaluationResultResponse result =
          apiInstance.getDeploymentGatesEvaluationResult(
              UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"));
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println(
          "Exception when calling DeploymentGatesApi#getDeploymentGatesEvaluationResult");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a deployment gate evaluation result returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_deployment_gates::DeploymentGatesAPI;
use uuid::Uuid;

#[tokio::main]
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.GetDeploymentGatesEvaluationResult", true);
    let api = DeploymentGatesAPI::with_config(configuration);
    let resp = api
        .get_deployment_gates_evaluation_result(
            Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a deployment gate evaluation result returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.getDeploymentGatesEvaluationResult"] =
  true;
const apiInstance = new v2.DeploymentGatesApi(configuration);

const params: v2.DeploymentGatesApiGetDeploymentGatesEvaluationResultRequest = {
  id: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
};

apiInstance
  .getDeploymentGatesEvaluationResult(params)
  .then((data: v2.DeploymentGatesEvaluationResultResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
