Use this API to manage merge requests in a project, and to list the merge requests across a group or an entire instance. You can:

  • Automate any part of the code review process.
  • Connect code changes to external tools.
  • Send merge request information to non-GitLab systems in your preferred format.
  • Update, approve, merge, or block merge requests based on data from external systems.
  • Add commits from previous merge requests to a merge request for more context.

All API calls to non-public information require authentication.

List all group merge requests

GET /api/v4/groups/{id}/merge_requests

Lists all merge requests for a specified group and any subgroups.

Parameters

NameTypeDescription
id
Path, required
StringThe ID or URL-encoded path of the group owned by the authenticated user
author_id
Query
IntegerReturns merge requests created by the given user id. Combine with scope=all or scope=assigned_to_me. Mutually exclusive with author_username
author_username
Query
StringReturns merge requests created by the given username. Mutually exclusive with author_id
assignee_id
Query
Integer or stringReturns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. Mutually exclusive with assignee_username
assignee_username
Query
Array of stringsReturns merge requests created by the given username. Mutually exclusive with assignee_id
reviewer_username
Query
StringReturns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Introduced in GitLab 13.8. Mutually exclusive with reviewer_id
labels
Query
Array of stringsReturns merge requests matching a comma-separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. Predefined names are case-insensitive
milestone
Query
StringReturns merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone
my_reaction_emoji
Query
StringReturns merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction
reviewer_id
Query
Integer or stringReturns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with reviewer_username
state
Query
StringReturns all merge requests or just those that are opened, closed, locked, or merged
Allowed values: opened, closed, locked, merged, all
Default: all
order_by
Query
StringReturns merge requests ordered by created_at, label_priority, milestone_due, popularity, priority, title, updated_at or merged_at fields. Introduced in GitLab 14.8
Allowed values: created_at, label_priority, milestone_due, popularity, priority, title, updated_at, merged_at
Default: created_at
sort
Query
StringReturns merge requests sorted in asc or desc order
Allowed values: asc, desc
Default: desc
with_labels_details
Query
BooleanIf true, response returns more details for each label in labels field: :name,:color, :description, :description_html, :text_color
Default: false
with_merge_status_recheck
Query
BooleanIf true, this projection requests (but does not guarantee) that the merge_status field be recalculated asynchronously. Introduced in GitLab 13.0
Default: false
created_after
Query
String (date-time)Returns merge requests created on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
created_before
Query
String (date-time)Returns merge requests created on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
updated_after
Query
String (date-time)Returns merge requests updated on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
updated_before
Query
String (date-time)Returns merge requests updated on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
merged_after
Query
String (date-time)Returns merge requests merged on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
merged_before
Query
String (date-time)Returns merge requests merged on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
view
Query
StringIf simple, returns the iid, URL, title, description, and basic state of merge request
Allowed values: simple
scope
Query
StringReturns merge requests for the given scope: created_by_me, assigned_to_me, reviews_for_me or all
Allowed values: created-by-me, assigned-to-me, created_by_me, assigned_to_me, reviews_for_me, all
source_branch
Query
StringReturns merge requests with the given source branch
source_project_id
Query
IntegerReturns merge requests with the given source project id
target_branch
Query
StringReturns merge requests with the given target branch
search
Query
StringSearch merge requests against their title and description
in
Query
StringModify the scope of the search attribute. title, description, or a string joining them with comma
Example: title,description
wip
Query
StringDeprecated. Use draft instead. Filter merge requests against their wip status. yes to return only draft merge requests, no to return non-draft merge requests. Mutually exclusive with draft
Allowed values: yes, no
draft
Query
BooleanFilter merge requests against their draft status. true to return only draft merge requests, false to return non-draft merge requests. Mutually exclusive with wip
not
Query
ObjectReturns merge requests that do not match the parameters supplied
not[author_id]
Query
Integer<Negated> Returns merge requests created by the given user id. Combine with scope=all or scope=assigned_to_me. Mutually exclusive with not[author_username]
not[author_username]
Query
String<Negated> Returns merge requests created by the given username. Mutually exclusive with not[author_id]
not[assignee_id]
Query
Integer or string<Negated> Returns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. Mutually exclusive with not[assignee_username]
not[assignee_username]
Query
Array of strings<Negated> Returns merge requests created by the given username. Mutually exclusive with not[assignee_id]
not[reviewer_username]
Query
String<Negated> Returns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Introduced in GitLab 13.8. Mutually exclusive with not[reviewer_id]
not[labels]
Query
Array of strings<Negated> Returns merge requests matching a comma-separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. Predefined names are case-insensitive
not[milestone]
Query
String<Negated> Returns merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone
not[my_reaction_emoji]
Query
String<Negated> Returns merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction
not[reviewer_id]
Query
Integer<Negated> Returns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with not[reviewer_username]
deployed_before
Query
String (date-time)Returns merge requests deployed before the given date/time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
deployed_after
Query
String (date-time)Returns merge requests deployed after the given date/time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
environment
Query
StringReturns merge requests deployed to the given environment
Example: production
merge_user_id
Query
IntegerReturns merge requests which have been merged by the user with the given user id. Mutually exclusive with merge_user_username
merge_user_username
Query
StringReturns merge requests which have been merged by the user with the given username. Mutually exclusive with merge_user_id
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
non_archived
Query
BooleanReturns merge requests from non archived projects only
Default: true

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestBasic
400Bad Request—
401Unauthorized—
404Not found—
422Unprocessable entity—

