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
StringID or URL-encoded path of the group
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
StringFilter merge requests by state
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
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
with_labels_details
Query
BooleanIf true, the response returns more details for each label in the 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) an asynchronous recalculation of the merge_status field. Enable the restrict_merge_status_recheck feature flag to ignore this attribute when requested by users without the Developer, Maintainer, or Owner role
Default: false
created_after
Query
String (date-time)Return merge requests created on or after the specified time
Example: 2019-03-15T08:00:00Z
created_before
Query
String (date-time)Return merge requests created on or before the specified time
Example: 2019-03-15T08:00:00Z
updated_after
Query
String (date-time)Return merge requests updated on or after the specified time
Example: 2019-03-15T08:00:00Z
updated_before
Query
String (date-time)Return merge requests updated on or before the specified time
Example: 2019-03-15T08:00:00Z
merged_after
Query
String (date-time)Return merge requests merged on or after the specified time
Example: 2019-03-15T08:00:00Z
merged_before
Query
String (date-time)Return merge requests merged on or before the specified time
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
StringReturn merge requests for the given scope. reviews_for_me returns merge requests where the current user is assigned as a reviewer
Allowed values: created-by-me, assigned-to-me, created_by_me, assigned_to_me, reviews_for_me, all
source_branch
Query
StringReturn merge requests with the given source branch
source_project_id
Query
IntegerReturn merge requests with the given source project ID
target_branch
Query
StringReturn merge requests with the given target branch
search
Query
StringSearch merge requests against their title and description. Combine with the in attribute
in
Query
StringModify the scope of the search attribute to title, description, or title,description. If omitted, defaults to title,description
Example: title,description
wip
Query
StringFilter merge requests by their wip status. yes returns only draft merge requests, no returns non-draft merge requests. Deprecated in GitLab 19.0. Use draft instead. Mutually exclusive with draft
Allowed values: yes, no
draft
Query
BooleanIf true, returns only draft merge requests. If false, returns only non-draft merge requests. Mutually exclusive with wip
not
Query
ObjectReturn merge requests that do not match the parameters supplied. Accepts: labels, milestone, author_id, author_username, assignee_id, assignee_username, reviewer_id, reviewer_username, my_reaction_emoji
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)Return merge requests deployed before the specified time
Example: 2019-03-15T08:00:00Z
deployed_after
Query
String (date-time)Return merge requests deployed after the specified time
Example: 2019-03-15T08:00:00Z
environment
Query
StringReturn 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
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
non_archived
Query
BooleanIf true, returns merge requests from non-archived projects only
Default: true

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesMergeRequestBasic
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
StringFilter merge requests by state
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
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
with_labels_details
Query
BooleanIf true, the response returns more details for each label in the 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) an asynchronous recalculation of the merge_status field. Enable the restrict_merge_status_recheck feature flag to ignore this attribute when requested by users without the Developer, Maintainer, or Owner role
Default: false
created_after
Query
String (date-time)Return merge requests created on or after the specified time
Example: 2019-03-15T08:00:00Z
created_before
Query
String (date-time)Return merge requests created on or before the specified time
Example: 2019-03-15T08:00:00Z
updated_after
Query
String (date-time)Return merge requests updated on or after the specified time
Example: 2019-03-15T08:00:00Z
updated_before
Query
String (date-time)Return merge requests updated on or before the specified time
Example: 2019-03-15T08:00:00Z
merged_after
Query
String (date-time)Return merge requests merged on or after the specified time
Example: 2019-03-15T08:00:00Z
merged_before
Query
String (date-time)Return merge requests merged on or before the specified time
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
StringReturn merge requests for the given scope. reviews_for_me returns merge requests where the current user is assigned as a reviewer
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
StringReturn merge requests with the given source branch
source_project_id
Query
IntegerReturn merge requests with the given source project ID
target_branch
Query
StringReturn merge requests with the given target branch
search
Query
StringSearch merge requests against their title and description. Combine with the in attribute
in
Query
StringModify the scope of the search attribute to title, description, or title,description. If omitted, defaults to title,description
Example: title,description
wip
Query
StringFilter merge requests by their wip status. yes returns only draft merge requests, no returns non-draft merge requests. Deprecated in GitLab 19.0. Use draft instead. Mutually exclusive with draft
Allowed values: yes, no
draft
Query
BooleanIf true, returns only draft merge requests. If false, returns only non-draft merge requests. Mutually exclusive with wip
not
Query
ObjectReturn merge requests that do not match the parameters supplied. Accepts: labels, milestone, author_id, author_username, assignee_id, assignee_username, reviewer_id, reviewer_username, my_reaction_emoji
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)Return merge requests deployed before the specified time
Example: 2019-03-15T08:00:00Z
deployed_after
Query
String (date-time)Return merge requests deployed after the specified time
Example: 2019-03-15T08:00:00Z
environment
Query
StringReturn 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
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
non_archived
Query
BooleanIf true, returns merge requests from non-archived projects only
Default: false

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesMergeRequestBasic
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 integerID 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
StringFilter merge requests by state
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
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
with_labels_details
Query
BooleanIf true, the response returns more details for each label in the 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) an asynchronous recalculation of the merge_status field. Enable the restrict_merge_status_recheck feature flag to ignore this attribute when requested by users without the Developer, Maintainer, or Owner role
Default: false
created_after
Query
String (date-time)Return merge requests created on or after the specified time
Example: 2019-03-15T08:00:00Z
created_before
Query
String (date-time)Return merge requests created on or before the specified time
Example: 2019-03-15T08:00:00Z
updated_after
Query
String (date-time)Return merge requests updated on or after the specified time
Example: 2019-03-15T08:00:00Z
updated_before
Query
String (date-time)Return merge requests updated on or before the specified time
Example: 2019-03-15T08:00:00Z
merged_after
Query
String (date-time)Return merge requests merged on or after the specified time
Example: 2019-03-15T08:00:00Z
merged_before
Query
String (date-time)Return merge requests merged on or before the specified time
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
StringReturn merge requests for the given scope. reviews_for_me returns merge requests where the current user is assigned as a reviewer
Allowed values: created-by-me, assigned-to-me, created_by_me, assigned_to_me, reviews_for_me, all
source_branch
Query
StringReturn merge requests with the given source branch
source_project_id
Query
IntegerReturn merge requests with the given source project ID
target_branch
Query
StringReturn merge requests with the given target branch
search
Query
StringSearch merge requests against their title and description. Combine with the in attribute
in
Query
StringModify the scope of the search attribute to title, description, or title,description. If omitted, defaults to title,description
Example: title,description
wip
Query
StringFilter merge requests by their wip status. yes returns only draft merge requests, no returns non-draft merge requests. Deprecated in GitLab 19.0. Use draft instead. Mutually exclusive with draft
Allowed values: yes, no
draft
Query
BooleanIf true, returns only draft merge requests. If false, returns only non-draft merge requests. Mutually exclusive with wip
not
Query
ObjectReturn merge requests that do not match the parameters supplied. Accepts: labels, milestone, author_id, author_username, assignee_id, assignee_username, reviewer_id, reviewer_username, my_reaction_emoji
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)Return merge requests deployed before the specified time
Example: 2019-03-15T08:00:00Z
deployed_after
Query
String (date-time)Return merge requests deployed after the specified time
Example: 2019-03-15T08:00:00Z
environment
Query
StringReturn 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
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
iids
Query
Array of integersReturn merge requests matching the provided internal IDs

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesMergeRequestBasic
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 integerID or URL-encoded path of the project

