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 componentopenapi-spec
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();