Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
DescriptionGet a list of rules

URL

/api/rules

HTTP MethodGET
Response Formatsjson | xml | csv

Security

None

Examples

 

  1. Get all the java rules:

    Code Block
    languagenone
    GET http://nemo.sonarsource.org/api/rules?language=java



  2. Get all the java rules from pmd and findbugs:

    Code Block
    languagenone
    http://nemo.sonarsource.org/api/rules?language=java&plugin=pmd,findbugs

...

Parameter

Description

Required

Default Value

Example Value

language

Key of the language

No

Nonejava

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'.
It is recommended to use the /api/profiles web service instead. 

No

None

Sonar%20way

priorities

List of INACTIVE, ACTIVE, BLOCKER, CRITICAL, MAJOR, MINOR, INFO.
It is recommended to use the /api/profiles web service instead of ACTIVE and INACTIVE.

No

None

 BLOCKER,CRITICAL

formatResponse formats: xml or json or csvNoxmlNone json