WEBAPI GET api/components/search doesn't return file information anymore

  • versions used :
    Version 8.9 (build 43852)

  • error observed :
    With LTS version 7, I used webapi to retreive file information. With api/components/search I retreived the file key and I used it for other queries.
    Since new LTS version this api does not return file information. It returns only application and project information.

  • steps to reproduce
    http://sonar_url/api/components/search?qualifiers=TRK&q=file_name.sql it returns nothing even with a valid file name.
    http://sonar_url/api/components/search?qualifiers=TRK This query returns only projects

  • potential workaround
    No workaournd

WebApi documentation says this endpoint should return file informaiton:

Is there a new API to return file information (I looked for it but I did not find it) ?


I found that in WEBAPI documentation:

But how to use the endpoint issues/search that requires a component_key to list issues of a file?

move it in Help section i/o report bug.

@dmeneses gave the answer. Need to use api/components/tree.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.