This page describes the REST endpoints that are added by the @PLUGIN@ plugin.
Please also take note of the general information on the REST API.
GET /projects/project_name/@PLUGIN@
Gets the default reviewers for specified project.
GET /projects/myproject/@PLUGIN@ HTTP/1.0
As response a List of ReviewerFilterSection is returned that describes the default reviewers for myproject.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' [ { "filter": "branch:master", "reviewers": [ "UserA", "UserB" ] }, { "filter": "file:^lib/*", "reviewers": [ "UserB", "UserC" ] } ]
PUT /projects/project_name/@PLUGIN@
Changes the default reviewers for the specified project.
The change to reviewers must be provided in the request body inside a ConfigReviewersInput entity.
Caller must be a member of a group that is granted the ‘Modify Reviewers Config’ capability (provided by this plugin) or be a Project Owner for the project.
PUT /projects/myproject/@PLUGIN@ HTTP/1.0 Content-Type: application/json;charset=UTF-8 { "action": "ADD", "filter": "branch:master" "reviewer": "UserA" }
As response the default reviewers are returned as a list of ReviewerFilterSection.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' [ { "filter": "branch:master", "reviewers": [ "UserA", "UserB" ] }, { "filter": "file:^lib/*", "reviewers": [ "UserB", "UserC" ] } ]
The ReviewerFilterSection
entity contains a filter section of the default reviewers.
The ConfigReviewersInput
entity contains an update for the default reviewers.
Part of Gerrit Code Review