API search and bulk_delete parameter analyzedBefore is null

api/projects/search request has a analyzedBefore parameter

some projects on our SonarQube instance have no “lastAnalysisDate”

How I could search for/filter those projects with the search/bulk_delete endpoint? I’ve tried null|NULL|’’ but nothing worked. If not possible, could you provide this feature?


To clarify, what you want to do is to delete all projects which have never been analyzed, right?



Hi Jakob,

If you want to delete project that has never been analyzed, there’s a “Only Provisioned” checkbox available in the “Administration” -> “Projects” -> “Management” page.
You can also use the WS api/projects/search with parameter onProvisionedOnly set to true.

Julien Lancelot

No, sry I’ve tried this already. I’ve projects which are not provisioned and have no analysis. May analysis were delete by garbage collection (removal of old analysis) in Sonar? Normally we don’t provision projects manually and they are created from CI jobs on demand.

In fact the onProvisionedOnly parameter should also detect projects that have no more analysis.
If no project are returned when using it, it means that there’s at least one analysis on the project.

But in fact it dosen’t. My only provisioned list is empty. My project list contains projects with no last analysis. Same results in API.