メインコンテンツまでスキップ

logoCorrectSize.png

Workday Adaptive Planning Knowledge Center

ai.oauth

Describes the OAuth namespace for the CCDS API for obtaining a token when authenticating with Workday credentials.

Functions

Method Parameters Return Type Description
getPlanningTokenFromWorkday()
 

Only available for customers who complete:

  • Pairing their Workday tenant with Adaptive Planning by working with Provisioning.
  • 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.
  Object
{ authorization : string }
Obtain a token for authenticating against planning.

Examples

function testConnection(context) {
    var token = ai.oauth.getPlanningTokenFromWorkday();

    var body = '<?xml version="1.0" encoding="UTF-8"?><call method="customReportValues" callerName="AdaptiveInsights.Discovery">'
    body += '<credentials token="' + token.authorization + '" instanceCode="MYINSTANCE" /><report>...</report> </call>';

    var url = 'http://api.adaptiveinsights.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.getBody());
    return true;
}
  • この記事は役に立ちましたか?