Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to find all list workflows via API?

Happy  New Year to y'all!

The problem I am having is

I am trying to write some code that would allow me to import the same site or a list workflow into Office 365 .

We have 3 environments – DEV/TEST/PROD with identical structure.


We generally develop artifacts (forms and workflows) on dev, export them into our solution and then import them into TST and PROD.


I am trying to write code that would automate importing of list and site workflows.


Now the problem I am having is that you have 2 separate APIs, one to import a new workflow, and another to import on top of existing workflow. To import on top of existing workflow, I need to know it’s ID. In my experience, once you import a workflow from one environment to another, the ID changes so i cannot hard code the id in the code. Also, I do not know if my workflow is there yet or not ! 


I know, say, list url/id/title and I know the workflow title.


How can I check if the workflow with the specified name already exists and if it does, how could I find it’s id?


I tried to make a GET request to the URL https://{baseURL}/api/v1/workflows/packages (I have read this article and I thought it would be logical that you would provide an API to get all workflows), but it did not work.

Thank you! 

Labels: (1)
0 Kudos