| Description | Get a list of rules |
URL | /api/rules |
| HTTP Method | GET |
| Response Formats | json | xml | csv |
Security | None |
| Use Case | Example Request |
|---|---|
| Get all the java rules | |
| Get all the java rules from pmd and findbugs |
|
[
{
"title":"@deprecated Tag",
"key":"checkstyle:com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck_1296413307",
"plugin":"checkstyle",
"config_key":"Checker/TreeWalker/TodoComment",
"description":"",
"priority":"INFO",
"params":[
{
"name":"format",
"description":"Regular expression pattern to check. Default is TODO:"
}
]
},
...
] |
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
language | Key of the language | No | None | java |
plugin | Comma-separated list of rules plugins | No | None | findbugs,pmd |
searchtext | To filter on rules containing a specified text in their name, key or title | No | None | braces |
profile | When this parameter is defined, a node 'status' is added for each 'rule' node with values 'INACTIVE' or 'ACTIVE'. | No | None | Sonar%20way |
priorities | List of INACTIVE, ACTIVE, BLOCKER, CRITICAL, MAJOR, MINOR, INFO. | No | None | BLOCKER,CRITICAL |
| format | Response format can be set through:
If nothing is set, json is used. | No | None | json |