I follow this document: https://support.atlassian.com/bitbucket-cloud/docs/group-privileges-endpoint/ and GET a group on a repository (I have full access to bitbucket API), but I have a problem when I insert group_owner to this API URL : https://api.bitbucket.org/1.0/group-privileges/{workspace_id}/{repo_slug}/{group_owner}/{group_slug}
After I GET (I use PostMan for call API), the response always I received result: 400 Bad request and Group is not owned by the workspace.
Please help me where I find group_owner and what I need to insert.
Hi @phongtd and welcome to the community.
The {group_owner} should be the Bitbucket UUID of the account/workspace that owns this group.
You can find the info the following way:
If you make a call to
https://api.bitbucket.org/1.0/group-privileges/{workspace_id}/{repo_slug}
you will get info for all groups with access to this repo. For each group in the output of the above call, you will see the following fields:
"group": { "owner": { "display_name": "some-name", "uuid": "{7914a899-371g-0968-t2w3-6317b0936b6e}",.........
The uuid above is what you need to use for {group_owner} in the call you want to make. You may also need to encode the curly brackets around the UUID, in this case { should be replaced with %7B and } should be replaced with %7D
An example URL using the UUID I gave above would be
https://api.bitbucket.org/1.0/group-privileges/my-workspace/test-repo/{7914a899-371g-0968-t2w3-6317b0936b6e}/developers
I would also suggest testing the call with curl as well.
Please feel free to let me know if this works and if you have any questions.
Kind regards,Theodora
Hi - even though I don't know the answer I suggest you also post your question in the bitbucket cloud developer forum https://community.developer.atlassian.com/c/bitbucket-development/bitbucket-cloud/13
Best, Ulrich
www.izymes.com
Hi @Ulrich Kuhnhardt _IzymesCo_ ,
Thanks for suggesting me.
Hi @Theodora Boudale
I have rechecked, it works well with your answer, and when I input lower-key in {group_slug}.
Thanks for helping me, I was able to use it.
Hi @phongtd,
Thank you for the update and you are very welcome, I'm glad to have helped!
It looks like you're new here. Sign in or register to get started.