Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History
DescriptionGet a list of reviews

URL

/api/reviews

MethodGET

Security

Requires User role on the project

Number or ResultsResults are limited to 200 reviews, ordered by creation date (most recent to oldest)

Examples

  1. Get reviews whose ids are 47 and 48:



  2. Get all open reviews on project org.codehaus.sonar:sonar:

Parameters

Parameter

Description

Required

Default value

ids

List of review ids

No

 

resources

Comma-separated list of resource ids or keys

No

 

projects

Comma-separated list of root project ids or keys

No

 

statuses

Comma-separated list of status
Possible values: OPEN | CLOSED 

No

 

resolutions

Comma-separated list of resolutions
Possible values: FIXED | FALSE-POSITIVE  

No

 

severities

Comma-separated list of severities
Possible values: INFO | MINOR | MAJOR | CRITICAL | BLOCKER

No

 

authors

Comma-separated list of author login 

No

 

assignees

Comma-separated list of assignee login

No

 

review_type

Type of review
Possible values: FALSE-POSITIVE | VIOLATION 

No

VIOLATION

output

Format of comments
Possible values: PLAIN| HTML

No

PLAIN

formatResponse format: xml or jsonNoxml

Create a Review

DescriptionCreate an review

URL

/api/reviews

MethodPOST
Security

Requires User role on the project

Examples

  1. Create a review:
    • XXX
    • XXX
    • XXX
       

Parameters

Parameter

Description

Required

Default Value

violation_id

Violation on which the review should be created

Yes

None

status

Initial status (can be 'OPEN' or 'RESOLVED')

Yes

None

comment

Text of initial comment

Yes

None

resolution

If status 'RESOLVED', then resolution must be provided (can be 'FIXED' or 'FALSE-POSITIVE')

No

None

assignee

Login of initial assignee

No

None

Add a Comment on a Review

DescriptionAdd a comment

URL

/api/reviews/add_comment

MethodPUT
Security

Requires User role on the project

Examples

  1. Add a comment on review:
    • XXX
    • XXX
    • XXX
       

Parameters

Parameter

Description

Required

Default Value

id

Review id

Yes

None

comment

New comment

Yes

None

Reassign a Review

DescriptionReassign a review

URL

/api/reviews/reassign

MethodPUT
Security

Requires User role on the project

Examples

  1. Reassign a review:
    • XXX
    • XXX
    • XXX
       

Parameters

Parameter

Description

Required

Default Value

id

Review id

Yes

None

assignee

Login of new assignee

Yes

None

Resolve a Review

DescriptionResolve a review

URL

/api/reviews/resolve

MethodPUT
Security

Requires User role on the project

Examples

  1. Resolve a review:
    • XXX
    • XXX
    • XXX
       

Parameters

Parameter

Description

Required

Default Value

id

Review id

Yes

None
resolutionCan be 'FIXED' or 'FALSE-POSITIVE'

Yes

None

comment

 

Yes

None

Reopen a Review

DescriptionReopen a review

URL

/api/reviews/reopen

MethodPUT
Security

Requires User role on the project

Examples

  1. Reopen a review:
    • XXX
    • XXX
    • XXX
       

Parameters

Parameter

Description

Required

Default Value

id

Review id

Yes

None

comment

 

Yes

None
Labels
  • None