List all merge requests

GET /api/v4/merge_requests

Lists all merge requests accessible to the authenticated user. By default, returns only merge requests created by the current user. Use scope=all to get all merge requests.

Parameters

NameTypeDescription
author_id
Query
IntegerReturns merge requests created by the given user id. Combine with scope=all or scope=assigned_to_me. Mutually exclusive with author_username
author_username
Query
StringReturns merge requests created by the given username. Mutually exclusive with author_id
assignee_id
Query
Integer or stringReturns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. Mutually exclusive with assignee_username
assignee_username
Query
Array of stringsReturns merge requests created by the given username. Mutually exclusive with assignee_id
reviewer_username
Query
StringReturns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Introduced in GitLab 13.8. Mutually exclusive with reviewer_id
labels
Query
Array of stringsReturns merge requests matching a comma-separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. Predefined names are case-insensitive
milestone
Query
StringReturns merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone
my_reaction_emoji
Query
StringReturns merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction
reviewer_id
Query
Integer or stringReturns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with reviewer_username
state
Query
StringReturns all merge requests or just those that are opened, closed, locked, or merged
Allowed values: opened, closed, locked, merged, all
Default: all
order_by
Query
StringReturns merge requests ordered by created_at, label_priority, milestone_due, popularity, priority, title, updated_at or merged_at fields. Introduced in GitLab 14.8
Allowed values: created_at, label_priority, milestone_due, popularity, priority, title, updated_at, merged_at
Default: created_at
sort
Query
StringReturns merge requests sorted in asc or desc order
Allowed values: asc, desc
Default: desc
with_labels_details
Query
BooleanIf true, response returns more details for each label in labels field: :name,:color, :description, :description_html, :text_color
Default: false
with_merge_status_recheck
Query
BooleanIf true, this projection requests (but does not guarantee) that the merge_status field be recalculated asynchronously. Introduced in GitLab 13.0
Default: false
created_after
Query
String (date-time)Returns merge requests created on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
created_before
Query
String (date-time)Returns merge requests created on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
updated_after
Query
String (date-time)Returns merge requests updated on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
updated_before
Query
String (date-time)Returns merge requests updated on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
merged_after
Query
String (date-time)Returns merge requests merged on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
merged_before
Query
String (date-time)Returns merge requests merged on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
view
Query
StringIf simple, returns the iid, URL, title, description, and basic state of merge request
Allowed values: simple
scope
Query
StringReturns merge requests for the given scope: created_by_me, assigned_to_me, reviews_for_me or all
Allowed values: created-by-me, assigned-to-me, created_by_me, assigned_to_me, reviews_for_me, all
Default: created_by_me
source_branch
Query
StringReturns merge requests with the given source branch
source_project_id
Query
IntegerReturns merge requests with the given source project id
target_branch
Query
StringReturns merge requests with the given target branch
search
Query
StringSearch merge requests against their title and description
in
Query
StringModify the scope of the search attribute. title, description, or a string joining them with comma
Example: title,description
wip
Query
StringDeprecated. Use draft instead. Filter merge requests against their wip status. yes to return only draft merge requests, no to return non-draft merge requests. Mutually exclusive with draft
Allowed values: yes, no
draft
Query
BooleanFilter merge requests against their draft status. true to return only draft merge requests, false to return non-draft merge requests. Mutually exclusive with wip
not
Query
ObjectReturns merge requests that do not match the parameters supplied
not[author_id]
Query
Integer<Negated> Returns merge requests created by the given user id. Combine with scope=all or scope=assigned_to_me. Mutually exclusive with not[author_username]
not[author_username]
Query
String<Negated> Returns merge requests created by the given username. Mutually exclusive with not[author_id]
not[assignee_id]
Query
Integer or string<Negated> Returns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. Mutually exclusive with not[assignee_username]
not[assignee_username]
Query
Array of strings<Negated> Returns merge requests created by the given username. Mutually exclusive with not[assignee_id]
not[reviewer_username]
Query
String<Negated> Returns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Introduced in GitLab 13.8. Mutually exclusive with not[reviewer_id]
not[labels]
Query
Array of strings<Negated> Returns merge requests matching a comma-separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. Predefined names are case-insensitive
not[milestone]
Query
String<Negated> Returns merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone
not[my_reaction_emoji]
Query
String<Negated> Returns merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction
not[reviewer_id]
Query
Integer<Negated> Returns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with not[reviewer_username]
deployed_before
Query
String (date-time)Returns merge requests deployed before the given date/time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
deployed_after
Query
String (date-time)Returns merge requests deployed after the given date/time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
environment
Query
StringReturns merge requests deployed to the given environment
Example: production
merge_user_id
Query
IntegerReturns merge requests which have been merged by the user with the given user id. Mutually exclusive with merge_user_username
merge_user_username
Query
StringReturns merge requests which have been merged by the user with the given username. Mutually exclusive with merge_user_id
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
non_archived
Query
BooleanReturns merge requests from non archived projects only
Default: false

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestBasic
400Bad Request—
401Unauthorized—
422Unprocessable entity—

