For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/es/api/latest/csm-ownership/get-an-ownership-inference-by-owner-type.md. A documentation index is available at /llms.txt.
Language
Datadog site

Get an ownership inference by owner type

ADVERTENCIANote: This endpoint is in Preview and may be subject to change. If you have any feedback, contact Datadog support.
GEThttps://api.datadoghq.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.us3.datadoghq.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.us5.datadoghq.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.datadoghq.eu/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.ap1.datadoghq.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.ap2.datadoghq.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.uk1.datadoghq.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.ddog-gov.com/api/v2/csm/ownership/{resource_id}/{owner_type}https://api.us2.ddog-gov.com/api/v2/csm/ownership/{resource_id}/{owner_type}

Descripción general

Get the current ownership inference for a resource for a specific owner type.

This endpoint supports ETag-based caching. Pass the previously returned ETag value in the If-None-Match request header to receive a 304 Not Modified response when the inference has not changed.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
resource_id [required]
string

The identifier of the resource to retrieve the ownership inference for.

owner_type [required]
enum

The owner type of the inference to retrieve.

Allowed enum values: user, team, service, unknown

Parámetros de encabezado

Nombre
Type
Descripción
If-None-Match
string

A previously returned ETag value. When supplied and the resource has not changed, the endpoint returns 304 Not Modified.

Respuesta

OK

The response returned when retrieving a single ownership inference for an owner type.

Campo
Type
Descripción
data [required]
object

The data wrapper for a single ownership inference response.

Ejemplo de código

Get an ownership inference by owner type
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export resource_id="test-resource"
export owner_type="team"

# 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/csm/ownership/${resource_id}/${owner_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"