Update Merge Request Reviewers via the API

How do I assign multiple reveres to a Merge Request via the API? I have tried the update Merge Request call as documented.

PUT /projects/:id/merge_requests/:merge_request_iid

I’ve tried with with a list of three review_ids like so:

curl --request PUT --header "token" "https://gitlab.com/api/v4/projects/####/merge_requests/#?reviewer_ids=#######,#######,#######"

The result will be only one (the first in the list) reviewer is added to “reviewers”.

"reviewers": [ { "id": ######, "username": "user_name", "name": "name", "state": "active", "avatar_url": "...", "web_url": "..." } ]

I’m using gitlab.com

Solved: This reuquires Gitlab premium.

Hi @psax how do you know about this? I have the enterprise account and the same problem you had. Is there any documentation about it?

It’s in the REST API docs. Book mark this page. It can be difficult to find via search. https://docs.gitlab.com/ee/api/api_resources.html

Er, maybe I didn’t understand your question. I thing I figured this out by experimentation. I’ve come across this issue on a few features because I test on a fork that is not a premium account. The REST API docs do cover premium features but I’m not sure if there is an exhaustive list.

@psax After a lot of experimentation as well, it started working. Don’t know why :confused: I tried several ways, revisited again, and now works as expected.

Anyway, thank you for answering!