For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/es/api/latest/teams/get-team-hierarchy-members.md. A documentation index is available at /llms.txt.
Language
Datadog site

Get team hierarchy members

ADVERTENCIANote: This endpoint is in Preview and is subject to change. If you have any feedback, contact Datadog support.
GEThttps://api.datadoghq.com/api/v2/team/{team_id}/membershttps://api.us3.datadoghq.com/api/v2/team/{team_id}/membershttps://api.us5.datadoghq.com/api/v2/team/{team_id}/membershttps://api.datadoghq.eu/api/v2/team/{team_id}/membershttps://api.ap1.datadoghq.com/api/v2/team/{team_id}/membershttps://api.ap2.datadoghq.com/api/v2/team/{team_id}/membershttps://api.uk1.datadoghq.com/api/v2/team/{team_id}/membershttps://api.ddog-gov.com/api/v2/team/{team_id}/membershttps://api.us2.ddog-gov.com/api/v2/team/{team_id}/members

Descripción general

List the direct and inherited members of a team, deduplicated by user. Members of descendant teams are included unless filter[is_direct_only] is true. Datadog support users are always excluded.

Use page[number] and page[size] to paginate through the results. Invalid query parameters return a JSON:API error with status 400. Invalid or unknown team UUIDs return status 404.

This endpoint requires the teams_read permission.

OAuth apps require the teams_read authorization scope to access this endpoint.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
team_id [required]
string

UUID of the requested root team.

Cadenas de consulta

Nombre
Type
Descripción
filter[is_direct_only]
boolean

Return only direct members. By default, members inherited from descendant teams are also returned.

Default: false
filter[include_service_accounts]
boolean

Include service accounts. Datadog support users are always excluded.

Default: true
filter[keyword]
string

Filter by a case-insensitive substring of the user name, handle, or email.

include
string

Comma-separated resources to include: user and team. The included team is the requested team. Whitespace is trimmed, and duplicate or empty entries are ignored.

sort
string

Comma-separated sort fields: name, handle, is_direct, and provisioned_by. Fields are applied in order, each optionally prefixed with - for descending order. By default, team admins come first, followed by other direct members, then inherited members, sorted by name within each group.

page[number]
integer

Zero-based page number. Negative values become 0. Defaults to 0.

Default: 0
page[size]
integer

Requested number of members per page. Defaults to and maxes out at 100.

Default: 100

Respuesta

OK

Direct and inherited members of the requested team.

Campo
Type
Descripción
data [required]
[object]

Membership relationships for users who belong to the requested team or inherit membership through its descendant teams. Each user appears once, even if they belong to multiple teams in the hierarchy. Each relationship identifies the user and requested team, and indicates whether the user is a direct member of the requested team.

included
[<oneOf>]

Requested users and the team. May be absent when the result is empty, even if requested.

links [required]
object

Page navigation links. Unavailable links are omitted.

meta [required]
object

Pagination metadata for the filtered members.

Ejemplo de código

Get team hierarchy members
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export team_id="692e8073-12c4-4c71-8408-5090bd44c9c8"

# 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/team/${team_id}/members" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"