| Description | Get a list of violations |
URL | /api/violations |
| Method | GET |
Security | Requires User role on project |
Examples
Get all the violations from project Sonar (key = org.codehaus.sonar:sonar):
Get all the blocker and critical violations from project Sonar (key = org.codehaus.sonar:sonar):
Parameters
Parameter | Description | Required | Default value |
|---|---|---|---|
resource | id or key of the resource | Yes | None |
depth | Used only when resource is set.
| No | 0 |
scopes | Comma-separated list of scopes:
| No | None |
qualifiers | Comma-separated list of qualifiers:
| No | None |
rules | Comma-separated list od rule keys or ids | No | None |
priorities | Comma-separated list of priorities | No | None |
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 |

