For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/fleet-automation/list-all-datadog-agents.md. A documentation index is available at /llms.txt.
Language
Datadog site

모든 Datadog 에이전트 목록 표시

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

개요

Datadog Agent의 페이지별로 표시된 목록을 검색합니다.

페이지 매김, 정렬 및 필터링을 지원하는 에이전트를 반환합니다. page_number와 page_size를 사용하여 페이지를 탐색하고 filter를 사용하여 필드 값별로 범위를 좁히며 tags를 사용하여 agent 태그별로 필터링합니다.

This endpoint requires the hosts_read permission.

인수

쿼리 문자열

이름
유형
설명
page_number
integer

Page number for pagination, starting at 0.

Default: 0
page_size
integer

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

Default: 10
filter
string

Filter string to narrow down agent results.

tags
string

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_attribute
string

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

sort_descending
boolean

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

응답

OK

Response containing a paginated list of Datadog Agents.

항목
유형
설명
data [required]
[object]

Array of agents matching the query criteria.

meta
object

Metadata for the v2 list of agents, including pagination information.

코드 예시

모든 Datadog 에이전트 목록 표시
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"