Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-12 18:13:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-12 18:13:54 +0300
commit98638cd5e43611aac2193a5c2f80f72374040430 (patch)
tree6605f0f284efed1d05708b3799f093eb5e305a8f /doc/api
parent43d816ebc20da6ff959176248c70d8c4c7c9345a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/graphql/reference/index.md5
-rw-r--r--doc/api/merge_requests.md133
-rw-r--r--doc/api/projects.md63
-rw-r--r--doc/api/runners.md8
-rw-r--r--doc/api/users.md2
5 files changed, 37 insertions, 174 deletions
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 938c2b812e6..bca97d3d596 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -13999,6 +13999,10 @@ Returns [`Deployment`](#deployment).
Metrics dashboard schema for the environment.
+WARNING:
+**Deprecated** in 16.0.
+Returns no data. Underlying feature was removed in 16.0.
+
Returns [`MetricsDashboard`](#metricsdashboard).
###### Arguments
@@ -18689,6 +18693,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
| Name | Type | Description |
| ---- | ---- | ----------- |
+| <a id="pipelinejobsjobkind"></a>`jobKind` | [`CiJobKind`](#cijobkind) | Filter jobs by kind. |
| <a id="pipelinejobsretried"></a>`retried` | [`Boolean`](#boolean) | Filter jobs by retry-status. |
| <a id="pipelinejobssecurityreporttypes"></a>`securityReportTypes` | [`[SecurityReportTypeEnum!]`](#securityreporttypeenum) | Filter jobs by the type of security report they produce. |
| <a id="pipelinejobsstatuses"></a>`statuses` | [`[CiJobStatus!]`](#cijobstatus) | Filter jobs by status. |
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index e4be851ec82..1be5f6204a1 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -12,9 +12,15 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - `merge_user` was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/349031) as an eventual replacement for `merged_by` in GitLab 14.7.
> - `merge_status` was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/3169#note_1162532204) in favor of `detailed_merge_status` in GitLab 15.6.
> - `with_merge_status_recheck` [changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115948) in GitLab 15.11 [with a flag](../administration/feature_flags.md) named `restrict_merge_status_recheck` to be ignored for requests from users insufficient permissions. Disabled by default.
+> - `approvals_before_merge` was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119503) in GitLab 16.0.
Every API call to merge requests must be authenticated.
+## Removals in API v5
+
+The `approvals_before_merge` attribute has been deprecated, and is scheduled to be removed
+in API v5 in favor of the [Merge request approvals API](merge_request_approvals.md).
+
## List merge requests
Get all merge requests the authenticated user has access to. By
@@ -196,20 +202,6 @@ Supported attributes:
]
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-[
- {
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
- }
-]
-```
-
### Merge requests list response notes
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0, listing merge requests may
@@ -400,20 +392,6 @@ Supported attributes:
]
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-[
- {
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
- }
-]
-```
-
For important notes on response data, read [Merge requests list response notes](#merge-requests-list-response-notes).
## List group merge requests
@@ -587,20 +565,6 @@ Supported attributes:
]
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-[
- {
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
- }
-]
-```
-
For important notes on response data, read [Merge requests list response notes](#merge-requests-list-response-notes).
## Get single MR
@@ -630,7 +594,7 @@ Supported attributes:
| Attribute | Type | Description |
|----------------------------------|------|-------------|
-| `approvals_before_merge` | integer | **(PREMIUM)** Number of approvals required before this merge request can merge. |
+| `approvals_before_merge`| integer | **(PREMIUM)** Number of approvals required before this merge request can merge. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/353097) in GitLab 16.0. |
| `assignee` | object | First assignee of the merge request. |
| `assignees` | array | Assignees of the merge request. |
| `author` | object | User who created this merge request. |
@@ -753,7 +717,7 @@ Supported attributes:
},
"has_conflicts": false,
"blocking_discussions_resolved": true,
- "approvals_before_merge": null,
+ "approvals_before_merge": null, // deprecated, use [Merge request approvals API](merge_request_approvals.md)
"subscribed": true,
"changes_count": "1",
"latest_build_started_at": "2022-05-13T09:46:50.032Z",
@@ -1280,8 +1244,8 @@ POST /projects/:id/merge_requests
| `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. |
+| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | Number of approvals required before this can be merged (see below). To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/353097) in GitLab 16.0. |
| `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 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. |
@@ -1293,13 +1257,6 @@ POST /projects/:id/merge_requests
| `squash_on_merge` | boolean | no | Indicates if the merge request will be squashed when merged. |
| `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:
-
-- The target project's `approvals_before_merge` must be greater than zero. A
- value of zero disables approvals for that project.
-- The provided value of `approvals_before_merge` must be greater than the
- target project's `approvals_before_merge`.
-
```json
{
"id": 1,
@@ -1421,18 +1378,6 @@ If `approvals_before_merge` is not provided, it inherits the value from the targ
}
```
-Users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
-}
-```
-
For important notes on response data, read [Single merge request response notes](#single-merge-request-response-notes).
## Update MR
@@ -1604,18 +1549,6 @@ Must include at least one non-required attribute from above.
}
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
-}
-```
-
For important notes on response data, read [Single merge request response notes](#single-merge-request-response-notes).
## Delete a merge request
@@ -1793,18 +1726,6 @@ Supported attributes:
}
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
-}
-```
-
This API returns specific HTTP status codes on failure:
| HTTP Status | Message | Reason |
@@ -2006,18 +1927,6 @@ Supported attributes:
}
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
-}
-```
-
For important notes on response data, read [Single merge request response notes](#single-merge-request-response-notes).
## Rebase a merge request
@@ -2318,18 +2227,6 @@ Example response:
}
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
-}
-```
-
For important notes on response data, read [Single merge request response notes](#single-merge-request-response-notes).
## Unsubscribe from a merge request
@@ -2489,18 +2386,6 @@ Example response:
}
```
-Users on [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/) also see
-the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 1,
- "title": "test1",
- "approvals_before_merge": null
- ...
-}
-```
-
For important notes on response data, read [Single merge request response notes](#single-merge-request-response-notes).
## Create a to-do item
diff --git a/doc/api/projects.md b/doc/api/projects.md
index ca57ca76a81..3105da44906 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -17,6 +17,16 @@ For details, see [Project visibility](../user/public_access.md).
The fields returned in responses vary based on the [permissions](../user/permissions.md) of the authenticated user.
+## Removals in API v5
+
+These attributes are deprecated, and are scheduled to be removed in v5 of the API:
+
+- `tag_list`: Use the `topics` attribute instead.
+- `marked_for_deletion_at`: Use the `marked_for_deletion_on` attribute instead.
+ Available only to [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/).
+- `approvals_before_merge`: Use the [Merge request approvals API](merge_request_approvals.md) instead.
+ Available only to [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/).
+
## Project merge method
The `merge_method` can use these options:
@@ -266,29 +276,6 @@ When the user is authenticated and `simple` is not set this returns something li
]
```
-NOTE:
-The `tag_list` attribute has been deprecated
-and is removed in API v5 in favor of the `topics` attribute.
-
-NOTE:
-For users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/),
-the `marked_for_deletion_at` attribute has been deprecated, and is removed
-in API v5 in favor of the `marked_for_deletion_on` attribute.
-
-Users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/)
-can also see the `approvals_before_merge` parameter:
-
-```json
-[
- {
- "id": 4,
- "description": null,
- "approvals_before_merge": 0,
- ...
- }
-]
-```
-
You can filter by [custom attributes](custom_attributes.md) with:
```plaintext
@@ -548,7 +535,7 @@ GET /users/:user_id/projects
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"repository_storage": "default",
- "approvals_before_merge": 0,
+ "approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"mirror_user_id": 45,
"mirror_trigger_builds": false,
@@ -807,7 +794,7 @@ Example response:
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"repository_storage": "default",
- "approvals_before_merge": 0,
+ "approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"mirror_user_id": 45,
"mirror_trigger_builds": false,
@@ -989,7 +976,7 @@ GET /projects/:id
"squash_option": "default_on",
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
- "approvals_before_merge": 0,
+ "approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"mirror_user_id": 45,
"mirror_trigger_builds": false,
@@ -1034,22 +1021,6 @@ GET /projects/:id
}
```
-NOTE:
-The `tag_list` attribute has been deprecated
-and is removed in API v5 in favor of the `topics` attribute.
-
-Users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/)
-can also see the `approvals_before_merge` parameter:
-
-```json
-{
- "id": 3,
- "description": null,
- "approvals_before_merge": 0,
- ...
-}
-```
-
Users of [GitLab Ultimate](https://about.gitlab.com/pricing/)
can also see the `only_allow_merge_if_all_status_checks_passed`
parameters using GitLab 15.5 and later:
@@ -1275,7 +1246,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your-token>" \
| `allow_merge_on_skipped_pipeline` | boolean | **{dotted-circle}** No | Set whether or not merge requests can be merged with skipped jobs. |
| `only_allow_merge_if_all_status_checks_passed` **(ULTIMATE)** | boolean | **{dotted-circle}** No | Indicates that merges of merge requests should be blocked unless all status checks have passed. Defaults to false. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/369859) in GitLab 15.5 with feature flag `only_allow_merge_if_all_status_checks_passed` disabled by default. |
| `analytics_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private` or `enabled` |
-| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | How many approvers should approve merge requests by default. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). |
+| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | How many approvers should approve merge requests by default. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/353097) in GitLab 16.0. |
| `auto_cancel_pending_pipelines` | string | **{dotted-circle}** No | Auto-cancel pending pipelines. This action toggles between an enabled state and a disabled state; it is not a boolean. |
| `auto_devops_deploy_strategy` | string | **{dotted-circle}** No | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`). |
| `auto_devops_enabled` | boolean | **{dotted-circle}** No | Enable Auto DevOps for this project. |
@@ -1361,7 +1332,7 @@ POST /projects/user/:user_id
| `allow_merge_on_skipped_pipeline` | boolean | **{dotted-circle}** No | Set whether or not merge requests can be merged with skipped jobs. |
| `only_allow_merge_if_all_status_checks_passed` **(ULTIMATE)** | boolean | **{dotted-circle}** No | Indicates that merges of merge requests should be blocked unless all status checks have passed. Defaults to false. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/369859) in GitLab 15.5 with feature flag `only_allow_merge_if_all_status_checks_passed` disabled by default. |
| `analytics_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private` or `enabled` |
-| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | How many approvers should approve merge requests by default. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). |
+| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | How many approvers should approve merge requests by default. [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/353097) in GitLab 16.0. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). |
| `auto_cancel_pending_pipelines` | string | **{dotted-circle}** No | Auto-cancel pending pipelines. This action toggles between an enabled state and a disabled state; it is not a boolean. |
| `auto_devops_deploy_strategy` | string | **{dotted-circle}** No | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`). |
| `auto_devops_enabled` | boolean | **{dotted-circle}** No | Enable Auto DevOps for this project. |
@@ -1460,7 +1431,7 @@ Supported attributes:
| `allow_pipeline_trigger_approve_deployment` **(PREMIUM)** | boolean | **{dotted-circle}** No | Set whether or not a pipeline triggerer is allowed to approve deployments. |
| `only_allow_merge_if_all_status_checks_passed` **(ULTIMATE)** | boolean | **{dotted-circle}** No | Indicates that merges of merge requests should be blocked unless all status checks have passed. Defaults to false.<br/><br/>[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/369859) in GitLab 15.5 with feature flag `only_allow_merge_if_all_status_checks_passed` disabled by default. The feature flag was enabled by default in GitLab 15.9. |
| `analytics_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private` or `enabled` |
-| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | How many approvers should approve merge request by default. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). |
+| `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | How many approvers should approve merge requests by default. [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/353097) in GitLab 16.0. To configure approval rules, see [Merge request approvals API](merge_request_approvals.md). |
| `auto_cancel_pending_pipelines` | string | **{dotted-circle}** No | Auto-cancel pending pipelines. This action toggles between an enabled state and a disabled state; it is not a boolean. |
| `auto_devops_deploy_strategy` | string | **{dotted-circle}** No | Auto Deploy strategy (`continuous`, `manual`, or `timed_incremental`). |
| `auto_devops_enabled` | boolean | **{dotted-circle}** No | Enable Auto DevOps for this project. |
@@ -2882,7 +2853,7 @@ Example response:
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"autoclose_referenced_issues": true,
- "approvals_before_merge": 0,
+ "approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"compliance_frameworks": []
}
diff --git a/doc/api/runners.md b/doc/api/runners.md
index 8d0be1c3aba..a2614b95bb9 100644
--- a/doc/api/runners.md
+++ b/doc/api/runners.md
@@ -679,9 +679,11 @@ curl --request POST "https://gitlab.example.com/api/v4/runners" \
Response:
-| Status | Description |
-|-----------|---------------------------------|
-| 201 | Runner was created |
+| Status | Description |
+|-----------|-----------------------------------|
+| 201 | Runner was created |
+| 403 | Invalid runner registration token |
+| 410 | Runner registration disabled |
Example response:
diff --git a/doc/api/users.md b/doc/api/users.md
index f4547c06582..a2293090209 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -875,7 +875,7 @@ Parameters:
| :------------------------------- | :------- | :--------------------------------------------------------------------------- |
| `view_diffs_file_by_file` | Yes | Flag indicating the user sees only one file diff per page. |
| `show_whitespace_in_diffs` | Yes | Flag indicating the user sees whitespace changes in diffs. |
-| `pass_user_identities_to_ci_jwt` | Yes | Flag indicating the user passes their external identities as CI information. |
+| `pass_user_identities_to_ci_jwt` | Yes | Flag indicating the user passes their external identities as CI information. This attribute does not contain enough information to identify or authorize the user in an external system. The attribute is internal to GitLab, and must not be passed to third-party services. |
## User follow