05-02-2017 08:03 AM - edited 03-01-2019 06:24 AM
I try to create a little script that exports/imports specific workflows we created in UCSD. I see two relevant REST calls: userAPIExportWorkflows and userAPIImportWorkflows. In some documentation I see that the userAPIImportWorkflows call was supported only until version 5.3. Is this true? The call seems to work on our UCSD v6.0.0.1.
Though the documentation of the API call is pretty vague, it says the following:
Imports the workflow into the system.
APIWFExport export
Should I POST the wfe file simply to the method?
How can I specify what to import from the wfe file (workflow, custom tasks, etc.)
BTW a raw POST to the API returns the following:
$ curl -k --request POST \
--header 'x-cloupia-request-key: ******' \
--data @CreateTenant_up.wfdx
{ "serviceResponse":null, "serviceError":"REMOTE_SERVICE_EXCEPTION: Expecting object found: "CreateTenant_up"", "serviceName":"InfraMgr", "opName":"userAPIImportWorkflows" }
$
CreateTenant_up.wfdx contains an export from the web GUI.
I don't really get either how to retrieve a wfdx file through the API, if I use the userAPIExportWorkflows call, I get a json response back, it doesn't look like to be in WFExport format which seems to be expected by userAPIImportWorkflows.
Many thanks for any hint!
Solved! Go to Solution.
05-02-2017 10:04 AM
05-02-2017 10:04 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide