By my reading of the documentation here, I should be able to get a list of all of the read-only branch restrictions on BitBucket server using the following URL:
{serverUrl}/rest/branch-permissions/2.0/projects/{projectKey}/repos/{repositorySlug}/restrictions?read-only
But this gives me a list of all of the permissions, not just the read-only permissions. The list it gives me is identical to what I get from this URL:
{serverUrl}/rest/branch-permissions/2.0/projects/{projectKey}/repos/{repositorySlug}/restriction
Is this a bug, or am I doing something wrong?
Hi @Porter Bassett,
Thank you for reaching out.
To get a list of all the read-only branch restrictions, you need to provide 'type=read-only' instead of just 'read-only'.
The correct format would then be:
{serverUrl}/rest/branch-permissions/2.0/projects/{projectKey}/repos/{repositorySlug}/restrictions?type=read-only
I hope this helps.
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.