2 Replies Latest reply on Oct 2, 2018 9:10 AM by jmedd

    vRO REST API: querying workflows by categoryID

    jmedd Enthusiast

      In PowervRO we have a function Get-vROWorkflow which uses the vRO REST API to query workflows:


      PowervRO/Get-vROWorkflow.ps1 at master · jakkulabs/PowervRO · GitHub


      One of the options is to query by categoryName using the following URL:




      We have a request to enhance this function to instead be able to query by categoryID. I tried the following, but it did not work and also could not find any documentation on how to discover what other 'conditions' are available:




      Is it possible to query the workflows API using a categoryId as a condition? If so, how should it be formed?

        • 1. Re: vRO REST API: querying workflows by categoryID
          iiliev Champion
          Community WarriorsVMware Employees

          Hi Jonathan,


          Workflow's properties that could be used in this conditional filtering are id, name, description, categoryName and version. So currently it is not possible to use categoryId in a condition, unless we add some code to do so on vRO server side (feel free to open a PR about it).


          There is a workaround, though. You can get the same result in two steps:


          1) Make a GET request to fetch the category with the given categoryId. It could be something like:

          GET /vco/api/catalog/System/WorkflowCategory?conditions=id=ff80808165ed93fd0165ed955493000f


          The returned response content should contain a href to the category object. Look for a link element that looks similar to:

          <link href="" rel="down">


          2) Using the value of this href element, append workflows at its end (that's the name of the relation from the category to its child workflows). The URL should look like:



          Now, if you make GET request with this URL, you'll get the list of workflows that are within this category.


          Hope the above makes sense.

          • 2. Re: vRO REST API: querying workflows by categoryID
            jmedd Enthusiast

            Excellent, that works great - thanks a lot!