The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

getting error in fetching group details using rest api for bitbucket

Rakesh Verma
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!
February 8, 2024

getting error in fetching group details using rest api for bitbucket

API Endpoint - https://bitbucketUrl/rest/api/1.0/admin/groups/{group-name}

 Invoke-RestMethod : The remote server returned an error: (404) Not Found.

 

 

fetched group-name from another end point which gives list of groups(using below end point), this works fine

https://bitbucketUrl/rest/api/1.0/admin/groups

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2024

Hi Rakesh,

The URL for this particular endpoint is as follows (replace WorkspaceID/groupname with actual value and remove the curly braces):

https://api.bitbucket.org/1.0/groups/{workspaceID}/{groupname}

I would suggest first calling just the workspaceID without the {groupname} for a full list of groups.

You'll need to take note of the "slug" value, as this is the value that would be used for the {groupname} mentioned above, this value is case sensitive and will result in a 404 if it is not requested in lowercase and spelled exactly how the slug value is written.

I've tested this against my own workspace and it has worked without issues, for example one of the "slug" values is non-admin - if I write "Non-Admin" in the API request, I get a 404 error but if I put non-admin it works without issues as it matches the slug value.

Hope this helps, please let me know if any issues.

Cheers!

- Ben (Bitbucket Cloud Support)

 

TAGS
AUG Leaders

Atlassian Community Events