WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Quick Tip - Automate the export of a vCenter Orchestrator workflow using the CLI

Quick Tip - Automate the export of a vCenter Orchestrator workflow using the CLI

08.14.2013 by William Lam // 5 Comments

Steve Jin recently wrote an article about vCenter Orchestrator REST APIs: Executing Workflow which reminded me of an interesting issue that I had faced several months back. I had just finished developing a custom workflow on a beta version of vCenter Orchestrator and of course one of the challenges with using early software is that it could be unstable. I was unable login to the vCO interface via vSphere Web Client or the vCO Client to export my workflow through the regular UI interface. I tried everything and I thought I might have lost my workflow!

I reached out to one of the vCO engineers and asked if there was an easy way to recover my workflow and it turns out there was a very simple method IF the vCO REST API endpoint is still accessible, which it was. To test this, you can either use cURL on the command-line or your favorite REST Client for your browser and perform a GET operation on the following URL (replace the URL with the URL of your vCO Server):

https://vco.primp-industries.com:8281/api/workflows

Note: The vCO REST API is only available starting with vSphere 5.1

If the command was successful, you should see a list of all the workflows in your vCO Server:

I am not aware of any filtering that can be done to narrow down the specific vCO Workflow, but if you are using a browser-based REST Client, you can just search for the name of your workflow. In the above example, I am interested in the "Change Guest OS Type" workflow and you can see its corresponding vCO Workflow ID which is highlighted.

To export and save the vCO Workflow to your local system, you just need to perform a GET operation on the vCO Workflow URL and specify "Accept:application/zip" for the request header which will allow you to save the vCO workflow.

Here is an example using cURL to export the  vCO Workflow and save to a file called ChangeGuestOS.workflow:

curl -i -k -u vcoadmin -H "Accept:application/zip" -X GET https://vco.primp-industries.com:8281/api/workflows/7D808080808080808080808080808080BC818080013141141566711a974a8fef8 -o ChangeGuestOS.workflow

More from my site

  • Extending VSAN capabilities in the vSphere Web Client using vCO
  • Changing GuestOS Type Using a Custom vCO Workflow in the vSphere Web Client
  • Automate vCenter Orchestrator Configuration Backups
  • Quickly Configuring the New vCenter Orchestrator 5.1 Appliance
  • How to Find a vCO Workflow ID

Categories // Uncategorized Tags // export, REST API, vcenter orchestrator, vCO, workflow

Comments

  1. *protectedAustin Explorer says

    08/16/2013 at 2:37 am

    Headline typo heads up. 🙂

    Reply
  2. *protectedWilliam Lam says

    08/16/2013 at 3:15 pm

    Thanks. Fixed

    Reply
  3. *protectedLuckyT says

    05/08/2014 at 1:40 pm

    Is there way to import the workflow via curl?

    Reply

Trackbacks

  1. Migrating workflows from one vCO server to another! | mwpreston.net says:
    05/26/2016 at 10:51 am

    […] already been done.  So when I set out on this small project I ended up using two main sources; This post by William Lam on VirtuallyGhetto on how to use curl to export a single vCO workflow and this forum […]

    Reply
  2. Migrating workflows from one vCO server to another! says:
    09/27/2017 at 6:14 pm

    […] already been done.  So when I set out on this small project I ended up using two main sources; This post by William Lam on VirtuallyGhetto on how to use curl to export a single vCO workflow and this forum […]

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025