| Table of Contents |
Get a List of Resources
| Description | Get a list of resources |
URL | /api/resources |
| Method | GET |
Security |
|
Examples
Get all the versions from project Sonar (key = org.codehaus.sonar:sonar):
Get all the versions and alerts from project Sonar (key = org.codehaus.sonar:sonar between January 1st, 2012 and August 31st, 2012):
Get global events from October 8th, 2012:
Parameters
Parameter | Values | Default Value | Description | Required |
|---|---|---|---|---|
resource | resource key/id |
| Filter on a specific resource | |
metrics | comma-separated list of metric keys/ids |
| Load measures on selected metrics. If only one metric is set, then measures are ordered by value. | |
depth | integer | 0 | Used only when resource is set. | |
scopes | comma-separated list of scopes |
| Filter on scopes: | |
qualifiers | comma-separated list of qualifiers |
| Filter on qualifiers: | |
verbose | true|false | false | Add some data to response | |
limit | integer |
| Limit the number of results. Only used if one metric, and only one, is set. | |
includetrends | true|false | false | Include trends and period variations in response: add <trend> (1 if better, else worse), <var> (1 if measure value increases) and nodes <p*> for period variations | |
includealerts | true|false | false | Include alerts data: add nodes <alert> (ERROR, WARN, OK) and <alert_text> | |
rules | true|false|list of rule ids | false | Filter on rules: setting it to true will return rules id and rule name for measure having such info (such as 'blocker_violations', 'critical_violations', ..., 'new_blocker_violations', ...) | |
rule_categories | true|false|list of category ids | false | Filter on rule ISO categories: setting it to true will return rules category id and rule category name for measure having such info (such as 'blocker_violations', 'critical_violations', ..., 'new_blocker_violations', ...) | |
rule_priorities | true|false|list of priorities | false | Filter on rule priority: setting it to true or to a list of priorities (BLOCKER,CRITICAL,MAJOR,MINOR,INFO) will return measures having such info (such as 'blocker_violations', 'critical_violations', ..., 'new_blocker_violations', ...). Since version 1.10. |