List all project merge requests

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

Lists all project merge requests.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
author_id
Query
IntegerReturns merge requests created by the given user id. Combine with scope=all or scope=assigned_to_me. Mutually exclusive with author_username
author_username
Query
StringReturns merge requests created by the given username. Mutually exclusive with author_id
assignee_id
Query
Integer or stringReturns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. Mutually exclusive with assignee_username
assignee_username
Query
Array of stringsReturns merge requests created by the given username. Mutually exclusive with assignee_id
reviewer_username
Query
StringReturns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Introduced in GitLab 13.8. Mutually exclusive with reviewer_id
labels
Query
Array of stringsReturns merge requests matching a comma-separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. Predefined names are case-insensitive
milestone
Query
StringReturns merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone
my_reaction_emoji
Query
StringReturns merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction
reviewer_id
Query
Integer or stringReturns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with reviewer_username
state
Query
StringReturns all merge requests or just those that are opened, closed, locked, or merged
Allowed values: opened, closed, locked, merged, all
Default: all
order_by
Query
StringReturns merge requests ordered by created_at, label_priority, milestone_due, popularity, priority, title, updated_at or merged_at fields. Introduced in GitLab 14.8
Allowed values: created_at, label_priority, milestone_due, popularity, priority, title, updated_at, merged_at
Default: created_at
sort
Query
StringReturns merge requests sorted in asc or desc order
Allowed values: asc, desc
Default: desc
with_labels_details
Query
BooleanIf true, response returns more details for each label in labels field: :name,:color, :description, :description_html, :text_color
Default: false
with_merge_status_recheck
Query
BooleanIf true, this projection requests (but does not guarantee) that the merge_status field be recalculated asynchronously. Introduced in GitLab 13.0
Default: false
created_after
Query
String (date-time)Returns merge requests created on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
created_before
Query
String (date-time)Returns merge requests created on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
updated_after
Query
String (date-time)Returns merge requests updated on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
updated_before
Query
String (date-time)Returns merge requests updated on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
merged_after
Query
String (date-time)Returns merge requests merged on or after the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
merged_before
Query
String (date-time)Returns merge requests merged on or before the given time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
view
Query
StringIf simple, returns the iid, URL, title, description, and basic state of merge request
Allowed values: simple
scope
Query
StringReturns merge requests for the given scope: created_by_me, assigned_to_me, reviews_for_me or all
Allowed values: created-by-me, assigned-to-me, created_by_me, assigned_to_me, reviews_for_me, all
source_branch
Query
StringReturns merge requests with the given source branch
source_project_id
Query
IntegerReturns merge requests with the given source project id
target_branch
Query
StringReturns merge requests with the given target branch
search
Query
StringSearch merge requests against their title and description
in
Query
StringModify the scope of the search attribute. title, description, or a string joining them with comma
Example: title,description
wip
Query
StringDeprecated. Use draft instead. Filter merge requests against their wip status. yes to return only draft merge requests, no to return non-draft merge requests. Mutually exclusive with draft
Allowed values: yes, no
draft
Query
BooleanFilter merge requests against their draft status. true to return only draft merge requests, false to return non-draft merge requests. Mutually exclusive with wip
not
Query
ObjectReturns merge requests that do not match the parameters supplied
not[author_id]
Query
Integer<Negated> Returns merge requests created by the given user id. Combine with scope=all or scope=assigned_to_me. Mutually exclusive with not[author_username]
not[author_username]
Query
String<Negated> Returns merge requests created by the given username. Mutually exclusive with not[author_id]
not[assignee_id]
Query
Integer or string<Negated> Returns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. Mutually exclusive with not[assignee_username]
not[assignee_username]
Query
Array of strings<Negated> Returns merge requests created by the given username. Mutually exclusive with not[assignee_id]
not[reviewer_username]
Query
String<Negated> Returns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Introduced in GitLab 13.8. Mutually exclusive with not[reviewer_id]
not[labels]
Query
Array of strings<Negated> Returns merge requests matching a comma-separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. Predefined names are case-insensitive
not[milestone]
Query
String<Negated> Returns merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone
not[my_reaction_emoji]
Query
String<Negated> Returns merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction
not[reviewer_id]
Query
Integer<Negated> Returns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with not[reviewer_username]
deployed_before
Query
String (date-time)Returns merge requests deployed before the given date/time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
deployed_after
Query
String (date-time)Returns merge requests deployed after the given date/time. Expected in ISO 8601 format
Example: 2019-03-15T08:00:00Z
environment
Query
StringReturns merge requests deployed to the given environment
Example: production
merge_user_id
Query
IntegerReturns merge requests which have been merged by the user with the given user id. Mutually exclusive with merge_user_username
merge_user_username
Query
StringReturns merge requests which have been merged by the user with the given username. Mutually exclusive with merge_user_id
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
iids
Query
Array of integersReturns the request having the given iid

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestBasic
400Bad Request—
401Unauthorized—
404Not found—
422Unprocessable entity—

