Hello, I have been developing an Atlassian-Connect addon for Jira. (This means that I can only access the jira instance data via the rest api, as far as I know.)
Recently, I have come across a problem where I need to count the number of workflows that are active and inactive.
First, I tried to just use the GET /rest/api/2/workflow which fetches a list of all the workflows. However, the returned JSON does not specify whether the workflow is active or not.
Then I figured that if I could retrieve a list of all the workflow schemes, I could create a set of workflows from the workflows used by the workflow schemes, and subtract them from the list of all existing workflows, to get the number of inactive workflows, and from there get the number of active workflows too.
However, I cannot find any way to get the workflow schemes in a nice way. There seems to be no other REST API call that contains information about workflow scheme IDs, and there is no way to get a list of all workflow schemes. I can only retrieve workflow schemes from their respective ID, and I can only guess about what ID they have, for example I could get all IDs by guessing that there would be workflow schemes called 10100, 10101, 10102... but I don't think that it is a great solution.
So what is the good way to retrieve workflow schemes?