Dashboard metrics
The REST API web service allows external tools to retrieve the measures for a given target. Use the service to exploit the measures recorded during the code review campaigns in other tools, typically for dashboard purposes.
For more information about measures, refer to Measures.
For more information about the use of measure data in ARCAD Dashboard, refer to the ARCAD Dashboard documentation.
The web service URL is /measures/{targetId}
. The web service gives the result in JSON format.
- Attribute
- targetId: the ID of the target for which measures will be retrieved.
- Parameters
-
groupby: define how the measures should be regrouped in the resulting JSON. Possible values are:
-
source: The answer is an array of JSON elements, where values are regrouped by source member. Each element contains a sub-array of measures regrouped by metric.
-
metric: The answer is an array of JSON elements, where values are regrouped by metric. Each element contains a sub-array of measures regrouped by source member.
-
raw: this is the default value when groupby is not specified. The JSON is a simple array where each element is a measure. No grouping is done.
-
last: only the measures from last campaign executed for the target are returned.
-
Here are some examples of web service calls:
To get all the measures for the Target #1, grouped by metric
http://codechecker-server:5253/measures/1?groupby=metric
To get all the measures for the Target #8, grouped by source
http://codechecker-server:5253/measures/8?groupby=source
To get the latest measures for the Target #1, grouped by source
http://codechecker-server:5253/measures/1?groupby=source&last
The web service below can be called to retrieve information about items related to the measures:
To get the information about the Campaign #{id}
http://codechecker-server:5253/data/campaign/ {id}