Create a merge request

POST /api/v4/projects/{id}/merge_requests

Creates a merge request for a project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (application/json)

PropertyTypeDescription
add_labelsArray of stringsComma-separated label names to add to a merge request
allow_collaborationBooleanAllow commits from members who can merge to the target branch
allow_maintainer_to_pushBoolean[deprecated] See allow_collaboration
assignee_idIntegerAssignee user ID
assignee_idsArray of integersThe IDs of the users to assign the merge request to, as a comma-separated list. Set to 0 or provide an empty value to unassign all assignees
descriptionStringDescription of the merge request. Limited to 1,048,576 characters
labelsArray of stringsComma-separated label names for a merge request. Set to an empty string to unassign all labels
merge_afterStringDate after which the merge request can be merged
milestoneStringThe title of a project or ancestor-group milestone to assign the merge request to. Mutually exclusive with milestone_id
Maximum length: 255
milestone_idIntegerThe global ID of a milestone to assign the merge request to. Mutually exclusive with milestone
remove_labelsArray of stringsComma-separated label names to remove from a merge request
remove_source_branchBooleanFlag indicating if a merge request should remove the source branch when merging
reviewer_idsArray of integersThe IDs of the users to review the merge request, as a comma-separated list. Set to 0 or provide an empty value to unassign all reviewers
source_branch
Required
StringThe source branch
squashBooleanSquash commits into a single commit when merging
target_branch
Required
StringThe target branch
target_project_idIntegerThe target project of the merge request defaults to the :id of the project
title
Required
StringThe title of the merge request

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMergeRequest
400Bad request—
401Unauthorized—
404Not found—
409Conflict—
422Unprocessable entity—

Retrieve a merge request

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

Retrieves a merge request for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request
render_html
Query
BooleanIf true, response includes rendered HTML for title and description
include_diverged_commits_count
Query
BooleanIf true, response includes the commits behind the target branch
include_rebase_in_progress
Query
BooleanIf true, response includes whether a rebase operation is in progress

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequest
400Bad Request—
404Not found—

Update a merge request

PUT /api/v4/projects/{id}/merge_requests/{merge_request_iid}

Updates a merge request for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
add_labelsArray of stringsComma-separated label names to add to a merge request
allow_collaborationBooleanAllow commits from members who can merge to the target branch
allow_maintainer_to_pushBoolean[deprecated] See allow_collaboration
assignee_idIntegerAssignee user ID
assignee_idsArray of integersThe IDs of the users to assign the merge request to, as a comma-separated list. Set to 0 or provide an empty value to unassign all assignees
descriptionStringDescription of the merge request. Limited to 1,048,576 characters
discussion_lockedBooleanFlag indicating if the merge request’s discussion is locked. If the discussion is locked only project members can add, edit or resolve comments
labelsArray of stringsComma-separated label names for a merge request. Set to an empty string to unassign all labels
merge_afterStringDate after which the merge request can be merged
milestoneStringThe title of a project or ancestor-group milestone to assign the merge request to. Mutually exclusive with milestone_id
Maximum length: 255
milestone_idIntegerThe global ID of a milestone to assign the merge request to. Mutually exclusive with milestone
remove_labelsArray of stringsComma-separated label names to remove from a merge request
remove_source_branchBooleanFlag indicating if a merge request should remove the source branch when merging
reviewer_idsArray of integersThe IDs of the users to review the merge request, as a comma-separated list. Set to 0 or provide an empty value to unassign all reviewers
squashBooleanSquash commits into a single commit when merging
state_eventStringNew state (close/reopen)
Allowed values: close, reopen
target_branchStringThe target branch
titleStringThe title of the merge request

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequest
400Bad request—
404Not found—
409Conflict—
422Unprocessable entity—

Delete a merge request

DELETE /api/v4/projects/{id}/merge_requests/{merge_request_iid}

Deletes a specified merge request for a project. Administrators and project Owners only.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request

Responses

CodeDescriptionSchema
204No Content—
400Bad Request—
401Unauthorized—
404Not found—
412Precondition failed—

Add spent time for a merge request

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/add_spent_time

Adds spent time for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge_request

Request body (application/json)

