Showing results for 
Search instead for 
Did you mean: 

UCS Director Cloupia Script Methods?


Can someone point me to better documentation that describes what the default included methods and variables are in the following Cloupia script objects:







I see that same javadocs zipfile is included in the SDK for both OA and CS but I seem to be bumping into walls just trying to get stuff to work.  I can find a ton of references to importpackages where the class listed as 'model' but it will not get past the importpackages area if I don't change 'model' to 'service'.

3 Replies 3

Geevarghese Cheria
Cisco Employee
Cisco Employee

Hi Jeremy,

The Cloupia script is a combination of JavaScript and Cloupia libraries, which you can execute from within
the Cloupia server platform. You can access subset of Cloupia Java APIs and objects from the script. The
Cloupia script supports all JavaScript syntax. However, browser-based objects are not supported because the
Cloupia script contains a server-side scripting.

Three predefined top-level implicit variables or objects are in any Cloupia script:
• ctxt—This variable or object points to the Cloupia Workflow Execution context. Using this object, the
script can access information about the current workflow, task, input, output and can access the Cloupia
APIs. Using the Cloupia APIs, you can invoke the create, read, update, and delete (CRUD) operations,
workflow tasks, and expose other REST APIs. The ctxt object maps to the platform API:

• logger—This variable or object points to the Cloupia workflow logger object. All scripts must add
reasonable amount of logging statements, which will be logged into the Service Request log. The logger
implicit object maps to the platform API:

• util—Few built-in utility concepts can be accessed using this variable or object. The util implicit object
maps to the platform API: com.cloupia.lib.util.managedreports.APIFunctions.

Reference -

Thanks and Regards,


Gotcha.  In further examples it seems like more is available but not readily documented:


Cisco UCS Director Cloupia Script Configuration Guide, Release 4.1  - Cloupia Script Samples [Cisco UCS Director] - Cisc…

The above URL has a section for "Sending Emails from the Cloupia Script".  You can see it is calling importPackage yet there is no indication in the javadocs that these are available to be imported.  I have tried importPackage for a few other items listed in the javadocs yet it either ignores the lines or errors out.  Is there more documentation elsewhere about what is allowed to be imported into cloupiascript for use?

Have you found any good ways to dig deeper into Cloupia?  I am starting out myself and am finding the documentation lacking as well.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers
If you were to look for a new job this year, would you look to only work remotely?
Are you using ChatGPT or Bard for work?