How do I script linking a SonarCloud project to a Bitbucket Cloud repo

This is possible via the API URL ‘/api/alm_integration/provision_projects’. Example in PowerShell below for a project with GitLab integration:

Invoke-RestMethod -Uri "https://sonarcloud.io/api/alm_integration/provision_projects" `
-Method "POST" `
-Headers @{
  "Accept"="application/json"
  "Authorization"= "Basic tokeninBase64"
} `
-ContentType "application/x-www-form-urlencoded" `
-Body "installationKeys=GitLabProjectID&organization=SonarCloudOrganization"

I’ve also made it available in my PowerShell module for SonarCloud (PSSonarCloud/New-SonarCloudProjectALMIntegrated.ps1 at main · jonathanmedd/PSSonarCloud · GitHub), so you should be able to translate that easily to other languages.

Obviously take the consideration mentioned above that it is not supported.

Would be good to see it added to the supported API though since we require this functionality to automate the onboarding of projects. Doing that manually through the UI with the number of projects we have to onboard is just too painful and time consuming.