Forums

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

Get users from group REST api - Response nextPage URL missing the groupname

Daniel Toth January 28, 2022

Hi,

We are trying to use the Get users from Group REST based on the documentation to get the members of groups from our Jira Cloud.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-member-get

We got the result but the nextPage link (and also the self-link) is broken. The previously used groupName parameter is missing from the URL. It was replaced by the groupId parameter.

Thanks to that, if we try to use the nextPage link we got an error: 

"errorMessages": ["The group name can not be empty"],

We have a "workaround", we can add the groupName by hand to the URL. I'm just curious anybody else had the same problem? Or know the reason behind it?

The original REST:

https://<my.domain.atlassian.net>/rest/api/3/group/member?groupname=jira-software-users&includeInactiveUsers=false&startAt=0&maxResults=3

Result: 

{
"self": "https://<my.domain.atlassian.net>/rest/api/3/group/member?includeInactiveUsers=false&maxResults=3&groupId={some_group_id}&startAt=0",
"nextPage": "https://<my.domain.atlassian.net>/rest/api/3/group/member?includeInactiveUsers=false&maxResults=3&groupId={some_group_id}&startAt=3",
"maxResults": 3,
"startAt": 0,
"total": 18,

...

Based on the documentation, I think the result should be:

"nextPage": "https://<my.domain.atlassian.net>/rest/api/3/group/member?groupname=jira-software-users&includeInactiveUsers=false&maxResults=3&startAt=3",

 

Thanks in advance!
Daniel

1 answer

1 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
January 28, 2022

Hi @Daniel Toth 

Thanks for bringing this up, the documentation may not be update yet!!

But it works fine when you use Group Id right from starting

Here's the reference

curl --request GET \
--url "https://your-site.atlassian.net/rest/api/3/group/member?includeInactiveUsers=false&groupId=your-group-id&startAt=0&maxResults=50" \
--user 'email:token' \
--header 'Accept: application/json'

Thanks 

Daniel Toth January 28, 2022

We receive the same error in this case: "The group name can not be empty"

Maybe the links in the response were generated by the updated API, but it looks like the validation is based on the old one...

Pramodh M
Community Champion
January 28, 2022

@Daniel Toth 

If we use group id in the API, the next API URL will be generated with proper parameters, please go ahead and try

Daniel Toth January 31, 2022

Hi @Pramodh M,

Well, It didn't work on Friday with the groupId. We tested again today with my colleague and now it's fine.

I guess something was not updated properly last week.

Thanks for your help!

Daniel

Evgen Kyselgov July 6, 2023

@Pramodh M 
Request result:
{"errorMessages":["You are not authorized to perform this action. Administrator privileges are required."],"errors":{}}

Am i correctly understand, to read members of some group i have to be Administrator?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events