Request body (application/json)

PropertyTypeDescription
add_labelsArray of stringsComma-separated label names to add to the merge request. If a label does not already exist, this creates a new project label and assigns it to the merge request
allow_collaborationBooleanIf true, allows commits from members who can merge to the target branch
allow_maintainer_to_pushBooleanIf true, allows commits from members who can merge to the target branch. Deprecated. Use allow_collaboration instead
assignee_idIntegerID of the user to assign to the merge request. Set to 0 or leave empty to unassign all assignees
assignee_idsArray of integersIDs of the users to assign to the merge request, as a comma-separated list. Set to 0 or leave empty to unassign all assignees
descriptionStringDescription of the merge request. Limited to 1,048,576 characters
labelsArray of stringsComma-separated label names for the merge request. If a label does not already exist, this creates a new project label and assigns it to the merge request. Set to an empty string to unassign all labels
merge_afterStringDate after which the merge request can be merged. Introduced in GitLab 17.8
milestoneStringThe title of a project or ancestor-group milestone to assign the merge request to. Mutually exclusive with milestone_id
Maximum length: 255
milestone_idIntegerGlobal ID of a milestone to assign to the merge request. Set to 0 or leave empty to unassign the milestone. Mutually exclusive with milestone
remove_labelsArray of stringsComma-separated label names to remove from the merge request
remove_source_branchBooleanIf true, the source branch is removed when the merge request merges
reviewer_idsArray of integersIDs of the users to set as reviewers of the merge request, as a comma-separated list. If set to 0 or left empty, no reviewers are set
source_branch
Required
StringSource branch
squashBooleanIf true, squashes all commits into a single commit on merge. When omitted, defaults to the project’s squash option setting, which can override this value at merge time
target_branch
Required
StringTarget branch
target_project_idIntegerID of the target project for the merge request. If omitted, defaults to the source project
title
Required
StringTitle 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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal ID of the merge request
render_html
Query
BooleanIf true, the response includes rendered HTML for title and description
include_diverged_commits_count
Query
BooleanIf true, the response includes the commits behind the target branch
include_rebase_in_progress
Query
BooleanIf true, the 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 integerID 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 the merge request. If a label does not already exist, this creates a new project label and assigns it to the merge request. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
allow_collaborationBooleanIf true, allows commits from members who can merge to the target branch. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
allow_maintainer_to_pushBooleanIf true, allows commits from members who can merge to the target branch. Deprecated. Use allow_collaboration instead. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
assignee_idIntegerID of the user to assign to the merge request. Set to 0 or leave empty to unassign all assignees. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
assignee_idsArray of integersIDs of the users to assign to the merge request, as a comma-separated list. Set to 0 or leave empty to unassign all assignees. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
descriptionStringDescription of the merge request. Limited to 1,048,576 characters. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
discussion_lockedBooleanIf true, locks the merge request’s discussion so only project members can add, edit, or resolve comments. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
labelsArray of stringsComma-separated label names for the merge request. If a label does not already exist, this creates a new project label and assigns it to the merge request. Set to an empty string to unassign all labels. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
merge_afterStringDate after which the merge request can be merged. Introduced in GitLab 17.8. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
milestoneStringThe title of a project or ancestor-group milestone to assign the merge request to. Mutually exclusive with milestone_id. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
Maximum length: 255
milestone_idIntegerGlobal ID of a milestone to assign to the merge request. Set to 0 or leave empty to unassign the milestone. Mutually exclusive with milestone. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
remove_labelsArray of stringsComma-separated label names to remove from the merge request. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
remove_source_branchBooleanIf true, the source branch is removed when the merge request merges. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
reviewer_idsArray of integersIDs of the users to set as reviewers of the merge request, as a comma-separated list. If set to 0 or left empty, no reviewers are set. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
squashBooleanIf true, squashes all commits into a single commit on merge. When omitted, defaults to the project’s squash option setting, which can override this value at merge time. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
state_eventStringEvent to change the state of the merge request. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
Allowed values: close, reopen
target_branchStringTarget branch. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided
titleStringTitle of the merge request. At least one of assignee_id, assignee_ids, reviewer_ids, description, labels, add_labels, remove_labels, milestone_id, milestone, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked, merge_after must be provided

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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal 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 integerID 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 auto merge

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

