Use the cui.js object

Once you have a cui.js object, you can make API calls. A comprehensive list of Idm, Iot, and Admin API calls is available, but here is a basic example of a countOrganizations() call, which takes no parameters and returns a text response.

👍 All cui.js functions return Promises.

Here is some useful information about how to use them in your App.

 // Use your globally-scoped object to make an API call...
 myCuiJs.countOrganizations().then(function(response) {
    // ...do something with response.
    var count = response;
 }).fail(function(err) {
    // ...handle error.
    var errStr = myCuiJs.parseError(err);
 });

This usage example is a recurrent pattern. Most App code that uses cui.js will be expressed accordingly.