Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use CaseExample Request
Get the list of all the properties

GET http://nemo.sonarsource.org/api/properties

Get the global property 'sonar.core.codeCoveragePlugin'

GET http://nemo.sonarsource.org/api/properties/sonar.corejava.codeCoveragePlugincoveragePlugin

Get the property 'sonar.core.codeCoveragePlugin' on project 'org.codehaus.sonar:sonar'

GET http://nemo.sonarsource.org/api/properties/sonar.corejava.codeCoveragePlugincoveragePlugin?resource=org.codehaus.sonar:sonar

Response Format

Code Block
titleJSON
languagejavascript
[
  {
    "key":"sonar.core.treemap.colormetric",
    "value":"violations_density"
  },
  ...
]

...

DescriptionCreate or update a property

URL

/api/properties

HTTP MethodPOST
Security

Requires Global Administrator roleAdminister System permission

Examples

Use CaseExample Request
Create or update property 'myProperty' with value 'myValue' by user admin/admin

curl -u admin:admin -X POST http://localhost:9000/api/properties?id=myProperty&value=myValue

Example to create a property with the content of a file:

curl -u <login>:<password> -X POST http://localhost:9000/api/properties/?id=<key> -v -T <path/to/file>

...

DescriptionDelete a property

URL

/api/properties

HTTP MethodDELETE
Security

Requires Global Administrator roleAdminister System permission

Examples

Use CaseExample Request
Delete property 'myProperty' by user admin/admin

curl -u admin:admin -X DELETE http://localhost:9000/api/properties/myProperty

...