Question: How to download all all issues via API call

Must-share information (formatted with Markdown):

  • which versions are you using: Enterprise Edition * Version 8.6.1 (build 40680)
  • what are you trying to achieve: download issues via API call
  • what have you tried so far to achieve this: review API page

Hello @Hockjia and welcome to the community :wave:

have you had a look at the API endpoint api/issues/search? you would have to use pagination depending on how many issues you have based on your query but this would be the call you are looking for.

curl -u "admin:your_password" "http://localhost:9000/api/issues/search?s=FILE_LINE&resolved=false&ps=100&facets=owaspTop10%2CsansTop25%2Cseverities%2CsonarsourceSecurity%2Ctypes&additionalFields=_all&timeZone=Europe%2FBerlin&p=1"

hope that helps :slight_smile:

Great! Thanks for quick response. Will try!

Hi Tobias,
I successfully run below command form browser, bur failed from Excel using HTTP basic authentication. with error status 401


Any ideas to call the API from Excel VBA?

Hi @Hockjia ,

sorry i am no vba expert :confused: did you check what you are sending to sonarqube? it might be more convenient to use basic auth with an authentication token as described here, so

username: “YOUR TOKEN”
password: “”


not an Excel expert at all - i hate it :wink: , if i remember correctly some colleague tried to export Sonarqube issues via Excel sheet and data / select from web, but gave up because of authentication issues. If there’s a way via Excel it should be possible with api also, when authentication seems to be the tricky part.
The stackoverflow posting he has relied on