Forums

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

How to write a JIRA Query URL for getting Group Names and Group Members

Ravi Chand August 2, 2018

I would like to get group Names and group members through API.

Like below

https://www.example.com/rest/api/2/search?jql= project in(ABCD) AND issuetype in(XYZ) &fields=issue,summary,worklog&startAt=00000&maxResults=1000

 

Thanks

Chandra.

 

1 answer

1 accepted

0 votes
Answer accepted
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2018

Hi Ravi,

 

To get group names you can use the example below:

https://yourinstance.atlassian.net/rest/api/2/groups/picker

 

And to get group members, this example:

https://yourinstance.atlassian.net/rest/api/2/group/member?groupname=group-name

 

You can find more information on the link below:

https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-group-get

 

Hope this helps!

Regards,
Angélica

Ravi Chand August 7, 2018

Hi Angelica,

Many Thanks for your reply.

Please help me on below things.

1. The below picker service is giving only 20 result actually the total is 172.

https://yourinstance.atlassian.net/rest/api/2/groups/picker

2. When i'm trying to access below url i'm getting unauthorised.

https://yourinstance.atlassian.net/rest/api/2/group/member?groupname=group-name

is there any other way to get group memebers.

 

Thank You

Ravichand

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 8, 2018

Hi Ravi,

You can add the parameter maxResults and add how many results you want to see:

https://yourinstance.atlassian.net/rest/api/2/groups/picker?maxResults=172

I tested the second URL and it's working, at the end of the URL you must add the name of the group, for example, site-admins, administrators, jira-servicedesk-users:

https://yourinstance.atlassian.net/rest/api/2/group/member?groupname=site-admins

Regards,
Angélica

Ravi Chand August 8, 2018

Many Thanks Angélica.

 

Regards

Ravichand

Abdulbaki Furkan Tanrıverdi[Appfire]
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 7, 2023

Hi @Angélica Luz ,

I have a group with name group & asd. When I invoke the below endpoint:

rest/api/3/group/bulk?maxResults=100&groupName=confluence-guests-tanriverdi&groupName=group%20%26%20asd&groupName=confluence-admins-tanriverdi&groupName=administrators

I get an unauthorized error. I encode the URI before sending it. How can I get that group by name?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events