Note: XXX-XXX is an obfuscated project key and not the actual project key.
I use the SonarCloud API to create projects from Bitbucket at SonarCloud. This has worked very well for all previous repositories, but I get an error with a new project “XXX-XXX”:
sonarqube.utils.exceptions.ValidationError: Error in request. Possibly validation error [400]: Could not create Project, key already exists: XXX-XXX
I’m using the python API with the following command/call:
sonar.projects.create_project(
organization="HIDDEN", project="XXX-XXX", name="My cool name", visibility="private"
)
At first I thought that I have a name-clash in the private/public scope and I accidentally made my projects public (Luckily not :D). But there is also no “XXX-XXX” project globally.