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
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.