API access for Control Freak settings.

Issue #157 resolved
Anthony Biasotti created an issue

I am trying to identify a way to check via API (or other programmatic method) the current Control Freak settings for each project/repo. Essentially we want to ensure that no projects/repos have overrides set.

Is there a rest endpoint we can hit for this?

Comments (3)

  1. Varun Agarwal

    We have a around 300+ projects and 5000+ repository. We also looking to enable few settings at project/repo level, however without any API access for control freak we cannot use it, is there any plan to enable API access?

  2. Julius Davies [bit-booster.com] repo owner

    We implemented API access to Control-Freak for v2020.11.17. Just add “?json=true” to any of the config urls. You can POST against those same URLs.

    It will extract “project” and “repo” from the URL, or if you prefer you can set “p” and “r” parameters directly in your JSON payload (the integer id for the repository and project, respectively).

    As for understanding what to put in the payload, I recommend experimenting with a given project (or repository)'s config settings and then putting "?json=true" on the URL to see which raw values (under the hood) are required to recreate the configuration you are trying to set. Any output you see from "?json=true" is also valid for POST.

    When doing the "override" (per section) it's important to set the "o_<key>" to true for the section you are overriding.

    Good luck! Email us any time at support@bit-booster.com if you need any help or have any questions!

  3. Julius Davies [bit-booster.com] repo owner

    p.s. If you take the global URL, you can also just add “?json=true&p=<projectId>” to see the config for a given project, and “?json=true&r=<repoId>” to see the config for a given repo.

    <projectId> and <repoId> are the auto-incrementing integers that Bitbucket uses under the hood to track repositories and projects.

  4. Log in to comment