Unable to get name of source files in a project using web-api

I am using web-api (python) to get information of various metrics , but when I drill down to source files in a project I am unable to get the name of different source files and also the metrics to that particular file. I am a new -bie in sonar qube. Any help would be appreciated. Thanks in advance.
Example
project A - Coverage -60 % and other metrics
Files of project A - temp.py - coverage 50 % and other metrics
config.py - coverage 30% and other metrics

I am able to get info of overall project but not name of files and metrics associated with files.
Please help!

What have you tried? What hasn’t worked?

I have tried getting the component tree.

But recently I have got this /api/measures/component_tree?baseComponentKey=“Project name” . This exactly gives what I want
Thanks all!!!