ai.oauth
Fonctions
Méthode | Paramètres | Retours | Description |
|---|---|---|---|
getPlanningTokenFromWorkday() | Aucun | Type de retour : Objet { authorization : string } | Obtenez un jeton pour l'authentification dans Planning. |
Disponibilité : disponible uniquement pour les clients qui terminent :
- Associant son locataire Workday avecAdaptive Planning.
- Authentification unique de Workday SAML enAdaptive Planning.
- La tâchede configuration de l’API publiquedans Workday dans l’ongletAPI publiquedeAdaptive Planningun onglet dans Workday.
Pour associer votre locataire Workday à Adaptive Planning et définir l'authentification unique SAML, vous devez travailler avec un responsable de la mise en œuvre certifié Workday. Si vous n’avez pas accès aux services d’un responsable de la mise en œuvre, communiquez avec votre gestionnaire du succès client pour faire appel à des services professionnels.
Certains liens de cet article sont rattachés à la communauté Workday. 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; }