---
title: "Get all CSM Agents"
method: GET
path: "/api/v2/csm/onboarding/agents"
tags: ["CSM Agents"]
---

# Get all CSM Agents

`GET /api/v2/csm/onboarding/agents`

Get the list of all CSM Agents running on your hosts and containers.

## Query parameters

- `page` integer
- `size` integer
- `query` string
- `order_direction` 'asc' | 'desc' — The sort direction for results.

## Response `200`

OK

- CsmAgentsResponse — Response object that includes a list of CSM Agents.
  - `data` CsmAgentData[] — A list of Agents.
    - `attributes` CsmAgentsAttributes — A CSM Agent returned by the API.
      - `agent_version` string — Version of the Datadog Agent.
      - `aws_fargate` string — AWS Fargate details.
      - `cluster_name` string[] — List of cluster names associated with the Agent.
      - `datadog_agent` string — Unique identifier for the Datadog Agent.
      - `ecs_fargate_task_arn` string — ARN of the ECS Fargate task.
      - `envs` string[], nullable — List of environments associated with the Agent.
      - `host_id` integer — ID of the host.
      - `hostname` string — Name of the host.
      - `install_method_installer_version` string — Version of the installer used for installing the Datadog Agent.
      - `install_method_tool` string — Tool used for installing the Datadog Agent.
      - `is_csm_vm_containers_enabled` boolean, nullable — Indicates if CSM VM Containers is enabled.
      - `is_csm_vm_hosts_enabled` boolean, nullable — Indicates if CSM VM Hosts is enabled.
      - `is_cspm_enabled` boolean, nullable — Indicates if CSPM is enabled.
      - `is_cws_enabled` boolean, nullable — Indicates if CWS is enabled.
      - `is_cws_remote_configuration_enabled` boolean, nullable — Indicates if CWS Remote Configuration is enabled.
      - `is_remote_configuration_enabled` boolean, nullable — Indicates if Remote Configuration is enabled.
      - `os` string — Operating system of the host.
    - `id` string — The ID of the Agent.
    - `type` 'datadog_agent' — The type of the resource. The value should always be `datadog_agent`.
  - `meta` CSMAgentsMetadata — Metadata related to the paginated response.
    - `page_index` integer — The index of the current page in the paginated results.
    - `page_size` integer — The number of items per page in the paginated results.
    - `total_filtered` integer — Total number of items that match the filter criteria.

## Other responses

- `403` — Not Authorized
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