Cancels an automatic merge for a merge request that has been set to merge automatically. Use this endpoint instead of cancel_merge_when_pipeline_succeeds, which returns a status hash rather than the merge request.

Parameters

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

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMergeRequest
400Bad Request—
403Forbidden—
404Not found—
409Conflict—

Cancel merge when pipeline succeeds (deprecated)

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. This endpoint does not return the merge request. Deprecated in GitLab 19.5. Use POST /projects/:id/merge_requests/:merge_request_iid/cancel_auto_merge instead.

Parameters

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

Responses

CodeDescriptionSchema
201The status field of the response body is success when an auto-merge was canceled, and error when the merge request had none set—
400Bad Request—
401Unauthorized—
404Not found—
405Method not allowed—

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 integerID or URL-encoded path of the project
unidiff
Query
BooleanIf true, presents diffs in the 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 integerID or URL-encoded path of the project
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesMRNote
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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal ID of the merge request
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesCommit
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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesCommitWithLink
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 integerID 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 stringsContext commits’ SHAs

Responses

CodeDescriptionSchema
201CreatedArray of APIEntitiesCommit
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 integerID or URL-encoded path of the project
commits
Query, required
Array of stringsContext commits’ SHAs
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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal ID of the merge request
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
unidiff
Query
BooleanIf true, presents diffs in the unified diff format
Default: false

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesDiff
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 integerID 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 merges when checks pass
merge_commit_messageStringCustom merge commit message
merge_when_pipeline_succeedsBooleanIf true, merges the merge request automatically once the pipeline succeeds. Deprecated in GitLab 17.11. Use auto_merge instead
shaStringSHA that must match the HEAD of the source branch, otherwise the merge fails. Use to ensure that only reviewed commits are merged. Required if the require a commit SHA on the merge requests API setting is enabled for the group or instance
should_remove_source_branchBooleanIf true, removes the source branch
skip_merge_trainBooleanIf true, avoids restarting the merge train when merging immediately
squashBooleanIf true, squashes all commits 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 integerID 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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesUserBasic
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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal ID of the merge request

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesCiPipelineBasic
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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
asyncBooleanIf true, creates the merge request pipeline asynchronously outside the API request, returning an empty response with a 202 status code. Pipeline creation can still fail after a 202 response
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 integerID 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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Request body (application/json)

