Versions Compared

Key

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

...

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 Project Administrator role to create an event.User role on the project

Examples

  1. Create an event on project org.apache.struts:struts with administrator admin/admin:
  2. Category: Alert
  3. Name: myAlertName
  4. Description: myAlertDescriptiona review:
    • XXX
    • XXX
    • XXX
       

      Code Block
      languagenone
      curl -u admin:admin -d "resource=org.apache.struts:struts&category=Alert&name=myAlertName&description=myAlertDescription" http://localhost:9000/api/events
      ??????????????

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

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
       

      Code Block
      languagenone
      ??????????????

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
       

      Code Block
      languagenone
      ??????????????

Parameters

Value

Parameter

Description

Required

Default Value

id

resource

id or key of the project

?

 

org.codehaus.sonar:sonar

category

Category

?

 

Version
Alert 

name

 

   

description

 

   
Autres paramètres ???    
Note
To be reviewed and completed
    

Review id

Yes

None

assignee

Login of new assignee

Yes

None

Resolve

DescriptionResolve a review

URL

/api/reviews/resolve

MethodPUT
Security

Requires User role on the project

Examples

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

      Code Block
      languagenone
      ??????????????

Parameters

Parameter

Description

Required

Default Value

id

Review id

Yes

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

Yes

None

comment

 

Yes

None

Reopen

DescriptionReopen a review

URL

/api/reviews/reopen

MethodPUT
Security

Requires User role on the project

Examples

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

      Code Block
      languagenone
      ??????????????

Parameters

Parameter

Description

Required

Default Value

id

Review id

Yes

None

comment

 

Yes

None