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