PropertyTypeDescription
skip_ciBooleanIf true, skips 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 integerID or URL-encoded path of the project
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list 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 integerID 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 integerID 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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesMergeRequestReviewer
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 integerID 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 integerID 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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal ID of the merge request
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesMergeRequestDiff
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 integerID or URL-encoded path of the project
merge_request_iid
Path, required
IntegerInternal ID of the merge request
version_id
Path, required
IntegerID of the merge request diff version
unidiff
Query
BooleanIf true, presents diffs in the 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
PropertyTypeDescription
authorAPIEntitiesUserPath—
author_emailStringExample: john@example.com
author_gravatar_urlStringExample: https://www.gravatar.com/avatar/abc
author_nameStringExample: John Smith
authored_dateString (date-time)Example: 2012-05-28T04:42:42-07:00
commit_pathStringExample: /project/-/commit/abc
commit_urlStringExample: https://gitlab.example.com/project/-/commit/abc
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
description_htmlStringExample: <p>description</p>
extended_trailersObjectExample: {"Signed-off-by":["John Doe \u003cjohndoe@gitlab.com\u003e","Jane Doe \u003cjanedoe@gitlab.com\u003e"]}
idStringExample: 2695effb5807a22ff3d138d593fd856244e155e7
messageStringExample: Initial commit
next_commit_idStringExample: 2695effb5807a22ff3d138d593fd856244e155e7
parent_idsArray of stringsExample: ["2a4b78934375d7f53875269ffd4f45fd83a84ebe"]
pipeline_status_pathStringExample: /project/pipelines/1
prev_commit_idStringExample: 2695effb5807a22ff3d138d593fd856244e155e7
short_idStringExample: 2695effb
signature_htmlStringExample: <p>signature</p>
titleStringExample: Initial commit
title_htmlStringExample: <p>title</p>
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—
authorAPIEntitiesMergeRequestAuthor—
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—

APIEntitiesMergeRequestAuthor

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringExample: https://gravatar.com/avatar/1
botBooleanExample: false
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

APIEntitiesMergeRequestBasic

PropertyTypeDescription
allow_collaborationBoolean—
allow_maintainer_to_pushBoolean—
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesMergeRequestAuthor—
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—
authorAPIEntitiesMergeRequestAuthor—
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

APIEntitiesUserPath

PropertyTypeDescription
availabilityString—
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
pathString—
public_emailStringExample: john@example.com
show_statusString—
stateStringExample: active
status_tooltip_htmlString—
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