Exporting the the list of projects and related issues which i see on dashboard in power bi using API

I am using Sonarcube cloud.
On my Sonarcube dashboard i see there are some 700 projects and 2 lakh issues.
I want to extract all the projects and issues in power bi desktop for which am using relevant API endpoints.
So far i am able to extract 500 projects using the endpoint :-https://xxxxxxx.xxxxxxxx.com/api/components/search?qualifiers=TRK&p=1&ps=500.

I am trying to extract the issues using the endpoint https://xxxxxxx.xx.com/api/issues/searchcomponents=projectkey&ps=500&scopes=MAIN&onComponentOnly=true&IssueStatus=FIXED&facets=projects.

The problem starts here suppose a particular project in UI i see there are 60K issues and the project is main branch under which we have 2 branch. So how to get only those issues which are related to given projects.

When using the above endpoint and passing the parameter as given in the url am getting unexpected results, there are many records generated which are not relevant or i can find anything by which i can segregate the information and find relevant information.

Can you please suggest me how do i get the information which i see on my dashboard in sonarcubes i.e the total projects and issues.


Welcome to the community!

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.