Zum Hauptinhalt wechseln
Adaptive Planning
Zuletzt aktualisiert: 2024-10-18
ai.oauth

ai.oauth

Functions

Method
Parameters
Returns
Description
getPlanningTokenFromWorkday()
None
Return Type: Object { authorization : string }
Obtain a token for authenticating against planning.
Availability: Only available for customers who complete:
  • Pairing their Workday tenant with
    Adaptive Planning
    .
  • Workday SAML SSO into
    Adaptive Planning
    .
  • The
    Public API setup
    task in Workday within the
    Public API
    tab of the
    Adaptive Planning
    tab in Workday.
To pair your Workday tenant with Adaptive Planning and to set up SAML SSO, you must work with a Workday-certified implementer. If you don't have access to an implementer, contact your Customer Success Manager to engage professional services.
Some links in this article go to the Workday community. If you don't have a community account, request one.

Example

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; }