Create a new project bound to Github using sonarcloud API

How can I create a new project that will be bound to a Github project using Sonarcloud API?

Thanks!

1 Like

Hello,

And welcome to the community!

Could you share a bit more about your use case ? What are you trying to achieve ?

Currently we don’t provide any public api endpoint to do this, so you could do a feature request on the forum so that we add this feature on a public endpoint.

Or you could eventually have a look at what private api endpoint are called when you import a project manually and use it similarly, but I can’t help with that and you should be aware that private api endpoint can change without notice at any time.

Thanks for the reply!

What I’d like to do is to automate service initialization – automate creation of a new repo, adding a project structure from a template, configuring CI, and configuring Sonarcloud for a new Github repo.

The private API endpoint that is used in Sonarcloud UI requires cookie-based authentication. So that’s another reason in addition to the one you mentioned why I’d prefer to stay away from using it.

1 Like