API

ChangeReviewer

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/reviewers list Current requested reviewers
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/reviewers update Current requested reviewers and the assignments changed by this request

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

change_reviewers, err := client.ChangeReviewer(nil).List(map[string]any{"change_id": "example", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(change_reviewers)
updated, err := client.ChangeReviewer(nil).Update(map[string]any{"change_id": "example", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

Construct client as shown in the Lua setup, then call the operations:

local change_reviewers, err = client:ChangeReviewer():list({ change_id = "example", organization_id = "example", repo_id = "example" })
local updated, err = client:ChangeReviewer():update({ change_id = "example", organization_id = "example", repo_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$change_reviewers = $client->ChangeReviewer()->list(["change_id" => "example", "organization_id" => "example", "repo_id" => "example"]);
$updated = $client->ChangeReviewer()->update(["change_id" => "example", "organization_id" => "example", "repo_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

change_reviewers = client.ChangeReviewer().list({"change_id": "example", "organization_id": "example", "repo_id": "example"})
updated = client.ChangeReviewer().update({"change_id": "example", "organization_id": "example", "repo_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

change_reviewers = client.ChangeReviewer.list({ "change_id" => "example", "organization_id" => "example", "repo_id" => "example" })
updated = client.ChangeReviewer.update({ "change_id" => "example", "organization_id" => "example", "repo_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const change_reviewers = await client.ChangeReviewer().list({ change_id: "example", organization_id: "example", repo_id: "example" })
const updated = await client.ChangeReviewer().update({ change_id: "example", organization_id: "example", repo_id: "example" })

Fields

Field Type Required Description
add array No Add
email string Yes Email
name one,string,null Yes Name
remove array No Remove
removed_reviewers array Yes Removed Reviewers
requested_reviewers array Yes Requested Reviewers
reviewers array Yes Reviewers

list

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/reviewers

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_id_reviewers.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Responses

200: Current requested reviewers

application/json

Property Type Required Description
reviewers array of object Yes
reviewers[].email string (email) Yes
reviewers[].name string Yes
401: Unauthorized
403: Forbidden
404: Change was not found in this repository

application/json

Property Type Required Description
error string Yes
422: Unprocessable entity
502: Bad gateway

update

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/reviewers

Operation ID: patch_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_id_reviewers.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Request body

application/json

Property Type Required Description
add array of string No
remove array of string No

Responses

200: Current requested reviewers and the assignments changed by this request

application/json

Property Type Required Description
removed_reviewers array of object Yes
removed_reviewers[].email string (email) Yes
removed_reviewers[].name string Yes
requested_reviewers array of object Yes
requested_reviewers[].email string (email) Yes
requested_reviewers[].name string Yes
reviewers array of object Yes
reviewers[].email string (email) Yes
reviewers[].name string Yes
401: Unauthorized
403: Forbidden
404: Change or reviewer was not found

application/json

Property Type Required Description
error string Yes
409: The reviewer name is ambiguous

application/json

Property Type Required Description
code enum: reviewer_ambiguous Yes
error string Yes
422: Change submission was invalid

application/json

Property Type Required Description
error string Yes
502: Bad gateway