---
title: "Get a detection"
method: GET
path: "/api/v2/governance/detections/{detection_id}"
tags: ["Governance Console"]
---

# Get a detection

`GET /api/v2/governance/detections/{detection_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/governance/detections/{detection_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/governance/detections/:detection_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a single governance detection by its unique identifier.

## Path parameters

- `detection_id` string, required

## Response `200`

OK

- GovernanceControlDetectionResponse: A single governance control detection.
  - `data` GovernanceControlDetectionData, required: A governance control detection resource.
    - `attributes` GovernanceControlDetectionAttributes, required: The attributes of a governance control detection.
      - `assigned_team` string: The identifier of the team the detection is assigned to, if any.
      - `assigned_to` string: The identifier of the user the detection is assigned to, if any.
      - `assignment_source` 'auto_resolved' | 'manual' | 'reassigned' | 'cleared', required: How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`.
      - `control_id` string, required: DEPRECATED: mirrors `detection_type` for backward compatibility; use `detection_type` instead.
      - `created_at` string, date-time, required: The date and time when the detection was created.
      - `detection_type` string, required: The type of detection, which determines what condition was detected.
      - `display_name` string, required: The human-readable name of the detected resource.
      - `exception_at` string, date-time: The date and time when the detection was marked as an exception, if applicable.
      - `exception_by` string: The identifier of the user who marked the detection as an exception, if applicable.
      - `metadata` unknown
      - `mitigate_after` string, date-time: The date and time after which the detection is scheduled to be mitigated, if applicable.
      - `mitigated_at` string, date-time: The date and time when the detection was mitigated, if applicable.
      - `priority` integer, required: The priority of the detection, if set.
      - `resource_id` string, required: The identifier of the resource the detection applies to.
      - `resource_type` string, required: The type of resource the detection applies to, for example `api_key` or `dashboard`.
      - `state` 'active' | 'exception' | 'mitigated' | 'inactive' | 'obsolete' | 'resolved_externally' | 'mitigation_in_progress', required: The current state of the detection. Possible values are `active`, `exception`, `mitigated`, `inactive`, `obsolete`, `resolved_externally`, and `mitigation_in_progress`.
    - `id` string, required: The unique identifier of the detection.
    - `type` 'governance_control_detection', required: Governance control detection resource type.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[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/3f70db624329?raw)
