Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Different result while fetching status metadata from /status and /project/{id}/statuses

priyank patel November 18, 2018

Hello,

 

I'm trying to find list of available values for status field and I found that there are two different APIs and both are returning different result.

 

https://priyankopshub.atlassian.net/rest/api/2/project/INC/statuses - return values

https://priyankopshub.atlassian.net/rest/api/2/status - return empty list

 

Can you please let us know why #2 API is returning empty list? Why these two APIs are returning different result? From where I can access global status configuration values?

 

Regards,

OpsHub Inc

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 21, 2018

These endpoints are expected to potentially have different results.   While GET /rest/api/2/status is expected to return all the statuses associated with workflows, there is a note about permissions needed for this endpoint:

Permissions required: Browse projects project permission. Users with permission to access Jira can call this method, but an empty list is returned.

So I believe your account that is making this REST API call likely does not have the global browse projects permission, that would explain the behavior you are seeing.

 

Meanwhile the endpoint GET /rest/api/2/project/{projectIdOrKey}/statuses

Returns the valid statuses for a project. The statuses are grouped by issue type, as each project has a set of valid issue types and each issue type has a set of valid statuses.

I hope this helps to explain this discrepancy.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events