Commit Info (dev-status) via API give "You do not have permission"

garrettn February 9, 2021

Hi Everyone,

I'm trying to get commit info for issue using this API call:

https://(jira-instance)/rest/dev-status/latest/issue/detail?issueId=(issueid)&applicationType=stash&dataType=repository

The response I'm receiving is:

"errorMessages": [ "You do not have permission to perform the requested action" ], "errors": {}

Other API calls work fine (i.e. https://(jira-instance)/rest/api/latest/issue/(issue#)

I'm in a corporate environment with no admin access. Does anybody know what permission needs to be set to allow the call? My admin cannot seem to be able to find it.

Thanks for any help.

-Garrett

1 answer

0 votes
Burak Kaya February 21, 2021

Hi Garrett,

Are you able to see "Development" tab in the ticket that you want to reach via Rest API? Also are not you able to see commits in https://(jira-instance)/rest/api/latest/issue/(issue#) as custom field? As I remember, issue details rest api includes that information as well.

Regards,

garrettn February 21, 2021

That is a great question.

I can see the development section of the interface and I can see the custom fields in the html that shows commit information. I can even drill in and get the commit number and see the files that have been checked in. 

What I have come to find out is that the "rest/dev-status" api is not a public api. I also found out that if i'm given full admin, then my user can make the api call successfully. I also compared a admin user (who can make the call) against my user (that cannot) with api call /rest/dev-status/latest/mypermissions and then did a diff on those but that revealed nothing. 

So at the end of the day I ended up writing a webdriver scraper. Maybe in a future public api release they will include this dev-status call. 

Burak Kaya February 22, 2021

Hope so :)

Suggest an answer

Log in or Sign up to answer