---
title: List Agent Health issues
description: List open Agent Health issues across your organization.
breadcrumbs: Documentación > API > List Agent Health issues
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# List Agent Health issues

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                |
| ----------------- | ----------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/agenthealth/issues     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/agenthealth/issues |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/agenthealth/issues |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/agenthealth/issues      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/agenthealth/issues |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/agenthealth/issues |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/agenthealth/issues |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/agenthealth/issues      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/agenthealth/issues  |

### Overview

List open Agent Health issues across your organization. Returns `403` if you
lack the `hosts_read` permission.

Each item in `data` is a JSON:API resource object whose `attributes` hold the issue
fields, including its `issue_type`. Issues use a stable order: severity rank
(`high`, `medium`, `low`, then other values), then `first_seen_at` descending with
missing timestamps last, then issue ID ascending.

Set `count_by=issue_type` to include `meta.page`, where `total_count` is the number of
open issues matching the filters and `counts_by_issue_type` holds the per-type counts.
`meta` is omitted when `count_by` is not requested.

Each filter accepts up to 50 comma-separated exact values of at most 256 characters
each, combined with OR within a filter and AND across filters. Blank entries are ignored; an all-blank filter
is treated as absent.

This endpoint requires the `hosts_read` permission.

OAuth apps require the `hosts_read` authorization [scope](https://docs.datadoghq.com/es/api/latest/scopes.md#agent-health) to access this endpoint.

### Arguments

#### Query Strings

| Field                 | Type   | Description                                                                                                                                                                                                                                                   |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| count_by              | enum   | Set to `issue_type` to include `meta.page` with `total_count` and per-issue-type counts. If you don't set this parameter, the response omits `meta`. Only `issue_type` is supported. Allowed enum values: `issue_type`.                                       |
| filter[severity]      | string | Filter by a comma-separated list of exact `severity` values, up to 50 values of at most 256 characters each. Values are combined with OR within this filter and AND across filters. Blank entries are ignored; an all-blank filter is treated as absent.      |
| filter[category]      | string | Filter by a comma-separated list of exact `category` values, up to 50 values of at most 256 characters each. Values are combined with OR within this filter and AND across filters. Blank entries are ignored; an all-blank filter is treated as absent.      |
| filter[issue_type]    | string | Filter by a comma-separated list of exact `issue_type` values, up to 50 values of at most 256 characters each. Values are combined with OR within this filter and AND across filters. Blank entries are ignored; an all-blank filter is treated as absent.    |
| filter[resource_kind] | string | Filter by a comma-separated list of exact `resource_kind` values, up to 50 values of at most 256 characters each. Values are combined with OR within this filter and AND across filters. Blank entries are ignored; an all-blank filter is treated as absent. |
| filter[resource_id]   | string | Filter by a comma-separated list of exact `resource_id` values, up to 50 values of at most 256 characters each. Values are combined with OR within this filter and AND across filters. Blank entries are ignored; an all-blank filter is treated as absent.   |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
A response containing open Agent Health issues.

| Parent field         | Field                             | Type      | Description                                                                                                                                                                                                                                                                                    |
| -------------------- | --------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | data [*required*]                 | [object]  | The open Agent Health issues matching the request.                                                                                                                                                                                                                                             |
| data                 | attributes [*required*]           | object    | Attributes of an open Agent Health issue, including available remediation.                                                                                                                                                                                                                     |
| attributes           | category                          | string    | The category of the issue, such as `configuration`. Omitted when not set.                                                                                                                                                                                                                      |
| attributes           | description                       | string    | The description of the issue. Omitted when empty.                                                                                                                                                                                                                                              |
| attributes           | extra                             | object    | Free-form, issue-type-specific context. Keys are not part of the stable schema. Omitted when empty.                                                                                                                                                                                            |
| attributes           | first_seen_at                     | date-time | The time the issue was first seen, in RFC 3339 format. Omitted when empty.                                                                                                                                                                                                                     |
| attributes           | issue_name [*required*]           | string    | The human-readable name of the issue.                                                                                                                                                                                                                                                          |
| attributes           | issue_type [*required*]           | string    | The machine-readable type of the issue.                                                                                                                                                                                                                                                        |
| attributes           | remediation                       | object    | Remediation for the issue. Omitted when no remediation is available.                                                                                                                                                                                                                           |
| remediation          | ai_prompt                         | string    | A suggested prompt for an AI assistant to help remediate the issue.                                                                                                                                                                                                                            |
| remediation          | script                            | object    | A script that can be used to remediate the issue.                                                                                                                                                                                                                                              |
| script               | content                           | string    | The content of the script.                                                                                                                                                                                                                                                                     |
| script               | filename                          | string    | The filename of the script.                                                                                                                                                                                                                                                                    |
| script               | language                          | string    | The language of the script.                                                                                                                                                                                                                                                                    |
| script               | language_version                  | string    | The language version used by the script.                                                                                                                                                                                                                                                       |
| script               | requires_root                     | boolean   | Whether the script requires root privileges.                                                                                                                                                                                                                                                   |
| remediation          | steps                             | [object]  | Steps to remediate the issue.                                                                                                                                                                                                                                                                  |
| steps                | order                             | int64     | The order in which to perform the step.                                                                                                                                                                                                                                                        |
| steps                | text                              | string    | The instructions for the step.                                                                                                                                                                                                                                                                 |
| remediation          | summary                           | string    | A summary of how to remediate the issue.                                                                                                                                                                                                                                                       |
| attributes           | resource_id [*required*]          | string    | The identifier of the affected resource, interpreted according to `resource_kind`: hostname for `host`, DaemonSet UID for `deployment` (node Agent), cluster UUID for `cluster`, hostname of the host running the Cluster Agent for `cluster_agent`, or OpenTelemetry collector ID for `otel`. |
| attributes           | resource_kind [*required*]        | string    | The kind of affected resource. Known values are `host`, `deployment`, `cluster`, `cluster_agent`, and `otel`.                                                                                                                                                                                  |
| attributes           | resource_type                     | string    | The type of the affected resource. Omitted when empty.                                                                                                                                                                                                                                         |
| attributes           | severity [*required*]             | string    | The severity of the issue. Known values are `low`, `medium`, `high`, and `unknown`.                                                                                                                                                                                                            |
| attributes           | state [*required*]                | string    | The state of the issue. Only issues with state `open` are returned.                                                                                                                                                                                                                            |
| attributes           | tags                              | [string]  | Tags associated with the issue. Omitted when empty.                                                                                                                                                                                                                                            |
| attributes           | title                             | string    | The title of the issue. Omitted when empty.                                                                                                                                                                                                                                                    |
| attributes           | updated_at                        | date-time | The time the issue was last updated, in RFC 3339 format. Omitted when empty.                                                                                                                                                                                                                   |
| data                 | id [*required*]                   | string    | The unique identifier of the issue.                                                                                                                                                                                                                                                            |
| data                 | type [*required*]                 | enum      | The Agent Health issue resource type. Allowed enum values: `agent_health_issues`.                                                                                                                                                                                                              |
|                      | meta                              | object    | Aggregate counts for the matching Agent Health issues. Present only when `count_by=issue_type` is requested.                                                                                                                                                                                   |
| meta                 | page [*required*]                 | object    | Counts for the matching Agent Health issues.                                                                                                                                                                                                                                                   |
| page                 | counts_by_issue_type [*required*] | object    | The number of open issues matching the filters in each issue-type group.                                                                                                                                                                                                                       |
| additionalProperties | <any-key>                         | int64     |                                                                                                                                                                                                                                                                                                |
| page                 | total_count [*required*]          | int64     | The total number of open issues matching the filters.                                                                                                                                                                                                                                          |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "category": "configuration",
        "description": "The Agent configuration file contains an invalid value.",
        "extra": {
          "agent_hostname": "i-0ea3e96bf45c427e6",
          "client_library": "java"
        },
        "first_seen_at": "2026-11-01T10:00:00Z",
        "issue_name": "Invalid Config",
        "issue_type": "invalid_config",
        "remediation": {
          "ai_prompt": "Help me fix the invalid configuration value in datadog.yaml.",
          "script": {
            "content": "...",
            "filename": "fix.sh",
            "language": "bash",
            "language_version": "5",
            "requires_root": true
          },
          "steps": [
            {
              "order": 1,
              "text": "Open datadog.yaml"
            }
          ],
          "summary": "Fix the invalid configuration value."
        },
        "resource_id": "my-hostname",
        "resource_kind": "host",
        "resource_type": "host",
        "severity": "high",
        "state": "open",
        "tags": [
          "env:prod"
        ],
        "title": "Invalid Agent configuration",
        "updated_at": "2026-11-09T08:00:00Z"
      },
      "id": "invalid-config:4828e7d6c704c4a3",
      "type": "agent_health_issues"
    }
  ],
  "meta": {
    "page": {
      "counts_by_issue_type": {
        "<any-key>": "integer"
      },
      "total_count": 25526
    }
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="401" %}
Unauthorized

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, 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/agenthealth/issues" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
