For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/spa/get-spa-recommendations.md. A documentation index is available at /llms.txt.
Language
Datadog site

Obtenir des recommandations SPA

WARNINGNote: This endpoint is in preview and may change in the future. It is not yet recommended for production use.
GEThttps://api.datadoghq.com/api/v2/spa/recommendations/{service}https://api.us3.datadoghq.com/api/v2/spa/recommendations/{service}https://api.us5.datadoghq.com/api/v2/spa/recommendations/{service}https://api.datadoghq.eu/api/v2/spa/recommendations/{service}https://api.ap1.datadoghq.com/api/v2/spa/recommendations/{service}https://api.ap2.datadoghq.com/api/v2/spa/recommendations/{service}https://api.uk1.datadoghq.com/api/v2/spa/recommendations/{service}https://api.ddog-gov.com/api/v2/spa/recommendations/{service}https://api.us2.ddog-gov.com/api/v2/spa/recommendations/{service}

Présentation

Cet endpoint est actuellement expérimental et réservé à un usage interne Datadog uniquement. Récupérer les recommandations de ressources pour un job Spark. L'appelant (Spark Gateway ou DJM UI) fournit un nom de service et SPA renvoie des recommandations structurées pour les ressources du driver et des executors. La version avec un shard doit être préférée dans la mesure du possible, car elle fournit des résultats plus précis.

Arguments

Paramètres du chemin

Name
Type
Description
service [required]
string

The service name for a spark job.

Chaînes de requête

Name
Type
Description
bypass_cache
string

The recommendation service should not use its metrics cache.

Réponse

OK

JSON:API document containing a single Recommendation resource. Returned by SPA when the Spark Gateway requests recommendations.

Champ
Type
Description
data [required]
object

JSON:API resource object for SPA Recommendation. Includes type, optional ID, and resource attributes with structured recommendations.

Exemple de code

Obtenir des recommandations SPA
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export service="CHANGE_ME"

# 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/spa/recommendations/${service}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"