vt6711
Contributor
Contributor

how import .workflow to VRealize Orchestrator 8.1

Hello good night, I'm new in the world of VRealize Orchestrator, I will need import files type .workflow that I can download of this page, I have Version 8.1 it is possible? and how could i do it? and sorry for my bad English

0 Kudos
16 Replies
iiliev
VMware Employee
VMware Employee

Hi,

Import/export units in vRO 8.1 UI client are the packages. Importing of individual workflows/resources/configurations/etc. is not supported at this time.

0 Kudos
vt6711
Contributor
Contributor

Hello Ilian, thank you very much for your answer... then if I have a .workflow, I cant in any way to import a my Orchestrator? or can I to do a packet with this .workflow and import to Orchetrator?

Best Regards

0 Kudos
stdrv
VMware Employee
VMware Employee

Hi,

This can be done only by using the REST api.

First you need to get the id of the category you want to import the workflow in by using the GET method of /vco/api/categories .

Then to import the .workflow file you will have to use the POST method of /vco/api/workflows .

You will need to provide the categoryId as a query parameter. ex: https://<orchestrator-fqdn>/vco/api/workflows?categoryId=8af885e971c499d70171c68d13ce0082

and provide the .workflow file as a form-data parameter with a key "file"

0 Kudos
jacobpeek
Contributor
Contributor

I am looking for additional info on the import function, I have tried to automate this through vro and have the export working using base64encode/decoding but I have yet to get the import API to function properly.  I am returning a 405 and 406 error, The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.

 

 

0 Kudos
jacobpeek
Contributor
Contributor

If possible was this ever working using Postman? If so do you have an example ?  Thank you!

0 Kudos
jacobpeek
Contributor
Contributor

Hmm that doesn't seem accurate there is an API call for importing workflows requiring category ID, this is what I am exploring and attempting to get to work. 

Please look at 

/vco/api/workflows?categoryId=xxxxxxxxxxxxxxxx
0 Kudos
eoinbyrne
Expert
Expert

If you have a ".workflow" file you can use a ZIP tool (e.g., 7-zip) to expand the contents like this

eoinbyrne_0-1621606365559.png

 

The file "workflow-content" is XML but you can read the workflow script / items within it. Also, the header elements will show the parameters, attributes etc

eoinbyrne_1-1621606441742.png

 

Worst case, by doing this you should be able to manually re-construct the workflow in your 8.1 instance (create new workflow, build out the items and copy in the script elements)

 

Not the most elegant but will work if you only have one workflow. If you have many then this could get pretty tedious

 

-HTH

0 Kudos
xian_
Expert
Expert

Or you can connect to 8.1 with a legacy 7.6 java client and import your workflows with it.

0 Kudos
Compono
Contributor
Contributor

Does that still work in 8.3?  I've tried it, with no luck.

0 Kudos
xian_
Expert
Expert

If you mean the legacy client, yes: I used it with 8.1, 8.2, 8.3 and 8.4

0 Kudos
Rick_Boyer
Contributor
Contributor

What port do you use when connecting to a version 8.x vROps instance with the legacy java client?

0 Kudos
xian_
Expert
Expert

It's vRO, not vROps,

the port I used was 443 with a vRA embedded vRO. Have not tried with standalone vRO.

0 Kudos
Rick_Boyer
Contributor
Contributor

Yeah, I meant vRO, and my instance is standalone and it doesn't work. 

0 Kudos
xian_
Expert
Expert

Try 8281

0 Kudos
jacobpeek
Contributor
Contributor

I have been able to get the import to work using postman successfully please see the postman code extract.

 

curl --location --request POST 'https://<My-instance-name>/vco/api/content/workflows/<My-Content-ID>?overwrite=true' \
--header 'Content-Type: multipart/form-data; boundary=------------------------3f87bcf3b4060f4d' \
--header 'Authorization: Basic MyTokenStringWhichisLong' \
--form 'file=@"/Users/jpeek1/Downloads/exportWorkflow-NEW.workflow"'
0 Kudos
Rick_Boyer
Contributor
Contributor

Tried 8281, 443, 8283 and /vco and nothing works.

0 Kudos