show: Returns a component (file, directory, project) and its ancestors

API: sonarcloud.io:sonarqube
Endpoint: /api/components/show
Response format: application/json
Auth: unknown
Method: GET
Last Status: 400
Latency: 182ms

Description

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 ancestors openapi-spec
curl 'https://sonarcloud.io/api/components/show?branch=feature%2Fmy_branch&component=my_project&pullRequest=5461'
import requests

resp = requests.get(
    "https://sonarcloud.io/api/components/show",
    params={
        'branch': 'feature/my_branch',
        'component': 'my_project',
        'pullRequest': '5461',
    },
)
data = resp.json()
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();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 01:18:49.837792 400 182ms
2026-04-15 04:02:55.820910 400 148ms
2026-04-14 03:41:48.068503 400 134ms
2026-04-12 13:08:25.632678 400 119ms
2026-04-10 01:23:54.836826 400 277ms
2026-04-09 00:06:52.398643 400 135ms