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.

Reference

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.

Example

Here are some examples of web service calls:

Copy

To get all the measures for the Target #1, grouped by metric

http://codechecker-server:5253/measures/1?groupby=metric
Copy

To get all the measures for the Target #8, grouped by source

http://codechecker-server:5253/measures/8?groupby=source
Copy

To get the latest measures for the Target #1, grouped by source

http://codechecker-server:5253/measures/1?groupby=source&last
Copy

To get the latest measures for the Target #2

http://codechecker-server:5253/measures/2?last