cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
532
Views
0
Helpful
1
Replies
kris11
Beginner

workflow export/import through REST API

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:

userAPIImportWorkflows

Description

Imports the workflow into the system.

Parameters

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 \

  --url 'https://ucsd/app/api/rest?formatType=json&opName=userAPIImportWorkflows&opData=%7Bparam0%3A%22CreateTenant_up%22%7D' \

  --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!

1 ACCEPTED SOLUTION

Accepted Solutions
Orf Gelbrich
Cisco Employee

1 REPLY 1
Orf Gelbrich
Cisco Employee

Content for Community-Ad
This widget could not be displayed.