PropertyTypeDescription
duration
Required
StringThe duration in human format

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesIssuableTimeStats
400Bad Request—
401Unauthorized—
404Not found—

Cancel merge when pipeline succeeds

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/cancel_merge_when_pipeline_succeeds

Cancels an automatic merge for a merge request that has been set to merge when the pipeline succeeds.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMergeRequest
400Bad Request—
401Unauthorized—
404Not found—
405Method not allowed—
406Not acceptable—

Retrieve merge request changes

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

Retrieves changes for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
unidiff
Query
BooleanA diff in a Unified diff format
Default: false
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestChanges
400Bad Request—
404Not found—

List all issues that close on merge

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

Lists all issues that close on merge.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKAPIEntitiesMRNote
400Bad Request—
403Forbidden—
404Not found—

Retrieve merge request commits

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

Retrieves commits for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesCommit
400Bad Request—
404Not found—

List all context commits for a merge request

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

Lists all context commits for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKAPIEntitiesCommit
400Bad Request—
404Not found—

Create context commits for a merge request

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/context_commits

Creates context commits for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
commits
Required
Array of stringsThe context commits’ SHA

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesCommit
400Bad request—
401Unauthorized—
404Not found—

Delete context commits from a merge request

DELETE /api/v4/projects/{id}/merge_requests/{merge_request_iid}/context_commits

Deletes specified context commits from a merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
commits
Query, required
Array of stringsThe context commits’ SHA
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
204No Content—
400Bad request—
401Unauthorized—
404Not found—

List all merge request diffs

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

Lists all merge request diffs.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
unidiff
Query
BooleanA diff in a Unified diff format
Default: false

Responses

CodeDescriptionSchema
200OKAPIEntitiesDiff
400Bad Request—
403Forbidden—
404Not found—

Merge a merge request

PUT /api/v4/projects/{id}/merge_requests/{merge_request_iid}/merge

Merges a merge request. Accepts and merges changes submitted with the merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
auto_mergeBooleanIf true, the merge request is set to auto merge
merge_commit_messageStringCustom merge commit message
merge_when_pipeline_succeedsBooleanDeprecated: Use auto_merge instead
shaStringIf present, then this SHA must match the HEAD of the source branch, otherwise the merge fails
should_remove_source_branchBooleanIf true, removes the source branch
skip_merge_trainBooleanIf true, avoids restarting the merge train when merging immediately
squashBooleanIf true, the commits are squashed into a single commit on merge
squash_commit_messageStringCustom squash commit message

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequest
400Bad request—
401Unauthorized—
404Not found—
405Method not allowed—
409Conflict—
422Unprocessable entity—

Merge to default merge ref path

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

Merges the changes between the merge request source and target branches into the refs/merge-requests/:iid/merge ref, of the target project repository, if possible. This ref has the state the target branch would have if a regular merge action was taken.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OK—
400Bad request—
404Not Found—

Retrieve merge request participants

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

Retrieves participants for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKAPIEntitiesUserBasic
400Bad Request—
404Not found—

List all merge request pipelines

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

Lists all merge request pipelines.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request

Responses

CodeDescriptionSchema
200OKAPIEntitiesCiPipelineBasic
400Bad Request—
404Not found—

Create a merge request pipeline

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/pipelines

Creates a merge request pipeline. Pipelines created with this operation must configure .gitlab-ci.yml with only: [merge_requests] to create jobs.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
asyncBooleanIndicates if the merge request pipeline creation should be performed asynchronously. If set to true, the pipeline will be created outside of the API request and the endpoint will return an empty response with a 202 status code. When the response is 202, the creation can still fail outside of this request
Default: false

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesCiPipeline
400Bad request—
404Not found—
405Method not allowed—

Retrieve merge request raw diffs

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

Retrieves the raw diffs of the files changed in a merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
403Forbidden—
404Not found—

Rebase a merge request

PUT /api/v4/projects/{id}/merge_requests/{merge_request_iid}/rebase

Rebases a merge request. Automatically rebases the source_branch of the merge request against its target_branch.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
skip_ciBooleanSet to true to skip creating a CI pipeline

Responses

CodeDescriptionSchema
202Accepted—
400Bad Request—
403Forbidden—
404Not found—
409Conflict—

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

Lists all issues related to the merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
403Forbidden—
404Not found—

Reset spent time for a merge request

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/reset_spent_time

Resets the total spent time for a specified merge request to 0 seconds.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge_request

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesIssuableTimeStats
400Bad Request—
401Unauthorized—
404Not found—

Reset the estimated time for a merge request

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/reset_time_estimate

Resets the estimated time for a specified merge request to 0 seconds.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge_request

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesIssuableTimeStats
400Bad Request—
401Unauthorized—
404Not found—

Retrieve merge request reviewers

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

Retrieves reviewers for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestReviewer
400Bad Request—
404Not found—

Set the estimated time for a merge request

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/time_estimate

Sets an estimated time of work for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge_request

Request body (application/json)

