Issues

Document REST API for configuring Workzone

We have nearly 100 repos in a project that is rolling out Workzone. Stash admins like myself are being asked to make policy changes fairly often as management becomes more familiar with what we can do with Stash and Workzone. Making these changes via the web UI is painful.

Thanks a lot, it worked perfectly!
Another question, to setup the automerge, what the params that I need to pass?
I'll need to setup Destination Branch, Merger, Reviewers approval quota and Delete Source Branch.
Where can I find the documentation about the params?

there is no official REST documentation yet. Atlassian's suggested way to use a REST API browser in combination with annotations does not seem to work for Bitbucket Server.

Here is what you can do to configure Workzone automerge with curl

Create a sample configuration for a repository via the UI - log the network traffic from the browser when you save the auto-merge configuration. Copy the JSON payload and modify for other repositories.

As far as I can see there are no REST endpoints like /rest/api/1.0/projects/#{project}/repos/#{repo}/settings/pull-requests as you describe above. You may open a feature request in the Atlassian Bitbucket(Server) issue tracker to get this endpoint implemented.