Obtaining Reviewer Information Based on the Repo Short ID and Merge Request Short ID
Function
Obtain the reviewer information based on the repository short ID and merge request short ID.
URI
GET/v2/repositories/{repository_id}/merge-requests/{merge_request_iid}/approval-reviewers
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_id |
Yes |
String |
Explanation: Repository short ID. Constraints: Mandatory Range: 0–2147483647 Default value: None |
merge_request_iid |
Yes |
Integer |
Explanation: Short ID of a merge request. Constraints: Mandatory Range: 0–2147483647 Default value: None |
page |
No |
Integer |
Explanation: Number of records on each page. Range: Minimum value: 1 Maximum value: 100 Default value: 100 |
per_page |
No |
Integer |
Explanation: Number of records on each page. Range: Minimum value: 1 Maximum value: 100 Default value: 20 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints: Mandatory Range: 1–100,000 characters. Default value: None |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
Explanation: Reviewer information. |
|
status |
String |
Explanation: Response status of the API. Range:
|
Parameter |
Type |
Description |
---|---|---|
approval_merge_request_reviewers |
Array of ApprovalUserDto objects |
Explanation: Reviewer list |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
Explanation: Auto-increment primary key |
username |
String |
Explanation: Username. |
name |
String |
Explanation: Name |
nick_name |
String |
Explanation: Alias |
state |
String |
Explanation: Review status |
Example Requests
GET https://{endpoint}/v2/repositories/{repository_id}/merge-requests/{merge_request_iid}/approval-reviewers
Example Responses
Status code: 200
{ "result": { "approval_merge_request_reviewers": [{ "id": 453613, "name": "test", "username": "test", "state": "required", "nick_name": "test" }] }, "status": "success" }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
Error code.
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot