API returns the same value

*** which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)**
SQ 8.9.9

*** what are you trying to achieve**
we want to get list of bugs, codesmells & vulnerability as per project)

*** what have you tried so far to achieve t**his
curl -u admin:XXXXXXX -X GET ‘https://mysqserver.com/sonarqube/api/issues/search?projectKey=reactjs-demo&facets=types’ | jq -r

I have two project , even if I mentioned diff project key in my api query it still prints the same value, can you help me how to filter it out project specific,

I tried to remove ps from as well but no luck
curl -u admin:XXXXXXX -X GET ‘https://mysqserver.com/sonarqube/api/issues/search?ps=1&projectKey=reactjs-demo&facets=types’ ,

one project has 3 bugs and other has 34 bugs but it always prints 34 bugs for both project with above query , can you guide what I am doing wrong here



Have you tried this via the UI? The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.

You may also find this guide helpful.


1 Like