For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/fleet-automation/get-detailed-information-about-an-agent.md. A documentation index is available at /llms.txt.
Language
Datadog site

Get detailed information about an agent

GEThttps://api.datadoghq.com/api/v2/fleet/agents/{agent_key}https://api.us3.datadoghq.com/api/v2/fleet/agents/{agent_key}https://api.us5.datadoghq.com/api/v2/fleet/agents/{agent_key}https://api.datadoghq.eu/api/v2/fleet/agents/{agent_key}https://api.ap1.datadoghq.com/api/v2/fleet/agents/{agent_key}https://api.ap2.datadoghq.com/api/v2/fleet/agents/{agent_key}https://api.uk1.datadoghq.com/api/v2/fleet/agents/{agent_key}https://api.ddog-gov.com/api/v2/fleet/agents/{agent_key}https://api.us2.ddog-gov.com/api/v2/fleet/agents/{agent_key}

Présentation

Retrieve detailed information about a specific Datadog Agent.

By default, only agent_infos is returned. Use the include query parameter to request additional data: integrations and/or configuration_files.

This endpoint requires the hosts_read permission.

Arguments

Paramètres du chemin

Name
Type
Description
agent_key [required]
string

The unique identifier (Agent key) for the Datadog Agent. Must be a 32-character lowercase hexadecimal string.

Chaînes de requête

Name
Type
Description
include
string

Comma-separated list of additional fields to include in the response. Valid values are integrations and configuration_files. Omitting this parameter returns only agent_infos. Unrecognized values are silently ignored rather than causing an error.

Réponse

OK

Response containing detailed information about a specific Datadog Agent.

Champ
Type
Description
data [required]
object

Detailed information about a specific Datadog Agent.

Exemple de code

Get detailed information about an agent
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export agent_key="a1b2c3d4e5f67890a1b2c3d4e5f67890"

# 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/fleet/agents/${agent_key}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"