PropertyTypeDescription
duration
Required
StringThe duration in human format
Example: 3h30m

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesIssuableTimeStats
400Bad request—
401Unauthorized—
404Not found—

Retrieve time tracking stats for a merge request

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

Retrieves time tracking stats for a specified merge request, including time estimate and time spent in seconds and human-readable format (for example, 1h 30m).

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge_request

Responses

CodeDescriptionSchema
200OKAPIEntitiesIssuableTimeStats
400Bad Request—
401Unauthorized—
404Not found—

Retrieve merge request diff versions

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

Retrieves merge request diff versions.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestDiff
400Bad Request—
404Not Found—

Retrieve a merge request diff version

GET /api/v4/projects/{id}/merge_requests/{merge_request_iid}/versions/{version_id}

Retrieves a merge request diff version.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of the merge request
version_id
Path, required
IntegerThe ID of the merge request diff version
unidiff
Query
BooleanA diff in a Unified diff format
Default: false

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestDiffFull
400Bad Request—
404Not Found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesCiPipeline

PropertyTypeDescription
archivedBooleanExample: false
before_shaStringExample: a91957a858320c0e17f3a0eca7cfacbff50ea29a
committed_atString (date-time)Example: 2015-12-24T15:51:21.880Z
coverageNumber (float)Example: 98.29
created_atString (date-time)Example: 2015-12-24T15:51:21.880Z
detailed_statusDetailedStatusEntity—
durationIntegerTime spent running in seconds
Example: 127
finished_atString (date-time)Example: 2015-12-24T17:54:31.198Z
idInteger (int64)Example: 1
iidIntegerExample: 2
project_idInteger (int64)Example: 3
queued_durationIntegerTime spent enqueued in seconds
Example: 63
refStringExample: feature-branch
shaStringExample: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52
sourceStringExample: push
started_atString (date-time)Example: 2015-12-24T17:54:30.733Z
statusStringExample: success
tagBooleanExample: false
updated_atString (date-time)Example: 2015-12-24T17:54:31.198Z
userAPIEntitiesUserBasic—
web_urlStringExample: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61
yaml_errorsStringExample: widgets:build: needs 'widgets:test'

APIEntitiesCiPipelineBasic

PropertyTypeDescription
created_atString (date-time)Example: 2022-10-21T16:49:48.000+02:00
idInteger (int64)Example: 1
iidIntegerExample: 2
project_idInteger (int64)Example: 3
refStringExample: feature-branch
shaStringExample: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52
sourceStringExample: push
statusStringExample: success
updated_atString (date-time)Example: 2022-10-21T16:49:48.000+02:00
web_urlStringExample: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61

APIEntitiesCommit

PropertyTypeDescription
author_emailStringExample: john@example.com
author_nameStringExample: John Smith
authored_dateString (date-time)Example: 2012-05-28T04:42:42-07:00
committed_dateString (date-time)Example: 2012-05-28T04:42:42-07:00
committer_emailStringExample: jack@example.com
committer_nameStringExample: Jack Smith
created_atString (date-time)Example: 2017-07-26T11:08:53.000+02:00
extended_trailersObjectExample: {"Signed-off-by":["John Doe \u003cjohndoe@gitlab.com\u003e","Jane Doe \u003cjanedoe@gitlab.com\u003e"]}
idStringExample: 2695effb5807a22ff3d138d593fd856244e155e7
messageStringExample: Initial commit
parent_idsArray of stringsExample: ["2a4b78934375d7f53875269ffd4f45fd83a84ebe"]
short_idStringExample: 2695effb
titleStringExample: Initial commit
trailersObjectExample: {"Merged-By":"Jane Doe janedoe@gitlab.com"}
web_urlStringExample: https://gitlab.example.com/janedoe/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746

APIEntitiesCustomAttribute

PropertyTypeDescription
keyStringExample: foo
valueStringExample: bar

APIEntitiesDiff

PropertyTypeDescription
a_modeStringExample: 100755
b_modeStringExample: 100644
collapsedBoolean—
deleted_fileBoolean—
diffStringExample: @@ -71,6 +71,8 @@\n...
generated_fileBoolean—
new_fileBoolean—
new_pathStringExample: doc/update/5.4-to-6.0.md
old_pathStringExample: doc/update/5.4-to-6.0.md
renamed_fileBoolean—
too_largeBoolean—

APIEntitiesDiffRefs

PropertyTypeDescription
base_shaStringExample: b83d6e391c22777fca1ed3012fce84f633d7fed0
head_shaStringExample: b83d6e391c22777fca1ed3012fce84f633d7fed0
start_shaStringExample: b83d6e391c22777fca1ed3012fce84f633d7fed0

APIEntitiesIssuableReferences

PropertyTypeDescription
fullStringExample: test&6
relativeStringExample: &6
shortStringExample: &6

APIEntitiesIssuableTimeStats

