search_history: Search measures history of a component

API: sonarcloud.io:sonarqube
Endpoint: /api/measures/search_history
Response format: application/json
Auth: unknown
Method: GET
Last Status: 400
Latency: 210ms

Description

Search measures history of a component. Measures are ordered chronologically. Pagination applies to the number of measures for each metric. Requires the following permission: 'Browse' on the specified component

Parameters (8)

branch (string, query, optional)

Branch key

component (string, query, required)

Component key

from (string, query, optional)

Filter measures created after the given date (inclusive). Either a date (server timezone) or datetime can be provided

metrics (string, query, required)

Comma-separated list of metric keys

p (string, query, optional, default: 1)

1-based page number

ps (string, query, optional, default: 100)

Page size. Must be greater than 0 and less or equal than 1000

pullRequest (string, query, optional)

Pull request id

to (string, query, optional)

Filter measures created before the given date (inclusive). Either a date (server timezone) or datetime can be provided

Examples (1)

Search measures history of a component openapi-spec
curl 'https://sonarcloud.io/api/measures/search_history?branch=feature%2Fmy_branch&component=my_project&from=2017-10-19+or+2017-10-19T13%3A00%3A00%2B0200&metrics=ncloc%2Ccoverage%2Cnew_violations&p=42&ps=20&pullRequest=5461&to=2017-10-19+or+2017-10-19T13%3A00%3A00%2B0200'
import requests

resp = requests.get(
    "https://sonarcloud.io/api/measures/search_history",
    params={
        'branch': 'feature/my_branch',
        'component': 'my_project',
        'from': '2017-10-19 or 2017-10-19T13:00:00+0200',
        'metrics': 'ncloc,coverage,new_violations',
        'p': '42',
        'ps': '20',
        'pullRequest': '5461',
        'to': '2017-10-19 or 2017-10-19T13:00:00+0200',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("sonarqube")
result = api.fetch("api/measures/search_history", branch="feature/my_branch", component="my_project", from="2017-10-19 or 2017-10-19T13:00:00+0200", metrics="ncloc,coverage,new_violations", p=42, ps=20, pullRequest=5461, to="2017-10-19 or 2017-10-19T13:00:00+0200")

for item in result:
    print(item)
const resp = await fetch("https://sonarcloud.io/api/measures/search_history?branch=feature%2Fmy_branch&component=my_project&from=2017-10-19+or+2017-10-19T13%3A00%3A00%2B0200&metrics=ncloc%2Ccoverage%2Cnew_violations&p=42&ps=20&pullRequest=5461&to=2017-10-19+or+2017-10-19T13%3A00%3A00%2B0200");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 02:56:01.226849 400 210ms
2026-04-15 02:32:50.985876 400 163ms
2026-04-14 00:16:42.932866 400 226ms
2026-04-12 15:51:28.883794 400 129ms
2026-04-10 04:08:55.141632 400 95ms
2026-04-09 01:37:34.463173 400 159ms