/api/projects/export_findings endpoint not working

I have a sonarqube server running on Kubernetes through the official helm chart (using sonarqube-10.4.1+2389), I am trying to get the list of findings for a specific project through the http://127.0.1:9000/api/projects/export_findings endpoint by running the following command :
curl -X GET -u admin:password http://127.0.0.1:9000/api/projects/export_findings but it gave me {"errors":[{"msg":"Unknown url : /api/projects/export_findings"}]}. I did add to it the -d '{"project": "test1"}' payload but didn’t work still and I tried to replace the link with http://127.0.0.1:9000/api/projects/search?project=test1 inspiring from this thread but to no avail. What is probably going on wrong ? I checked this documentation and it says that the support for that API starts since 9.1 whereas my server version as mentioned in the beginning is 10.4.1. Anyone could help ?

Hey there.

This feature is only available in Enterprise Edition – what edition are you using?

I am using the community edition, is there another way to extract these reports ? I am aiming to extract scan reports using a python script, specifically I want to get code smells given a list projects’ names, sonarqube URL, sonarqube auth creds, … is there an API endpoint that extracts that for community edition sonarqube ?

You may find this guide useful.

1 Like

@Colin Thank you for getting back to me ! I discovered that SonarQube client with Python offers the search_issues submodule that can do the job. The problem is that the returned attributes (rules, severity, line, effort, debt, tags, type, scope, cleanCodeAttribute, quickFixAvailable, cleanCodeAttributeCategory, and a handful of other ones) miss their respective explanation in the documentation, even though some of them seem trivial to understand. Is this the right platform to inquire about the meaning of the latter attributes ?