Change approval-related configuration
Deprecated
POST
/api/v4/projects/{id}/merge_requests/{merge_request_iid}/approvals
Deprecated in 16.0. Use the merge request approvals API instead.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body required
Section titled “ Request Body required ” Media type application/json
object
approvals_required
required
The amount of approvals required. Must be higher than the project approvals
integer
Example
2Responses
Section titled “ Responses ”Created
Media type application/json
object
id
integer format: int64
iid
integer
project_id
integer format: int64
title
string
description
string
state
string
created_at
string format: date-time
updated_at
string format: date-time
merge_status
string
approved
boolean
approvals_required
integer
approvals_left
integer
require_password_to_approve
boolean
approved_by
Array<object>
object
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
approved_at
string format: date-time
suggested_approvers
Array<object>
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
approvers
Array<object>
object
approver_groups
Array<object>
object
user_has_approved
boolean
user_can_approve
boolean
approval_rules_left
Array<object>
object
id
integer format: int64
name
string
rule_type
string
has_approval_rules
boolean
merge_request_approvers_available
boolean
multiple_approval_rules_available
boolean
invalid_approvers_rules
Array<object>
object
id
integer format: int64
name
string
rule_type
string
Example
{ "id": 84, "iid": 14, "project_id": 4, "title": "Impedit et ut et dolores vero provident ullam est", "description": "Repellendus impedit et vel velit dignissimos.", "state": "closed", "created_at": "2022-08-17T12:46:35.053Z", "updated_at": "2022-11-14T17:22:01.470Z", "merge_status": "can_be_merged", "approvals_required": 2, "approvals_left": 2, "approved_by": [ { "user": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "approved_at": "2025-01-01T10:00:00Z" } ], "suggested_approvers": [ { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" } ], "approval_rules_left": [ { "id": 1, "name": "QA", "rule_type": "regular" } ], "invalid_approvers_rules": [ { "id": 1, "name": "QA", "rule_type": "regular" } ]}Bad Request
Not Found