Fleet Automation

List all Datadog Agents

Retrieve a paginated list of Datadog Agents.

Returns agents with support for pagination, sorting, and filtering. Use page_number and page_size to navigate pages, filter to narrow by field values, and tags to filter by agent tags.

get/api/v2/fleet/agents

Request

Query parameters

page_numberinteger

Page number for pagination, starting at 0.

page_sizeinteger

Number of agents to return per page. Maximum value is 100. Defaults to 10.

filterstring

Filter string to narrow down agent results.

tagsstring

Comma-separated list of tag keys to select which tags are included in each agent's tags attribute. Does not filter which agents are returned.

sort_attributestring

Agent attribute to sort results by. Must be a supported attribute name; unsupported values return a 400 error.

sort_descendingboolean

Set to true to sort results in descending order. Defaults to ascending.

Response

OK

Example response

{
  "data": [
    {
      "attributes": {
        "agent_version": "7.50.0",
        "api_key_name": "Production API Key",
        "api_key_uuid": "a1b2c3d4-e5f6-4321-a123-123456789abc",
        "cloud_provider": "aws",
        "cluster_name": "production-us-east-1",
        "datadog_data_center": "us1",
        "ecs_fargate_cluster_name": "my-ecs-cluster",
        "ecs_fargate_task_arn": "arn:aws:ecs:us-east-1:123456789012:task/my-cluster/abc123",
        "first_seen_at": 1699900000,
        "hostname": "my-hostname",
        "instrumentation_error_counts": 3,
        "instrumentation_status": "success",
        "is_single_step_instrumentation_enabled": true,
        "last_restart_at": 1699999999,
        "os": "linux",
        "pod_name": "datadog-agent-abc123",
        "remote_agent_management": "enabled",
        "remote_config_status": "connected",
        "team": "platform"
      },
      "id": "my-agent-hostname",
      "type": "agent"
    }
  ],
  "meta": {
    "page": {
      "total_count": 500,
      "total_filtered_count": 42
    }
  }
}

Changes

Changes to this operation have not been checked yet.