Requesting comment permissions via REST API

Dieter Guthmann June 4, 2019

Hello,

how can I retrieve the comment permissions via REST-API from JIRA.

https://jira.gmc-instruments.com/rest/api/2/issue/{IssueKey}
doesn't contain this information.

Rgds

Dieter

 

2 answers

0 votes
Rambabu Patina _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2019

Hi @Dieter Guthmann ,

To retrieve the comment permission for the specific scheme you can make use of the REST API: Jira REST api getPermissionSchemeGrant.

The list of comment related permissions are 

Add Comments
Delete All Comments
Delete Own Comments
Edit All Comments
Edit Own Comments

Based on your requirement pass the permission id to the REST endpoint.

For example: rest/api/2/permissionscheme/0/permission/10007

Hope this helps you.

Thanks,
Ram.

Bridy Frett June 2, 2021

Hi Rambabu,

I don't think this answers the question.  For each individual comment, the comment permissions can be set to All Users, Administrators, Developers, etc.  This allows us to restrict who can see each comment by their role in the project.  In some cases, we want to leave comments for other developers on the team which we don't necessary want/need the reporters (who doesn't have the 'developer' role) to be able to see. 

When pulling comments from the API, I may only want to report on all "All Users" comments and keep the "developer only" comments hidden.

The permissions scheme determines who can create/edit/delete comments in general.  The request is per issue and per comment.

Is there a way to do this?

comment permissions.png

Thanks!

Bridy

Like Dieter Guthmann likes this
0 votes
Fazila Ashraf
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2019

@Dieter Guthmann  ,

 

/rest/api/2/mypermissions?issueKey=<IssueKey> should get you this information.

 

Refer to  https://docs.atlassian.com/software/jira/docs/api/REST/8.2.1/#api/2-getPermissions 

Dieter Guthmann June 4, 2019

Thank you for your answer - I was a little imprecise with my question:

I mean comments with indiviudal set permissions:

grafik.png

If you press here the 'lock'-Icon you can restrict that this comment is only viewable by a specific role or group. How can I retrive the information via REST if a comment is restricted...?

Suggest an answer

Log in or Sign up to answer