VMware Cloud Community
filosmith
Enthusiast
Enthusiast

Programmatically move workflow to folder

I'm having trouble finding a way to programmatically move a workflow to a different folder, looking through the API explorer and the canned Library workflows. Can anyone point me in a direction?

Thanks

Tags (2)
0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee

AFAIK, there is no direct scripting API to do this.

You can try to do it using vRO HTTP-REST plug-in, combining vRO REST API calls to export the workflow, delete it, and then import the exported workflow into the target folder/category.

filosmith
Enthusiast
Enthusiast

That looks like it will work. Thanks!

0 Kudos
filosmith
Enthusiast
Enthusiast

I think I need a little help with this. I'm able to GET the workflow as a string of type application/zip, but then when I FileWriter it to a file, it comes out a different size each time and appears to just be a header and footer, with nothing in between.

0 Kudos