Returns a component (file, directory, project) and its ancestors. The ancestors are ordered from the parent to the root project. Requires the following permission: 'Browse' on the project of the specified component.
Parameters (3)
branch(string, query, optional)
Branch key
component(string, query, required)
Component key
pullRequest(string, query, optional)
Pull request id
Examples (1)
Returns a component (file, directory, project) and its ancestorsopenapi-spec
import zingu_apis
api = zingu_apis.api("sonarqube")
result = api.fetch("api/components/show", branch="feature/my_branch", component="my_project", pullRequest=5461)
for item in result:
print(item)
const resp = await fetch("https://sonarcloud.io/api/components/show?branch=feature%2Fmy_branch&component=my_project&pullRequest=5461");
const data = await resp.json();