I have a project with an assigned workflow. The status follows the rules, but when I query the workflow scheme by API it returns empty: no workflow even when the workflow scheme is assigned.
But when I query the possible transitions of an item via API, it returns the proper expected transitions as in the workflow.
Should I always then ask for transtions for an item instead of trying to query the workflowscheme? when to query workflow or workflowscheme?
Thanks in advance
Hello @Mario Aguero
Welcome to the Atlassian community.
What problem are you trying to solve with those API calls?
What is the actual API endpoint you are using and the payload you are providing?
first, the user I am using is an admin
then, when I try to get workflowscheme here:
/rest/api/3/workflowscheme/project?projectId=10129
I get empty list of workflow schemes, even when there's one workflow scheme enabled for the project and issue type.
but when I query the endpoind of transitions for an issue
/rest/api/3/issue/{issueIdOrKey}/transitions
I get the proper transitions defined by the workflow associated.
So, why if the workflow scheme is linked and enabled for the project, I can't find it in the first all, but I get the transitions defined on it in the other?
how to validate and do transitions via API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that additional information.
From what you provided I deduced that you are using the API endpoint documented here:
I note in the API document it says the following:
If the project is associated with the
Default Workflow Scheme
no ID is returned.
Is the project for which you are trying to get data using the Default Workflow Scheme?
What is the actual output that you get? Have you tried the same endpoint call directly in a browser tab?
Are you sure that you have provided a valid project ID?
If I provide a project ID that doesn't match to a project I get output like this:
If I provide a valid project ID then the output looks like this:
I am accessing an instance on a Free subscription where I am the Organization Admin and the Product Admin, and as such I am a defacto Project Admin in every project.
You said you are running the API under an admin identity. What level of administrator access does that identity have?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.