PropertyTypeDescription
human_time_estimateStringExample: 3h 30m
human_total_time_spentStringExample: 1h
time_estimateIntegerExample: 12600
total_time_spentIntegerExample: 3600

APIEntitiesMergeRequest

PropertyTypeDescription
allow_collaborationBoolean—
allow_maintainer_to_pushBoolean—
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
blocking_discussions_resolvedBoolean—
changes_countStringExample: 1
closed_atString (date-time)Example: 2022-01-31T15:10:45.080Z
closed_byAPIEntitiesUserBasic—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
description_htmlString—
detailed_merge_statusStringExample: mergeable
diff_refsAPIEntitiesDiffRefs—
discussion_lockedBoolean—
diverged_commits_countIntegerExample: 0
downvotesInteger—
draftBoolean—
first_contributionBoolean—
first_deployed_to_production_atString (date-time)Example: 2022-01-31T15:10:45.080Z
force_remove_source_branchBoolean—
has_conflictsBoolean—
head_pipelineAPIEntitiesCiPipeline—
idInteger (int64)Example: 84
iidIntegerExample: 14
importedBoolean—
imported_fromStringExample: bitbucket
labelsArray of strings—
latest_build_finished_atString (date-time)Example: 2022-01-31T15:10:45.080Z
latest_build_started_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_afterString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_commit_shaStringExample: 1234abcd
merge_errorStringExample: Merge error
merge_statusStringExample: unchecked
merge_userAPIEntitiesUserBasic—
merge_when_pipeline_succeedsBoolean—
merged_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merged_byAPIEntitiesUserBasic—
milestoneAPIEntitiesMilestone—
pipelineAPIEntitiesCiPipelineBasic—
prepared_atString (date-time)Example: 2022-01-31T15:10:45.080Z
project_idInteger (int64)Example: 4
rebase_in_progressBoolean—
referenceStringExample: !1
referencesAPIEntitiesIssuableReferences—
reviewersAPIEntitiesUserBasic—
shaStringExample: 1234abcd
should_remove_source_branchBoolean—
source_branchString—
source_project_idInteger (int64)—
squashBoolean—
squash_commit_shaStringExample: 1234abcd
squash_on_mergeBoolean—
stateStringExample: closed
subscribedBoolean—
target_branchString—
target_project_idInteger (int64)—
task_completion_statusAPIEntitiesTaskCompletionStatus—
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
title_htmlString—
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
userObject—
user.can_mergeBoolean—
user_notes_countInteger—
web_urlStringExample: https://gitlab.example.com/my-group/my-project/-/merge_requests/1
work_in_progressBoolean—

APIEntitiesMergeRequestBasic

PropertyTypeDescription
allow_collaborationBoolean—
allow_maintainer_to_pushBoolean—
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
blocking_discussions_resolvedBoolean—
closed_atString (date-time)Example: 2022-01-31T15:10:45.080Z
closed_byAPIEntitiesUserBasic—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
description_htmlString—
detailed_merge_statusStringExample: mergeable
discussion_lockedBoolean—
downvotesInteger—
draftBoolean—
force_remove_source_branchBoolean—
has_conflictsBoolean—
idInteger (int64)Example: 84
iidIntegerExample: 14
importedBoolean—
imported_fromStringExample: bitbucket
labelsArray of strings—
merge_afterString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_commit_shaStringExample: 1234abcd
merge_statusStringExample: unchecked
merge_userAPIEntitiesUserBasic—
merge_when_pipeline_succeedsBoolean—
merged_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merged_byAPIEntitiesUserBasic—
milestoneAPIEntitiesMilestone—
prepared_atString (date-time)Example: 2022-01-31T15:10:45.080Z
project_idInteger (int64)Example: 4
referenceStringExample: !1
referencesAPIEntitiesIssuableReferences—
reviewersAPIEntitiesUserBasic—
shaStringExample: 1234abcd
should_remove_source_branchBoolean—
source_branchString—
source_project_idInteger (int64)—
squashBoolean—
squash_commit_shaStringExample: 1234abcd
squash_on_mergeBoolean—
stateStringExample: closed
target_branchString—
target_project_idInteger (int64)—
task_completion_statusAPIEntitiesTaskCompletionStatus—
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
title_htmlString—
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
user_notes_countInteger—
web_urlStringExample: https://gitlab.example.com/my-group/my-project/-/merge_requests/1
work_in_progressBoolean—

APIEntitiesMergeRequestChanges

