lib/OktaAPI.js
function OktaAPI(apiToken, domain, preview) {
    if(apiToken == undefined || domain == undefined) {
        throw new Error("OktaAPI requires an API token and a domain");
    }
    this.domain = domain;
    if(preview == undefined) this.preview = false;
    else this.preview = preview;
    this.request = new NetworkAbstraction(apiToken, domain, preview);
    this.users = new OktaAPIUsers(apiToken, domain, preview);
    this.groups = new OktaAPIGroups(apiToken, domain, preview);
    this.sessions = new OktaAPISessions(apiToken, domain, preview);
    this.apps = new OktaAPIApps(apiToken, domain, preview);
    this.events = new OktaAPIEvents(apiToken, domain, preview);
}
function OktaAPI(apiToken, domain, preview) {
    if(apiToken == undefined || domain == undefined) {
        throw new Error("OktaAPI requires an API token and a domain");
    }
    this.domain = domain;
    if(preview == undefined) this.preview = false;
    else this.preview = preview;
    this.request = new NetworkAbstraction(apiToken, domain, preview);
    this.users = new OktaAPIUsers(apiToken, domain, preview);
    this.groups = new OktaAPIGroups(apiToken, domain, preview);
    this.sessions = new OktaAPISessions(apiToken, domain, preview);
    this.apps = new OktaAPIApps(apiToken, domain, preview);
    this.events = new OktaAPIEvents(apiToken, domain, preview);
}
Instantiate a new Okta API session with the given API token
@param apiToken
@param domain
@param preview
@constructor