For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ja/api/latest/governance-console/list-control-detections.md. A documentation index is available at /llms.txt.
Language
Datadog site

List control detections

警告Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
GEThttps://api.datadoghq.com/api/v2/governance/control/{detection_type}/detectionshttps://api.us3.datadoghq.com/api/v2/governance/control/{detection_type}/detectionshttps://api.us5.datadoghq.com/api/v2/governance/control/{detection_type}/detectionshttps://api.datadoghq.eu/api/v2/governance/control/{detection_type}/detectionshttps://api.ap1.datadoghq.com/api/v2/governance/control/{detection_type}/detectionshttps://api.ap2.datadoghq.com/api/v2/governance/control/{detection_type}/detectionshttps://api.uk1.datadoghq.com/api/v2/governance/control/{detection_type}/detectionshttps://api.ddog-gov.com/api/v2/governance/control/{detection_type}/detectionshttps://api.us2.ddog-gov.com/api/v2/governance/control/{detection_type}/detections

概要

Retrieve the detections produced by the governance control with the given detection type. Results can be filtered by state and free-text query, sorted, and paginated.

This endpoint requires the governance_console_read permission.

引数

パスパラメーター

名前
タイプ
説明
detection_type [required]
string

The detection type that identifies the control; for example, unused_api_keys.

クエリ文字列

名前
タイプ
説明
filter[state]
string

Restrict the results to detections in the given state.

filter[query]
string

Restrict the results to detections matching the given free-text query.

sort
string

A comma-separated list of attributes to sort detections by. Prefix an attribute with - for descending order.

The attributes available for sorting are id, created_at, assigned_to, detection_type, display_name, exception_at, mitigate_after, mitigated_at, priority, resource_id, and state. Defaults to created_at,-id.

page[number]
integer

The zero-based index of the page to return; the first page is 0.

Default: 0
page[size]
integer

The number of detections to return per page.

応答

OK

A list of governance control detections.

フィールド
タイプ
説明
data [required]
[object]

An array of governance control detection resources.

コード例

List control detections
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export detection_type="unused_api_keys"

# 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 GET "https://api.${DD_SITE}/api/v2/governance/control/${detection_type}/detections" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"