How to use GET api/components/tree

Dear Sonarsource team,

Could you please help us providing more clarification as to what does the following API expects:

Under the parameters for api/components/tree, it says:
“component required”
“Base component key. The search is based on this component.”

There is NO further documentation on what values can be used for “component”, so I tried “component=organization”. Unfortunately I get back

$ curl ‘’
{“errors”:[{“msg”:“Insufficient privileges”}]}

Could you please provide an example on what does this parameter expects? or if we are supposed to acquire additional privileges (and which)

I am calling the API while logged into my account as an owner of the ONAP organization.


Hey there.

The component parameter is basically looking for the project key. You will also need to provide the organization parameter.

For example for this project, this would be the API call: