...
Get all the violations from project Sonar (key = org.codehaus.sonar:sonar):
Code Block language none GET http://nemo.sonarsource.org/api/violations?resource=org.codehaus.sonar:sonar&depth=-1
Get all the versions blocker and alerts critical violations from project Sonar (key = org.codehaus.sonar:sonar between January 1st, 2012 and August 31st, 2012):
Code Block language none GET httpGET http://nemo.sonarsource.org/api/eventsviolations?resource=org.codehaus.sonar:sonar&categories=Alert,Version&fromDate=2012-01-01&toDate=2012-08-31
Get global events from October 8th, 2012:
Code Block language none GET http://localhost:9000/api/events?fromDate=2012-10-08depth=-1&priorities=BLOCKER,CRITICAL
Parameters
Parameter | Description | Required | Default value |
|---|---|---|---|
resource | id or key of the resource | Yes |
|
depth | Used only when resource is set.
| No | 0 |
scopes | Comma-separated list of scopes:
| No |
|
qualifiers | Comma-separated list of qualifiers:
| No |
|
rules | Comma-separated list od rule keys or ids | No |
|
priorities | Comma-separated list of priorities | No |
|
limit | Maximum number of results | No | 5000 |
include_review | Include review data into response. | No | false |
output | Output format of review comments. Ignored if include_review is false. | No | PLAIN |
switched_off | If true, then return only switched-off violations (usually false-positives), | No | false |

