|
|
|
|
@ -36,40 +36,40 @@ GET /merge_requests?scope=assigned_to_me
|
|
|
|
|
GET /merge_requests?search=foo&in=title
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
| ------------------------------- | -------------- | -------- | ----------- |
|
|
|
|
|
| `approved_by_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have been approved by all the users with the given `id`. Maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approver_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
|
|
|
|
|
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
|
|
|
|
|
| `author_id` | integer | no | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. Combine with `scope=all` or `scope=assigned_to_me`. |
|
|
|
|
|
| `author_username` | string | no | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
|
|
|
|
|
| `created_after` | datetime | no | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `created_before` | datetime | no | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `deployed_after` | datetime | no | Return merge requests deployed after the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `deployed_before` | datetime | no | Return merge requests deployed before the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `environment` | string | no | Returns merge requests deployed to the given environment. |
|
|
|
|
|
| `in` | string | no | Modify the scope of the `search` attribute. `title`, `description`, or a string joining them with comma. Default is `title,description`. |
|
|
|
|
|
| `labels` | string | no | Return 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` | string | no | Return 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` | string | no | Return 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` | Hash | no | Return 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`. |
|
|
|
|
|
| `order_by` | string | no | Return requests ordered by `created_at`, `title`, or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8.|
|
|
|
|
|
| `reviewer_id` | integer | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#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`. |
|
|
|
|
|
| `reviewer_username` | string | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. Defaults to `created_by_me`. |
|
|
|
|
|
| `search` | string | no | Search merge requests against their `title` and `description`. |
|
|
|
|
|
| `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc`. |
|
|
|
|
|
| `source_branch` | string | no | Return merge requests with the given source branch. |
|
|
|
|
|
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
|
|
|
|
|
| `target_branch` | string | no | Return merge requests with the given target branch. |
|
|
|
|
|
| `updated_after` | datetime | no | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `updated_before` | datetime | no | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
|
|
|
|
|
| `with_labels_details` | boolean | no | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
|
|
|
|
|
| `with_merge_status_recheck` | boolean | no | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
|
|
|
|
|
| `wip` | string | no | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. |
|
|
|
|
|
| `approved_by_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `id`. Maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approver_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
|
|
|
|
|
| `assignee_id` | integer | **{dotted-circle}** No | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
|
|
|
|
|
| `author_id` | integer | **{dotted-circle}** No | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. Combine with `scope=all` or `scope=assigned_to_me`. |
|
|
|
|
|
| `author_username` | string | **{dotted-circle}** No | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
|
|
|
|
|
| `created_after` | datetime | **{dotted-circle}** No | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `created_before` | datetime | **{dotted-circle}** No | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `deployed_after` | datetime | **{dotted-circle}** No | Return merge requests deployed after the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `deployed_before` | datetime | **{dotted-circle}** No | Return merge requests deployed before the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `environment` | string | **{dotted-circle}** No | Returns merge requests deployed to the given environment. |
|
|
|
|
|
| `in` | string | **{dotted-circle}** No | Modify the scope of the `search` attribute. `title`, `description`, or a string joining them with comma. Default is `title,description`. |
|
|
|
|
|
| `labels` | string | **{dotted-circle}** No | Return 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` | string | **{dotted-circle}** No | Return 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` | string | **{dotted-circle}** No | Return 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` | Hash | **{dotted-circle}** No | Return 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`. |
|
|
|
|
|
| `order_by` | string | **{dotted-circle}** No | Return requests ordered by `created_at`, `title`, or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8.|
|
|
|
|
|
| `reviewer_id` | integer | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#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`. |
|
|
|
|
|
| `reviewer_username` | string | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `scope` | string | **{dotted-circle}** No | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. Defaults to `created_by_me`. |
|
|
|
|
|
| `search` | string | **{dotted-circle}** No | Search merge requests against their `title` and `description`. |
|
|
|
|
|
| `sort` | string | **{dotted-circle}** No | Return requests sorted in `asc` or `desc` order. Default is `desc`. |
|
|
|
|
|
| `source_branch` | string | **{dotted-circle}** No | Return merge requests with the given source branch. |
|
|
|
|
|
| `state` | string | **{dotted-circle}** No | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
|
|
|
|
|
| `target_branch` | string | **{dotted-circle}** No | Return merge requests with the given target branch. |
|
|
|
|
|
| `updated_after` | datetime | **{dotted-circle}** No | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `updated_before` | datetime | **{dotted-circle}** No | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `view` | string | **{dotted-circle}** No | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
|
|
|
|
|
| `with_labels_details` | boolean | **{dotted-circle}** No | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
|
|
|
|
|
| `with_merge_status_recheck` | boolean | **{dotted-circle}** No | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
|
|
|
|
|
| `wip` | string | **{dotted-circle}** No | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -237,39 +237,39 @@ are the same. In the case of a merge request from a fork,
|
|
|
|
|
`target_project_id` and `project_id` are the same and
|
|
|
|
|
`source_project_id` is the fork project's ID.
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
| ------------------------------- | -------------- | -------- | ----------- |
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `approved_by_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approver_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
|
|
|
|
|
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
|
|
|
|
|
| `author_id` | integer | no | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. |
|
|
|
|
|
| `author_username` | string | no | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
|
|
|
|
|
| `created_after` | datetime | no | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `created_before` | datetime | no | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `environment` | string | no | Returns merge requests deployed to the given environment. |
|
|
|
|
|
| `iids[]` | integer array | no | Return the request having the given `iid`. |
|
|
|
|
|
| `labels` | string | no | Return 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` | string | no | Return 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` | string | no | Return 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` | Hash | no | Return 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`. |
|
|
|
|
|
| `order_by` | string | no | Return requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. |
|
|
|
|
|
| `reviewer_id` | integer | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#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`. |
|
|
|
|
|
| `reviewer_username` | string | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me`, or `all`. |
|
|
|
|
|
| `search` | string | no | Search merge requests against their `title` and `description`. |
|
|
|
|
|
| `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc`. |
|
|
|
|
|
| `source_branch` | string | no | Return merge requests with the given source branch. |
|
|
|
|
|
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
|
|
|
|
|
| `target_branch` | string | no | Return merge requests with the given target branch. |
|
|
|
|
|
| `updated_after` | datetime | no | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `updated_before` | datetime | no | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
|
|
|
|
|
| `wip` | string | no | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. |
|
|
|
|
|
| `with_labels_details` | boolean | no | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
|
|
|
|
|
| `with_merge_status_recheck` | boolean | no | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `approved_by_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approver_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
|
|
|
|
|
| `assignee_id` | integer | **{dotted-circle}** No | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
|
|
|
|
|
| `author_id` | integer | **{dotted-circle}** No | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. |
|
|
|
|
|
| `author_username` | string | **{dotted-circle}** No | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
|
|
|
|
|
| `created_after` | datetime | **{dotted-circle}** No | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `created_before` | datetime | **{dotted-circle}** No | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `environment` | string | **{dotted-circle}** No | Returns merge requests deployed to the given environment. |
|
|
|
|
|
| `iids[]` | integer array | **{dotted-circle}** No | Return the request having the given `iid`. |
|
|
|
|
|
| `labels` | string | **{dotted-circle}** No | Return 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` | string | **{dotted-circle}** No | Return 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` | string | **{dotted-circle}** No | Return 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` | Hash | **{dotted-circle}** No | Return 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`. |
|
|
|
|
|
| `order_by` | string | **{dotted-circle}** No | Return requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. |
|
|
|
|
|
| `reviewer_id` | integer | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#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`. |
|
|
|
|
|
| `reviewer_username` | string | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `scope` | string | **{dotted-circle}** No | Return merge requests for the given scope: `created_by_me`, `assigned_to_me`, or `all`. |
|
|
|
|
|
| `search` | string | **{dotted-circle}** No | Search merge requests against their `title` and `description`. |
|
|
|
|
|
| `sort` | string | **{dotted-circle}** No | Return requests sorted in `asc` or `desc` order. Default is `desc`. |
|
|
|
|
|
| `source_branch` | string | **{dotted-circle}** No | Return merge requests with the given source branch. |
|
|
|
|
|
| `state` | string | **{dotted-circle}** No | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
|
|
|
|
|
| `target_branch` | string | **{dotted-circle}** No | Return merge requests with the given target branch. |
|
|
|
|
|
| `updated_after` | datetime | **{dotted-circle}** No | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `updated_before` | datetime | **{dotted-circle}** No | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `view` | string | **{dotted-circle}** No | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
|
|
|
|
|
| `wip` | string | **{dotted-circle}** No | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. |
|
|
|
|
|
| `with_labels_details` | boolean | **{dotted-circle}** No | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
|
|
|
|
|
| `with_merge_status_recheck` | boolean | **{dotted-circle}** No | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -425,38 +425,38 @@ GET /groups/:id/merge_requests?my_reaction_emoji=star
|
|
|
|
|
|
|
|
|
|
`group_id` represents the ID of the group which contains the project where the MR resides.
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
| ------------------------------- | -------------- | -------- | ----------- |
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `approved_by_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approved_by_usernames` **(PREMIUM)** | string array | no | Returns merge requests which have been approved by all the users with the given `username`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approver_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have specified all the users with the given `id`s as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
|
|
|
|
|
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
|
|
|
|
|
| `author_id` | integer | no | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. |
|
|
|
|
|
| `author_username` | string | no | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
|
|
|
|
|
| `created_after` | datetime | no | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `created_before` | datetime | no | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `labels` | string | no | Return 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` | string | no | Return 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` | string | no | Return 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. |
|
|
|
|
|
| `non_archived` | boolean | no | Return merge requests from non archived projects only. Default is `true`. |
|
|
|
|
|
| `not` | Hash | no | Return 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`. |
|
|
|
|
|
| `order_by` | string | no | Return merge requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. |
|
|
|
|
|
| `reviewer_id` | integer | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#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`. |
|
|
|
|
|
| `reviewer_username` | string | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. |
|
|
|
|
|
| `search` | string | no | Search merge requests against their `title` and `description`. |
|
|
|
|
|
| `source_branch` | string | no | Return merge requests with the given source branch. |
|
|
|
|
|
| `sort` | string | no | Return merge requests sorted in `asc` or `desc` order. Default is `desc`. |
|
|
|
|
|
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
|
|
|
|
|
| `target_branch` | string | no | Return merge requests with the given target branch. |
|
|
|
|
|
| `updated_after` | datetime | no | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `updated_before` | datetime | no | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
|
|
|
|
|
| `with_labels_details` | boolean | no | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
|
|
|
|
|
| `with_merge_status_recheck` | boolean | no | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `approved_by_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approved_by_usernames` **(PREMIUM)** | string array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `username`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
|
|
|
|
|
| `approver_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have specified all the users with the given `id`s as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
|
|
|
|
|
| `assignee_id` | integer | **{dotted-circle}** No | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
|
|
|
|
|
| `author_id` | integer | **{dotted-circle}** No | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. |
|
|
|
|
|
| `author_username` | string | **{dotted-circle}** No | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
|
|
|
|
|
| `created_after` | datetime | **{dotted-circle}** No | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `created_before` | datetime | **{dotted-circle}** No | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `labels` | string | **{dotted-circle}** No | Return 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` | string | **{dotted-circle}** No | Return 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` | string | **{dotted-circle}** No | Return 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. |
|
|
|
|
|
| `non_archived` | boolean | **{dotted-circle}** No | Return merge requests from non archived projects only. Default is `true`. |
|
|
|
|
|
| `not` | Hash | **{dotted-circle}** No | Return 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`. |
|
|
|
|
|
| `order_by` | string | **{dotted-circle}** No | Return merge requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. |
|
|
|
|
|
| `reviewer_id` | integer | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#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`. |
|
|
|
|
|
| `reviewer_username` | string | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `scope` | string | **{dotted-circle}** No | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. |
|
|
|
|
|
| `search` | string | **{dotted-circle}** No | Search merge requests against their `title` and `description`. |
|
|
|
|
|
| `source_branch` | string | **{dotted-circle}** No | Return merge requests with the given source branch. |
|
|
|
|
|
| `sort` | string | **{dotted-circle}** No | Return merge requests sorted in `asc` or `desc` order. Default is `desc`. |
|
|
|
|
|
| `state` | string | **{dotted-circle}** No | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
|
|
|
|
|
| `target_branch` | string | **{dotted-circle}** No | Return merge requests with the given target branch. |
|
|
|
|
|
| `updated_after` | datetime | **{dotted-circle}** No | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `updated_before` | datetime | **{dotted-circle}** No | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
|
|
|
|
| `view` | string | **{dotted-circle}** No | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
|
|
|
|
|
| `with_labels_details` | boolean | **{dotted-circle}** No | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
|
|
|
|
|
| `with_merge_status_recheck` | boolean | **{dotted-circle}** No | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -606,15 +606,15 @@ it is capped at 1,000. In that case, the API returns the string
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|----------------------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `include_diverged_commits_count` | boolean | no | If `true`, response includes the commits behind the target branch. |
|
|
|
|
|
| `include_rebase_in_progress` | boolean | no | If `true`, response includes whether a rebase operation is in progress. |
|
|
|
|
|
| `render_html` | boolean | no | If `true`, response includes rendered HTML for title and description. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `include_diverged_commits_count` | boolean | **{dotted-circle}** No | If `true`, response includes the commits behind the target branch. |
|
|
|
|
|
| `include_rebase_in_progress` | boolean | **{dotted-circle}** No | If `true`, response includes whether a rebase operation is in progress. |
|
|
|
|
|
| `render_html` | boolean | **{dotted-circle}** No | If `true`, response includes rendered HTML for title and description. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
@ -795,12 +795,12 @@ Get a list of merge request participants.
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid/participants
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -831,12 +831,12 @@ Get a list of merge request reviewers.
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid/reviewers
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -875,12 +875,12 @@ Get a list of merge request commits.
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid/commits
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -922,13 +922,13 @@ still apply.
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid/changes
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `access_raw_diffs` | boolean | no | Retrieve change diffs via Gitaly. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `access_raw_diffs` | boolean | **{dotted-circle}** No | Retrieve change diffs via Gitaly. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
@ -1044,12 +1044,12 @@ Get a list of merge request pipelines.
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid/pipelines
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
@ -1078,12 +1078,12 @@ The new pipeline can be:
|
|
|
|
|
POST /projects/:id/merge_requests/:merge_request_iid/pipelines
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
@ -1134,22 +1134,22 @@ POST /projects/:id/merge_requests
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
| --------- | ---- | -------- | ----------- |
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
|
|
|
|
|
| `source_branch` | string | yes | The source branch. |
|
|
|
|
|
| `target_branch` | string | yes | The target branch. |
|
|
|
|
|
| `title` | string | yes | Title of MR. |
|
|
|
|
|
| `allow_collaboration` | boolean | no | Allow commits from members who can merge to the target branch. |
|
|
|
|
|
| `allow_maintainer_to_push` | boolean | no | Alias of `allow_collaboration`. |
|
|
|
|
|
| `approvals_before_merge` **(PREMIUM)** | integer | no | Number of approvals required before this can be merged (see below). |
|
|
|
|
|
| `assignee_id` | integer | no | Assignee user ID. |
|
|
|
|
|
| `assignee_ids` | integer array | no | The ID of the users to assign the MR to. Set to `0` or provide an empty value to unassign all assignees. |
|
|
|
|
|
| `description` | string | no | Description of the merge request. Limited to 1,048,576 characters. |
|
|
|
|
|
| `labels` | string | no | Labels for the merge request, as a comma-separated list. |
|
|
|
|
|
| `milestone_id` | integer | no | The global ID of a milestone. |
|
|
|
|
|
| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging. |
|
|
|
|
|
| `reviewer_ids` | integer array | no | The ID of the users added as a reviewer to the merge request. If set to `0` or left empty, no reviewers are added. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `squash` | boolean | no | Squash commits into a single commit when merging. |
|
|
|
|
|
| `target_project_id` | integer | no | Numeric ID of the target project. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
|
|
|
|
|
| `source_branch` | string | **{check-circle}** Yes | The source branch. |
|
|
|
|
|
| `target_branch` | string | **{check-circle}** Yes | The target branch. |
|
|
|
|
|
| `title` | string | **{check-circle}** Yes | Title of MR. |
|
|
|
|
|
| `allow_collaboration` | boolean | **{dotted-circle}** No | Allow commits from members who can merge to the target branch. |
|
|
|
|
|
| `allow_maintainer_to_push` | boolean | **{dotted-circle}** No | Alias of `allow_collaboration`. |
|
|
|
|
|
| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | Number of approvals required before this can be merged (see below). |
|
|
|
|
|
| `assignee_id` | integer | **{dotted-circle}** No | Assignee user ID. |
|
|
|
|
|
| `assignee_ids` | integer array | **{dotted-circle}** No | The ID of the users to assign the MR to. Set to `0` or provide an empty value to unassign all assignees. |
|
|
|
|
|
| `description` | string | **{dotted-circle}** No | Description of the merge request. Limited to 1,048,576 characters. |
|
|
|
|
|
| `labels` | string | **{dotted-circle}** No | Labels for the merge request, as a comma-separated list. |
|
|
|
|
|
| `milestone_id` | integer | **{dotted-circle}** No | The global ID of a milestone. |
|
|
|
|
|
| `remove_source_branch` | boolean | **{dotted-circle}** No | Flag indicating if a merge request should remove the source branch when merging. |
|
|
|
|
|
| `reviewer_ids` | integer array | **{dotted-circle}** No | The ID of the users added as a reviewer to the merge request. If set to `0` or left empty, no reviewers are added. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `squash` | boolean | **{dotted-circle}** No | Squash commits into a single commit when merging. |
|
|
|
|
|
| `target_project_id` | integer | **{dotted-circle}** No | Numeric ID of the target project. |
|
|
|
|
|
|
|
|
|
|
If `approvals_before_merge` is not provided, it inherits the value from the target project. If provided, the following conditions must hold for it to take effect:
|
|
|
|
|
|
|
|
|
|
@ -1302,24 +1302,24 @@ PUT /projects/:id/merge_requests/:merge_request_iid
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
| --------- | ---- | -------- | ----------- |
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The ID of a merge request. |
|
|
|
|
|
| `add_labels` | string | no | Comma-separated label names to add to a merge request. |
|
|
|
|
|
| `allow_collaboration` | boolean | no | Allow commits from members who can merge to the target branch. |
|
|
|
|
|
| `allow_maintainer_to_push` | boolean | no | Alias of `allow_collaboration`. |
|
|
|
|
|
| `assignee_id` | integer | no | The ID of the user to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. |
|
|
|
|
|
| `assignee_ids` | integer array | no | The ID of the users to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. |
|
|
|
|
|
| `description` | string | no | Description of the merge request. Limited to 1,048,576 characters. |
|
|
|
|
|
| `discussion_locked` | boolean | no | Flag indicating if the merge request's discussion is locked. If the discussion is locked only project members can add, edit or resolve comments. |
|
|
|
|
|
| `labels` | string | no | Comma-separated label names for a merge request. Set to an empty string to unassign all labels. |
|
|
|
|
|
| `milestone_id` | integer | no | The global ID of a milestone to assign the merge request to. Set to `0` or provide an empty value to unassign a milestone.|
|
|
|
|
|
| `remove_labels` | string | no | Comma-separated label names to remove from a merge request. |
|
|
|
|
|
| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging. |
|
|
|
|
|
| `reviewer_ids` | integer array | no | The ID of the users set as a reviewer to the merge request. Set the value to `0` or provide an empty value to unset all reviewers. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `squash` | boolean | no | Squash commits into a single commit when merging. |
|
|
|
|
|
| `state_event` | string | no | New state (close/reopen). |
|
|
|
|
|
| `target_branch` | string | no | The target branch. |
|
|
|
|
|
| `title` | string | no | Title of MR. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The ID of a merge request. |
|
|
|
|
|
| `add_labels` | string | **{dotted-circle}** No | Comma-separated label names to add to a merge request. |
|
|
|
|
|
| `allow_collaboration` | boolean | **{dotted-circle}** No | Allow commits from members who can merge to the target branch. |
|
|
|
|
|
| `allow_maintainer_to_push` | boolean | **{dotted-circle}** No | Alias of `allow_collaboration`. |
|
|
|
|
|
| `assignee_id` | integer | **{dotted-circle}** No | The ID of the user to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. |
|
|
|
|
|
| `assignee_ids` | integer array | **{dotted-circle}** No | The ID of the users to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. |
|
|
|
|
|
| `description` | string | **{dotted-circle}** No | Description of the merge request. Limited to 1,048,576 characters. |
|
|
|
|
|
| `discussion_locked` | boolean | **{dotted-circle}** No | Flag indicating if the merge request's discussion is locked. If the discussion is locked only project members can add, edit or resolve comments. |
|
|
|
|
|
| `labels` | string | **{dotted-circle}** No | Comma-separated label names for a merge request. Set to an empty string to unassign all labels. |
|
|
|
|
|
| `milestone_id` | integer | **{dotted-circle}** No | The global ID of a milestone to assign the merge request to. Set to `0` or provide an empty value to unassign a milestone.|
|
|
|
|
|
| `remove_labels` | string | **{dotted-circle}** No | Comma-separated label names to remove from a merge request. |
|
|
|
|
|
| `remove_source_branch` | boolean | **{dotted-circle}** No | Flag indicating if a merge request should remove the source branch when merging. |
|
|
|
|
|
| `reviewer_ids` | integer array | **{dotted-circle}** No | The ID of the users set as a reviewer to the merge request. Set the value to `0` or provide an empty value to unset all reviewers. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
|
|
|
|
|
| `squash` | boolean | **{dotted-circle}** No | Squash commits into a single commit when merging. |
|
|
|
|
|
| `state_event` | string | **{dotted-circle}** No | New state (close/reopen). |
|
|
|
|
|
| `target_branch` | string | **{dotted-circle}** No | The target branch. |
|
|
|
|
|
| `title` | string | **{dotted-circle}** No | Title of MR. |
|
|
|
|
|
|
|
|
|
|
Must include at least one non-required attribute from above.
|
|
|
|
|
|
|
|
|
|
@ -1483,8 +1483,8 @@ DELETE /projects/:id/merge_requests/:merge_request_iid
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/4/merge_requests/85"
|
|
|
|
|
@ -1498,18 +1498,18 @@ Accept and merge changes submitted with MR using this API.
|
|
|
|
|
PUT /projects/:id/merge_requests/:merge_request_iid/merge
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|--------------------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `merge_commit_message` | string | no | Custom merge commit message. |
|
|
|
|
|
| `merge_when_pipeline_succeeds` | boolean | no | If `true`, the merge request is merged when the pipeline succeeds. |
|
|
|
|
|
| `sha` | string | no | If present, then this SHA must match the HEAD of the source branch, otherwise the merge fails. |
|
|
|
|
|
| `should_remove_source_branch` | boolean | no | If `true`, removes the source branch. |
|
|
|
|
|
| `squash_commit_message` | string | no | Custom squash commit message. |
|
|
|
|
|
| `squash` | boolean | no | If `true`, the commits are squashed into a single commit on merge. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `merge_commit_message` | string | **{dotted-circle}** No | Custom merge commit message. |
|
|
|
|
|
| `merge_when_pipeline_succeeds` | boolean | **{dotted-circle}** No | If `true`, the merge request is merged when the pipeline succeeds. |
|
|
|
|
|
| `sha` | string | **{dotted-circle}** No | If present, then this SHA must match the HEAD of the source branch, otherwise the merge fails. |
|
|
|
|
|
| `should_remove_source_branch` | boolean | **{dotted-circle}** No | If `true`, removes the source branch. |
|
|
|
|
|
| `squash_commit_message` | string | **{dotted-circle}** No | Custom squash commit message. |
|
|
|
|
|
| `squash` | boolean | **{dotted-circle}** No | If `true`, the commits are squashed into a single commit on merge. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
@ -1689,12 +1689,12 @@ It returns the HEAD commit of `refs/merge-requests/:iid/merge` in the response b
|
|
|
|
|
GET /projects/:id/merge_requests/:merge_request_iid/merge_ref
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
@ -1716,12 +1716,12 @@ This API returns specific HTTP status codes on failure:
|
|
|
|
|
POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
Supported attributes:
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
@ -1887,9 +1887,9 @@ PUT /projects/:id/merge_requests/:merge_request_iid/rebase
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `skip_ci` | boolean | no | Set to `true` to skip creating a CI pipeline. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `skip_ci` | boolean | **{dotted-circle}** No | Set to `true` to skip creating a CI pipeline. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/rebase"
|
|
|
|
|
@ -1949,8 +1949,8 @@ PUT /projects/:id/merge_requests/:merge_request_iid/reset_approvals
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|-------------------|----------|-----------------------------------------------------------------------------------------------------------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/reset_approvals"
|
|
|
|
|
@ -1970,8 +1970,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/closes_issues
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/closes_issues"
|
|
|
|
|
@ -2046,8 +2046,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/subscribe
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/17/subscribe"
|
|
|
|
|
@ -2216,8 +2216,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/17/unsubscribe"
|
|
|
|
|
@ -2386,8 +2386,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/todo
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/27/todo"
|
|
|
|
|
@ -2513,8 +2513,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|---------|----------|---------------------------------------|
|
|
|
|
|
| `id` | String | yes | The ID of the project. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | String | **{check-circle}** Yes | The ID of the project. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions"
|
|
|
|
|
@ -2563,9 +2563,9 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|---------|----------|-------------------------------------------|
|
|
|
|
|
| `id` | String | yes | The ID of the project. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `version_id` | integer | yes | The ID of the merge request diff version. |
|
|
|
|
|
| `id` | String | **{check-circle}** Yes | The ID of the project. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `version_id` | integer | **{check-circle}** Yes | The ID of the merge request diff version. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions/1"
|
|
|
|
|
@ -2631,9 +2631,9 @@ POST /projects/:id/merge_requests/:merge_request_iid/time_estimate
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `duration` | string | yes | The duration in human format, such as `3h30m`. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `duration` | string | **{check-circle}** Yes | The duration in human format, such as `3h30m`. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_estimate?duration=3h30m"
|
|
|
|
|
@ -2660,8 +2660,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of a project's merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of a project's merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_time_estimate"
|
|
|
|
|
@ -2688,10 +2688,10 @@ POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `duration` | string | yes | The duration in human format, such as `3h30m` |
|
|
|
|
|
| `summary` | string | no | A summary of how the time was spent. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
| `duration` | string | **{check-circle}** Yes | The duration in human format, such as `3h30m` |
|
|
|
|
|
| `summary` | string | **{dotted-circle}** No | A summary of how the time was spent. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/add_spent_time?duration=1h"
|
|
|
|
|
@ -2718,8 +2718,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of a project's merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of a project's merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_spent_time"
|
|
|
|
|
@ -2744,8 +2744,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/time_stats
|
|
|
|
|
|
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|
|
|
|---------------------|----------------|----------|-------------|
|
|
|
|
|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | yes | The internal ID of the merge request. |
|
|
|
|
|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
|
|
|
|
|
| `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_stats"
|
|
|
|
|
|