In fact there are 5 parts in a correct SonarQube web api url. They can be seen like that domain/api/controller/action?parameters
, for example http://localhost:9000/api/components/show?componentKey=blue
.
So we have:
- domain: which is represented by
http://localhost:9000
in the example, it is the address where you can call your SonarQube server
- api: which is represented by
/api
in the example, it is the base path of all web service in SonarQube
- controller: which is represented by
/components
in the example, it represents a pool of web service concerning a given theme (issues, profiles, components, etc.)
- action: which is represented by
/show
in the example, it is a unit action that you can perform through the web service, for example: show, search, list, backup, delete, etc.
- parameters: which is represented by
?componentKey=blue
in the example, they are not always mandatory but often allow you to specify further information to get more precise results
What you have forgotten here is at means to specify an action.