PropertyTypeDescription
allow_collaborationBoolean—
allow_maintainer_to_pushBoolean—
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
blocking_discussions_resolvedBoolean—
changesArray of APIEntitiesDiff—
changes_countStringExample: 1
closed_atString (date-time)Example: 2022-01-31T15:10:45.080Z
closed_byAPIEntitiesUserBasic—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
description_htmlString—
detailed_merge_statusStringExample: mergeable
diff_refsAPIEntitiesDiffRefs—
discussion_lockedBoolean—
diverged_commits_countIntegerExample: 0
downvotesInteger—
draftBoolean—
first_contributionBoolean—
first_deployed_to_production_atString (date-time)Example: 2022-01-31T15:10:45.080Z
force_remove_source_branchBoolean—
has_conflictsBoolean—
head_pipelineAPIEntitiesCiPipeline—
idInteger (int64)Example: 84
iidIntegerExample: 14
importedBoolean—
imported_fromStringExample: bitbucket
labelsArray of strings—
latest_build_finished_atString (date-time)Example: 2022-01-31T15:10:45.080Z
latest_build_started_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_afterString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_commit_shaStringExample: 1234abcd
merge_errorStringExample: Merge error
merge_statusStringExample: unchecked
merge_userAPIEntitiesUserBasic—
merge_when_pipeline_succeedsBoolean—
merged_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merged_byAPIEntitiesUserBasic—
milestoneAPIEntitiesMilestone—
overflowBoolean—
pipelineAPIEntitiesCiPipelineBasic—
prepared_atString (date-time)Example: 2022-01-31T15:10:45.080Z
project_idInteger (int64)Example: 4
rebase_in_progressBoolean—
referenceStringExample: !1
referencesAPIEntitiesIssuableReferences—
reviewersAPIEntitiesUserBasic—
shaStringExample: 1234abcd
should_remove_source_branchBoolean—
source_branchString—
source_project_idInteger (int64)—
squashBoolean—
squash_commit_shaStringExample: 1234abcd
squash_on_mergeBoolean—
stateStringExample: closed
subscribedBoolean—
target_branchString—
target_project_idInteger (int64)—
task_completion_statusAPIEntitiesTaskCompletionStatus—
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
title_htmlString—
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
userObject—
user.can_mergeBoolean—
user_notes_countInteger—
web_urlStringExample: https://gitlab.example.com/my-group/my-project/-/merge_requests/1
work_in_progressBoolean—

APIEntitiesMergeRequestDiff

PropertyTypeDescription
base_commit_shaStringExample: 1234abcd
created_atString (date-time)Example: 2022-01-31T15:10:45.080Z
head_commit_shaStringExample: 1234abcd
idInteger (int64)Example: 1
merge_request_idInteger (int64)Example: 1
patch_id_shaStringExample: 1234abcd
real_sizeStringExample: 1
start_commit_shaStringExample: 1234abcd
stateStringExample: collected

APIEntitiesMergeRequestDiffFull

PropertyTypeDescription
base_commit_shaStringExample: 1234abcd
commitsArray of APIEntitiesCommit—
created_atString (date-time)Example: 2022-01-31T15:10:45.080Z
diffsArray of APIEntitiesDiff—
head_commit_shaStringExample: 1234abcd
idInteger (int64)Example: 1
merge_request_idInteger (int64)Example: 1
patch_id_shaStringExample: 1234abcd
real_sizeStringExample: 1
start_commit_shaStringExample: 1234abcd
stateStringExample: collected

APIEntitiesMergeRequestReviewer

PropertyTypeDescription
created_atString (date-time)Example: 2022-01-31T15:10:45.080Z
stateStringExample: unreviewed
userAPIEntitiesUserBasic—

APIEntitiesMilestone

PropertyTypeDescription
created_atString—
descriptionString—
due_dateString—
expiredBoolean—
group_idString—
idInteger (int64)—
iidInteger (int64)—
project_idInteger (int64)—
start_dateString—
stateString—
titleString—
updated_atString—
web_urlString—

APIEntitiesMRNote

PropertyTypeDescription
authorAPIEntitiesUserBasic—
noteStringExample: LGTM!

APIEntitiesTaskCompletionStatus

PropertyTypeDescription
completed_countIntegerExample: 3
countIntegerExample: 5

APIEntitiesUserBasic

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringExample: https://gravatar.com/avatar/1
custom_attributesArray of APIEntitiesCustomAttribute—
idInteger (int64)Example: 1
lockedBoolean—
nameStringExample: Administrator
public_emailStringExample: john@example.com
stateStringExample: active
usernameStringExample: admin
web_urlStringExample: https://gitlab.example.com/root

DetailedStatusEntity

PropertyTypeDescription
actionObject—
action.button_titleStringExample: Cancel this job
action.confirmation_messageStringExample: Are you sure?
action.iconStringExample: cancel
action.methodStringExample: post
action.pathStringExample: /namespace1/project1/-/jobs/2/cancel
action.titleStringExample: Cancel
details_pathStringExample: /test-group/test-project/-/pipelines/287
faviconStringExample: /assets/ci_favicons/favicon_status_success.png
groupStringExample: success
has_detailsBooleanExample: true
iconStringExample: status_success
illustrationObjectExample: {"content":"This job depends on upstream jobs that need to succeed in order for this job to be triggered","image":"illustrations/empty-state/empty-job-not-triggered-md.svg","size":"","title":"This job has not been triggered yet"}
labelStringExample: passed
textStringExample: passed
tooltipStringExample: passed