Having issue while creating a project with web api

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): i think I am using version 8, as I have just pull sonarqube docker image from docker hub.
  • what are you trying to achieve: trying to create a project with webapi and having issue, can you please give me the exact web api that i need to use? and also do i need to run that on the container or on the machine
  • what have you tried so far to achieve this: followed the project create document from API : https://sonarcloud.io/web_api/api/projects
    and also followed : Create project with WebAPI

But go confused, so I want to run the docker image of sonarqube on my machine and then once the sonar container up, that should be reachable from my localhost:9000 and then I want to create a project using web-api. but not also sure that this project creating web api where I should call from?

I am using the following command :
curl -s -u admin:admin ‘https://localhost:9000/web_api/api/projects/create?project=ourgitlab&organization=some-org&name=sonar-project

but it not giving me any output, please need help

snip out /web_api/ from your URL as well as the organization parameter (only relevant for SonarCloud). You’ll also want to make sure you’re issuing a POST command.

You’ve also passed -s to your command which makes it run silently, probably why you aren’t getting any output. :wink:

curl -X POST -u admin:admin ‘https://localhost:9000/api/projects/create?project=ourgitlab&name=sonar-project’

Documentation for the Web API of your specific version of SonarQube is always linked in the footer of your instance.

thanks