Skip to main content

logoCorrectSize.png

Adaptive Insights LLC.

Adaptive OAuth

The Adaptive OAuth ai.oauth namespace for the CCDS API for obtaining a token when authenticating with Workday credentials.

ai.oauth

Functions

Method Parameters Return Type Description
getPlanningTokenFromWorkday()
 

Only available for customers who complete:

  • Pairing their Workday tenant with Adaptive Insights by working with Provisioning.
  • Workday SAML SSO into Adaptive Insights.
  • The Public API setup task in Workday within the Public API tab of the Adaptive Insights tab in Workday.
  Object
{ authorization : string }
Obtain a token for authenticating against planning.

Examples

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;
  • Was this article helpful?