| Description | Get a list of manual measures |
URL | /api/manual_measures |
| HTTP Method | GET |
| Response Formats | json |
Security | Requires User role on the project |
| Use Case | Example Request |
|---|---|
| Get all the manual measures on project 'myProject' |
|
| Get the manual measure on metric 'business_value' on project 'myProject' |
|
[
{
"id":10,
"metric":"business_value",
"resource":"java-sonar-runner-simple",
"val":10.2,
"desc":"blabla",
"created_at":"2012-10-10T18:12:23+0200",
"updated_at":"2012-10-10T18:12:23+0200",
"login":"admin",
"username":"Administrator"
},
...
] |
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| resource | id or key of the project | Yes | None | org.codehaus.sonar:sonar |
| metric | id of the manual metric | No | None | business_value |
| format | Response format can be set through:
If nothing is set, json is used. | No | None | json |
| Description | Create a manual measure |
URL | /api/manual_measures |
| HTTP Method | POST |
| Security | Requires Project Administrator role on the project |
| Use Case | Example Request |
|---|---|
Create a manual measure on project 'myProject' being logged in as user 'admin/admin':
|
|
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
resource | id or key of the project | Yes | None | org.codehaus.sonar:sonar |
metric | Key of the manual metric | Yes | None | business_value |
val | Decimal value of the manual measure | Yes (or text is set) | None | 10.0 |
| text | Text value of the manual measure | Yes (or val is set) | None | abc |
| desc | Description | No | None | myDescription |
| Description | Delete a manual measure |
URL | /api/manual_measures |
| HTTP Method | DELETE |
| Security | Requires Project Administrator role on the project |
| Use Case | Example Request |
|---|---|
| Delete manual measure 'business_value' on project 'myProject' |
|
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
resource | id or key of the project | Yes | None | org.codehaus.sonar:sonar |
metric | Key of the manual metric | Yes | None | business_value |