---
title: "Get rules for a deployment gate"
method: GET
path: "/api/v2/deployment_gates/{gate_id}/rules"
tags: ["Deployment Gates"]
---

# Get rules for a deployment gate

`GET /api/v2/deployment_gates/{gate_id}/rules`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Endpoint to get rules for a deployment gate.

## Path parameters

- `gate_id` string, required

## Response `200`

OK

- DeploymentGateRulesResponse: Response for a deployment gate rules.
  - `data` ListDeploymentRuleResponseData: Data for a list of deployment rules.
    - `attributes` ListDeploymentRulesResponseDataAttributes, required: Attributes of the response for listing deployment rules.
      - `rules` DeploymentRuleResponseDataAttributes[]: The list of deployment rules.
        - `created_at` string, date-time, required: The timestamp when the deployment rule was created.
        - `created_by` DeploymentRuleResponseDataAttributesCreatedBy, required: Information about the user who created the deployment rule.
          - `handle` string: The handle of the user who created the deployment rule.
          - `id` string, required: The ID of the user who created the deployment rule.
          - `name` string: The name of the user who created the deployment rule.
        - `dry_run` boolean, required: Whether this rule is run in dry-run mode.
        - `gate_id` string, required: The ID of the deployment gate.
        - `name` string, required: The name of the deployment rule.
        - `options` union, required: Options for deployment rule response representing either faulty deployment detection or monitor options.
          - DeploymentRuleOptionsFaultyDeploymentDetection: Faulty deployment detection options for deployment rules.
            - `duration` integer: The duration for faulty deployment detection.
            - `excluded_resources` string[]: Resources to exclude from faulty deployment detection.
          - DeploymentRuleOptionsMonitor: Monitor options for deployment rules.
            - `duration` integer: Seconds the monitor needs to stay in OK status for the rule to pass.
            - `query` string, required: Monitors that match this query are evaluated.
        - `type` 'faulty_deployment_detection' | 'monitor', required: The type of the deployment rule.
        - `updated_at` string, date-time: The timestamp when the deployment rule was last updated.
        - `updated_by` DeploymentRuleResponseDataAttributesUpdatedBy: Information about the user who updated the deployment rule.
          - `handle` string: The handle of the user who updated the deployment rule.
          - `id` string, required: The ID of the user who updated the deployment rule.
          - `name` string: The name of the user who updated the deployment rule.
    - `id` string, required: Unique identifier of the deployment rule.
    - `type` 'list_deployment_rules', required: List deployment rule resource type.

## Other responses

- `400`: Bad request.
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too many requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
