Create project with API and integrate to GitHub repo

We are creating repo with going to Web URL:
It integrates GitHub repo with sonarcloud and works fine.

Now we want to do this (create repo and integrate repo with GitHub) with help of API requests.
To create repo we are using WebApi api/projects/create.

How to integrate that repo with GitHub with WebAPI?

Our repositories are on Java, NodeJS, Go. And they are GitHub, private.

Thanks in advance!


Can you clarify exactly what you mean by integrate that repo with GitHub please?

I mean analyze repo with AutoScan. When creating repo from it will enable AutoScan also.

But in case of adding new project with WebAPI doesn’t starts AutoScan from GitHub repo.

So did you get this working. I’m looking at doing the same thing for new repos created in github every month.

Hi @tinomen and welcome to our Community!

Currently the supported and recommended way to create a new project is by using SonarCloud UI. We are aware of this automated scenario and maybe we will support it in the future. You can take a look into new features suggestions and add your if you want!

Looks like this undocumented API has changed. Sadly, using the UI isn’t feasible in our org. We produce 30-40 projects a month. We are investigating solutions that can be automated.