Passer au contenu principal
Adaptive Planning
Dernière mise à jour : 2024-10-18
ai.oauth

ai.oauth

Fonctions

Méthode
Paramètres
Retours
Description
getPlanningTokenFromWorkday()
Aucune
Type de renvoi : Objet { authorization : string }
Obtenez un jeton pour l'authentification à partir de Planning.
Disponibilité : uniquement disponible pour les clients dans les champs suivants :
  • Associant son environnement client Workday à
    Adaptive Planning
    .
  • L'authentification unique SAML Workday dans
    Adaptive Planning
    .
  • La tâche
    de configuration de l'API publique
    dans Workday dans l'onglet
    API publique
    de l'
    Adaptive Planning
    onglet dans Workday.
Pour associer votre environnement client Workday à Adaptive Planning et configurer l'authentification unique SAML, vous devez travailler avec un chargé d'implémentation disposant de la certification Workday. Si vous n'avez pas accès à un chargé d'implémentation, contactez votre Customer Success Manager pour engager des services professionnels.
Certains liens figurant dans cet article redirigent vers Workday Community. Si vous n'avez pas de compte Community, demandez-en un.

Exemple

function testConnection(context) { var token = ai.oauth.getPlanningTokenFromWorkday(); var body = '<?xml version="1.0" encoding="UTF-8"?><call method="customReportValues" callerName="AdaptivePlanning.Discovery">' body += '<credentials token="' + token.authorization + '" instanceCode="MYINSTANCE" /><report>...</report> </call>'; var url = 'https://api.adaptiveplanning.com/api/v22'; var method = 'POST'; var headers = { 'Content-Type': 'application/xml' }; var response = null; try { response = ai.https.request(url, method, body, headers); } catch (exception) { ai.log.logInfo('api call failed', '' + exception); return false; } ai.log.logInfo("Response:",response.getBody()); return true; }