---
title: "Get detailed information about an agent"
method: GET
path: "/api/v2/fleet/agents/{agent_key}"
tags: ["Fleet Automation"]
---

# Get detailed information about an agent

`GET /api/v2/fleet/agents/{agent_key}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/fleet/agents/{agent_key}`
- 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/fleet/agents/:agent_key/get.ts> (a function with typed inputs; its response is checked against the schema)

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`.

## Path parameters

- `agent_key` string, required

## Query parameters

- `include` string

## Response `200`

OK

- FleetAgentDetailV2Response: Response containing detailed information about a specific Datadog Agent.
  - `data` FleetAgentDetailV2, required: Detailed information about a specific Datadog Agent.
    - `attributes` FleetAgentDetailV2Attributes, required: Attributes for the v2 agent detail response.
      - `agent_infos` FleetAgentInfoDetailsV2, required: Detailed information about a Datadog Agent.
        - `active_ha_agent` string: The currently active agent in the high-availability group.
        - `agent_version` string: The Datadog Agent version.
        - `api_key_name` string: The API key name (if available and not redacted).
        - `api_key_uuid` string: The API key UUID.
        - `cloud_provider` string: The cloud provider where the agent is running.
        - `cluster_name` string: Kubernetes cluster name (if applicable).
        - `config_id` string: The configuration identifier applied to the agent.
        - `datadog_agent_key` string: The unique agent key identifier.
        - `datadog_data_center` string: The Datadog data center the agent reports to.
        - `ecs_fargate_cluster_name` string: The ECS Fargate cluster name, if the agent runs in an ECS Fargate environment.
        - `ecs_fargate_task_arn` string: The ECS Fargate task ARN, if the agent runs in an ECS Fargate environment.
        - `enabled_products` string[]: Datadog products enabled on the agent.
        - `env` string[]: Environments the agent is reporting from.
        - `first_seen_at` integer: Timestamp when the agent was first seen.
        - `ha_agent_hosts` string[]: Hosts participating in the agent's high-availability group.
        - `ha_agent_state` string: The high-availability state of the agent.
        - `hostname` string: The hostname of the agent.
        - `hostname_aliases` string[]: Alternative hostname list for the agent.
        - `install_method_installer_version` string: The version of the installer used.
        - `install_method_tool` string: The tool used to install the agent.
        - `ip_addresses` string[]: IP addresses of the agent.
        - `is_single_step_instrumentation_enabled` boolean: Whether single-step instrumentation is enabled.
        - `last_restart_at` integer: Timestamp of the last agent restart.
        - `os` string: The operating system.
        - `os_version` string: The operating system version.
        - `otel_collectors` FleetOtelCollector[]: OpenTelemetry collectors associated with the agent (if applicable).
        - `pod_name` string: Kubernetes pod name (if applicable).
        - `preferred_ha_active_agent` string: The preferred active agent in the high-availability group.
        - `python_version` string: The Python version used by the agent.
        - `region` string[]: Regions where the agent is running.
        - `remote_agent_management` string: Remote agent management status.
        - `remote_config_status` string: Remote configuration status.
        - `services` string[]: Services running on the agent.
        - `support_agent_upgrade` boolean: Whether the agent supports remote agent upgrade.
        - `tags` string[]: Tags associated with the agent.
        - `team` string: Team associated with the agent.
      - `configuration_files` FleetAgentConfigurationFilesV2: Configuration details for an agent, organized by configuration layer.
        - `agent_configuration` FleetConfigurationLayer: Configuration information organized by layers.
          - `compiled_configuration` string: The final compiled configuration.
          - `env_configuration` string: Configuration from environment variables.
          - `file_configuration` string: Configuration from files.
          - `remote_configuration` string: Remote configuration settings.
          - `runtime_configuration` string: Runtime configuration.
        - `application_monitoring_configuration` FleetConfigurationLayer: Configuration information organized by layers.
          - `compiled_configuration` string: The final compiled configuration.
          - `env_configuration` string: Configuration from environment variables.
          - `file_configuration` string: Configuration from files.
          - `remote_configuration` string: Remote configuration settings.
          - `runtime_configuration` string: Runtime configuration.
        - `otel_collectors_configuration` FleetOtelCollectorConfigurationV2[]: Configuration for OpenTelemetry collectors associated with the agent. Present only when the agent has associated OpenTelemetry collectors.
          - `collector_id` string: The unique identifier of the OpenTelemetry collector.
          - `compiled_configuration` string: The final compiled configuration of the OpenTelemetry collector.
          - `distribution` string: The distribution of the OpenTelemetry collector.
        - `security_agent_configuration` FleetConfigurationLayer: Configuration information organized by layers.
          - `compiled_configuration` string: The final compiled configuration.
          - `env_configuration` string: Configuration from environment variables.
          - `file_configuration` string: Configuration from files.
          - `remote_configuration` string: Remote configuration settings.
          - `runtime_configuration` string: Runtime configuration.
        - `system_probe_configuration` FleetConfigurationLayer: Configuration information organized by layers.
          - `compiled_configuration` string: The final compiled configuration.
          - `env_configuration` string: Configuration from environment variables.
          - `file_configuration` string: Configuration from files.
          - `remote_configuration` string: Remote configuration settings.
          - `runtime_configuration` string: Runtime configuration.
      - `integrations` FleetIntegrationsByStatusV2: Integrations organized by their status.
        - `configuration_files` FleetConfigurationFileV2[]: Configuration files for integrations.
          - `agent_hash` string: Hash of the configuration file as seen by the agent.
          - `file_content` string: The raw content of the configuration file.
          - `file_path` string: Path to the configuration file.
          - `filename` string: Name of the configuration file.
        - `error_integrations` FleetIntegrationDetailsV2[]: Integrations with errors.
          - `data_type` string: Type of data collected, such as metrics or logs.
          - `error_messages` string[]: Error messages if the integration has issues.
          - `init_config` string: Initialization configuration (YAML format).
          - `instance_config` string: Instance-specific configuration (YAML format).
          - `is_custom_check` boolean: Whether this is a custom integration.
          - `is_default` boolean: Whether this is a default integration instance.
          - `is_init` boolean: Whether this integration configuration is an init config.
          - `log_config` string: Log collection configuration (YAML format).
          - `name` string: Name of the integration instance.
          - `pod_count` integer: Number of pods running this integration. Absent from the response when the count is zero.
          - `source_index` integer: Index in the configuration file.
          - `source_path` string: Path to the configuration file.
          - `type` string: Integration type.
        - `missing_integrations` FleetDetectedIntegration[]: Detected but not configured integrations.
          - `escaped_name` string: Escaped integration name.
          - `prefix` string: Integration prefix identifier.
        - `warning_integrations` FleetIntegrationDetailsV2[]: Integrations with warnings.
          - `data_type` string: Type of data collected, such as metrics or logs.
          - `error_messages` string[]: Error messages if the integration has issues.
          - `init_config` string: Initialization configuration (YAML format).
          - `instance_config` string: Instance-specific configuration (YAML format).
          - `is_custom_check` boolean: Whether this is a custom integration.
          - `is_default` boolean: Whether this is a default integration instance.
          - `is_init` boolean: Whether this integration configuration is an init config.
          - `log_config` string: Log collection configuration (YAML format).
          - `name` string: Name of the integration instance.
          - `pod_count` integer: Number of pods running this integration. Absent from the response when the count is zero.
          - `source_index` integer: Index in the configuration file.
          - `source_path` string: Path to the configuration file.
          - `type` string: Integration type.
        - `working_integrations` FleetIntegrationDetailsV2[]: Integrations that are working correctly.
          - `data_type` string: Type of data collected, such as metrics or logs.
          - `error_messages` string[]: Error messages if the integration has issues.
          - `init_config` string: Initialization configuration (YAML format).
          - `instance_config` string: Instance-specific configuration (YAML format).
          - `is_custom_check` boolean: Whether this is a custom integration.
          - `is_default` boolean: Whether this is a default integration instance.
          - `is_init` boolean: Whether this integration configuration is an init config.
          - `log_config` string: Log collection configuration (YAML format).
          - `name` string: Name of the integration instance.
          - `pod_count` integer: Number of pods running this integration. Absent from the response when the count is zero.
          - `source_index` integer: Index in the configuration file.
          - `source_path` string: Path to the configuration file.
          - `type` string: Integration type.
    - `id` string, required: The unique agent key identifier.
    - `type` 'agent', required: The type of the agent resource.

## 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)
