UCSD Call a Workflow via API

Version 10

    This is an example on how to call a workflow via an API call.


    The workflow has two inputs A1 and A2:


    Screen Shot 2014-12-09 at 3.14.54 PM.png


    Screen Shot 2014-12-09 at 3.13.21 PM.png


    The workflow:


    Screen Shot 2014-12-09 at 3.13.11 PM.png


    The API call:




    Screen Shot 2014-12-09 at 2.50.16 PM.png


    Curl Example (Thank you Sangeeta Narang):



    curl  -v -X POST -H 'X-Cloupia-Request-Key:5CF4C115F0034B189616B2B8EBA0F220'  -g '{param0:"TestWorkFlowFromAPI",param1:{"list":[{"name":"A1","value":"Hello"},{"name":"A2","value":"World"}]},param2:-1}'



    curl --insecure -v -X POST -H 'X-Cloupia-Request-Key:5CF4C115F0034B189616B2B8EBA0Fxxx'  -g '{param0:"TestWorkFlowFromAPI",param1:{"list":[{"name":"A1","value":"Hello"},{"name":"A2","value":"World"}]},param2:-1}'



    For testing purpose use above command in insecure mode, otherwise install cacert in your system and use cert location in curl call using —cacert curl option.

    In case there is a space in the Variable name:


    curl --insecure -v -X POST -H 'X-Cloupia-Request-Key:C97B881CE6B94DFB930765F7AC408xxx'  -g '{param0:"AddUCSMvlanv1",param1:{"list":[{"name":"VLAN%20ID","value":"500"},{"name":"VLAN%20DESC","value":"CURLvlantest"}]},param2:-1}'

    Roll back example:


    curl --insecure -v -X POST -H 'X-Cloupia-Request-Key:C97B881CE6B94DFB930765F7AC408xxx' -g '{param0:140}'


    The execution in the log file:


    Screen Shot 2014-12-09 at 3.11.23 PM.png


    The resulting e-mail with the transferred input values:


    Screen Shot 2014-12-09 at 3.11.36 PM.png


    In this example I am logged on as admin and am using the same session to make the API call.  This way I already have the cookie.



    Obtaining the REST API Key






    1. {

    2.     "serviceResult": "CAB614BF89194336A4147FB8DDEF5638",

    3.     "serviceError": null,

    4.     "serviceName": "InfraMgr",

    5.     "opName": "userAPIGetRESTAccessKey"

    6. }