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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
commit1078b7bf25c2cb6e03c57da9ae25b0512858556f (patch)
treea50fbfaddb22aca89055296c4c532c7ecb2b1ca0 /doc
parent55733b19c526145cceb120e8bb874d476a84383a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/api/group_import_export.md83
-rw-r--r--doc/api/groups.md4
2 files changed, 87 insertions, 0 deletions
diff --git a/doc/api/group_import_export.md b/doc/api/group_import_export.md
new file mode 100644
index 00000000000..c97a753d298
--- /dev/null
+++ b/doc/api/group_import_export.md
@@ -0,0 +1,83 @@
+# Group Import/Export API
+
+> Introduced in GitLab 12.8 as an experimental feature. May change in future releases.
+
+Group Import/Export functionality allows to export group structure and import it at a new location.
+Used in combination with [Project Import/Export](project_import_export.md) it allows you to preserve connections with group level relations
+(e.g. a connection between a project issue and group epic).
+
+Group Export includes:
+
+1. Group Milestones
+1. Group Boards
+1. Group Labels
+1. Group Badges
+1. Group Members
+1. Sub-groups (each sub-group includes all data above)
+
+## Schedule new export
+
+Start a new group export.
+
+```text
+POST /groups/:id/export
+```
+
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ---------------------------------------- |
+| `id` | integer/string | yes | ID of the groupd owned by the authenticated user |
+
+```shell
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/export
+```
+
+```json
+{
+ "message": "202 Accepted"
+}
+```
+
+## Export download
+
+Download the finished export.
+
+```text
+GET /groups/:id/export/download
+```
+
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ---------------------------------------- |
+| `id` | integer/string | yes | ID of the group owned by the authenticated user |
+
+```shell
+curl --header "PRIVATE-TOKEN: <your_access_token>" --remote-header-name --remote-name https://gitlab.example.com/api/v4/groups/1/export/download
+```
+
+```shell
+ls *export.tar.gz
+2020-12-05_22-11-148_namespace_export.tar.gz
+```
+
+Time spent on exporting a group may vary depending on a size of the group. Export download endpoint will return exported archive once it is available. 404 is returned otherwise.
+
+## Import a file
+
+```text
+POST /groups/import
+```
+
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ---------------------------------------- |
+| `name` | string | yes | The name of the group to be imported |
+| `path` | string | yes | Name and path for new group |
+| `file` | string | yes | The file to be uploaded |
+| `parent_id` | integer | no | ID of a parent group that the group will be imported into. Defaults to the current user's namespace if not provided. |
+
+To upload a file from your file system, use the `--form` argument. This causes
+cURL to post data using the header `Content-Type: multipart/form-data`.
+The `file=` parameter must point to a file on your file system and be preceded
+by `@`. For example:
+
+```shell
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "name=imported-group" --form "path=imported-group" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/groups/import
+```
diff --git a/doc/api/groups.md b/doc/api/groups.md
index 0a2446a8be9..3d2ac8c1e18 100644
--- a/doc/api/groups.md
+++ b/doc/api/groups.md
@@ -875,3 +875,7 @@ And to switch pages add:
## Group badges
Read more in the [Group Badges](group_badges.md) documentation.
+
+## Group Import/Export
+
+Read more in the [Group Import/Export](group_import_export.md) documentation.