| Description | Get a list of properties |
URL | /api/properties |
| HTTP Method | GET |
| Format Responses | json | xml |
Security | Optional (to get secured properties) |
| Use Case | Example Request |
|---|---|
| Get the list of all the properties | |
| Get the global property 'sonar.core.codeCoveragePlugin' |
|
| Get the property 'sonar.core.codeCoveragePlugin' on project 'org.codehaus.sonar:sonar' |
[
{
"key":"sonar.core.treemap.colormetric",
"value":"violations_density"
},
...
] |
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 format can be set through:
If nothing is set, json is used. | No | None | json |
| Description | Create or update a property |
URL | /api/properties |
| HTTP Method | POST |
| Security | Requires Global Administrator role |
| Use Case | Example Request |
|---|---|
| Create or update property 'myProperty' with value 'myValue' by user admin/admin |
Example to create a property with the content of a file:
|
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
id | Key of the property | Yes | None | myProperty |
value | Value of the property | Yes | None | myValue |
| Description | Delete a property |
URL | /api/properties |
| HTTP Method | DELETE |
| Security | Requires Global Administrator role |
| Use Case | Example Request |
|---|---|
| Delete property 'myProperty' by user admin/admin |
|
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
id | Key of the property | Yes | None | myProperty |