Skip to content

Retrieve approval state for a merge request

GET
/api/v4/projects/{id}/merge_requests/{merge_request_iid}/approvals

Retrieves the approval state for a specified merge request. In the response, approved_by contains information about all approvers of the merge request, regardless of whether those approvals satisfy any approval rule.

id
required
One of:
string

The ID or URL-encoded path of the project

merge_request_iid
required
integer

The IID of a merge request

OK

Media type application/json
object
user_has_approved
boolean
user_can_approve
boolean
approved
boolean
approved_by
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
Example
{
"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"
}
}

Bad Request

Not found