Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Requesting comment permissions via REST API

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
Fazila Ashraf Community Leader Jun 04, 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 

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...?

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.

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you