summaryrefslogtreecommitdiff
path: root/doc/api/remote_mirrors.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/remote_mirrors.md')
-rw-r--r--doc/api/remote_mirrors.md31
1 files changed, 10 insertions, 21 deletions
diff --git a/doc/api/remote_mirrors.md b/doc/api/remote_mirrors.md
index 1013ffb49fb..bd59aa64e45 100644
--- a/doc/api/remote_mirrors.md
+++ b/doc/api/remote_mirrors.md
@@ -8,15 +8,15 @@ type: reference, api
# Project remote mirrors API **(FREE)**
[Push mirrors](../user/project/repository/mirror/push.md)
-defined on a project's repository settings are called "remote mirrors", and the
-state of these mirrors can be queried and modified via the remote mirror API
-outlined below.
+defined on a project's repository settings are called "remote mirrors". You
+can query and modify the state of these mirrors with the remote mirror API.
-## List a project's remote mirrors
+For security reasons, the `url` attribute in the API response is always scrubbed of username
+and password information.
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/38121) in GitLab 12.9.
+## List a project's remote mirrors
-Returns an Array of remote mirrors and their statuses:
+Returns an array of remote mirrors and their statuses:
```plaintext
GET /projects/:id/remote_mirrors
@@ -47,10 +47,6 @@ Example response:
]
```
-NOTE:
-For security reasons, the `url` attribute is always scrubbed of username
-and password information.
-
## Get a single project's remote mirror
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82770) in GitLab 14.10.
@@ -84,19 +80,14 @@ Example response:
}
```
-NOTE:
-For security reasons, the `url` attribute is always scrubbed of username
-and password information.
-
## Create a pull mirror
Learn how to [configure a pull mirror](projects.md#configure-pull-mirroring-for-a-project) using the Projects API.
## Create a push mirror
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24189) in GitLab 12.9.
-
-Push mirroring is disabled by default. You can enable it by including the optional parameter `enabled` when creating it:
+Push mirroring is disabled by default. To enable it, include the optional parameter
+`enabled` when you create the mirror:
```plaintext
POST /projects/:id/remote_mirrors
@@ -106,8 +97,8 @@ POST /projects/:id/remote_mirrors
| :---------- | :----- | :--------- | :------------ |
| `url` | String | yes | The target URL to which the repository is mirrored. |
| `enabled` | Boolean | no | Determines if the mirror is enabled. |
-| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. |
| `keep_divergent_refs` | Boolean | no | Determines if divergent refs are skipped. |
+| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. |
Example request:
@@ -135,8 +126,6 @@ Example response:
## Update a remote mirror's attributes
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/38121) in GitLab 12.9.
-
Toggle a remote mirror on or off, or change which types of branches are
mirrored:
@@ -148,8 +137,8 @@ PUT /projects/:id/remote_mirrors/:mirror_id
| :---------- | :----- | :--------- | :------------ |
| `mirror_id` | Integer | yes | The remote mirror ID. |
| `enabled` | Boolean | no | Determines if the mirror is enabled. |
-| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. |
| `keep_divergent_refs` | Boolean | no | Determines if divergent refs are skipped. |
+| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. |
Example request: