| Description | Get a list of metrics |
URL | /api/metrics |
| HTTP Method | GET |
| Response Formats | json | xml |
Security | None |
| Use Case | Example Request |
|---|---|
| Get all the metrics from the Sonar Nemo instance | |
| Get the metric 'Lines of Code' (id = ncloc) |
[
{
"key":"packages",
"name":"Packages",
"description":"Packages",
"domain":"Size",
"qualitative":false,
"user_managed":false,
"direction":-1,
"val_type":"INT",
"hidden":false
},
...
] |
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
id | id or key of the metric | No. Get all metrics if not set | None | ncloc |
| format | Response format can be set through:
If nothing is set, json is used. | No | None | json |