...
| Description | Get a list of properties |
URL | /api/properties |
| HTTP Method | GET |
| Format Responses | json | xml |
Security | Optional (to see get secured properties) |
Examples
| Use Case | Example Request |
|---|---|
| Get the list of all the properties |
...
...
| language | none |
|---|
|
...
| Get the global property 'sonar.core.codeCoveragePlugin' |
...
| language | none |
|---|
...
| |
| Get the property 'sonar.core.codeCoveragePlugin' on project 'org.codehaus.sonar:sonar' |
...
...
| language | none |
|---|
|
...
Response Format
| Code Block | ||||
|---|---|---|---|---|
| ||||
[
{
"key":"sonar.core.treemap.colormetric",
"value":"violations_density"
},
...
] |
Parameters
Parameter | Description | Required | Default Value | Example Value | ||||
|---|---|---|---|---|---|---|---|---|
id | Key of the property | No | Get all properties if not set | sonar.core.codeCoveragePlugin | ||||
resource | id or key of the project | No | None | org.codehaus.sonar:sonar | ||||
| format | Response formats: xml or json | No | xml | format can be set through:
If nothing is set, json is used. | No | None | json |
Create or Update a Property
| Description | Create or update a property |
URL | /api/properties |
| HTTP Method | POST |
| Security | Requires Global Administrator role |
Examples
| Use Case | Example Request |
|---|---|
| Create or update property 'myProperty' with value 'myValue' by user admin/admin |
...
...
| language | none |
|---|
|
...
|
...
|
...
|
...
|
...
|
...
...
...
...
...
...
...
...
...
...
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
Parameters
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
id | Key of the property | Yes | None | myProperty |
value | Value of the property | Yes | None | myValue |
Delete a Property
| Description | Delete a property |
URL | /api/properties |
| HTTP Method | DELETE |
| Security | Requires Global Administrator role |
Examples
| Use Case | Example Request |
|---|---|
| Delete property 'myProperty' by user admin/admin |
...
...
| language | none |
|---|
|
...
|
...
|
...
|
...
|
...
|
Parameters
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
id | Key of the property | Yes | None | myProperty |

