Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Code Insights REST API for configuring the requirements

There is the Code Insights functionality provided by BitBucket Server and we are using this together with SonarQube integration to provide feedback from the CI pipeline and have a quality gate as the screenshot below shows:

Screenshot 2021-02-04 at 13.43.51.png

Now, this is configurable via the UI, but as we are managing a large number of repositories/project, we'd like to keep this configuration in the code and manage it via the API.

However, looking at the REST API for Code Insights and for Repository Management, it seems that BitBucket does not expose a way to manage the Code Insights Requirements settings via API.

Is that possible or would it make sense to add this to the roadmap?


3 answers

1 accepted

0 votes
Answer accepted
Adam I'm New Here Jun 16, 2022

I couldn't find any documentation on this either, but the web interface is using the REST API as well.

From the browsers dev console the API endpoint for repositories seems to be:

PUT/GET/DELETE calls are supported. For PUT the following json payload can be used

"mustPass":true, // true/false
"minProhibitedSeverity":"LOW" // LOW/MEDIUM/HIGH or omit this key

For project-wide configuration:

DevConsole always to the rescue! Simplest solution always works, thanks for this!

0 votes

Just to bump the visibility - any hints?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,473 views 3 10
Read article

Atlassian Community Events