diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-20 00:05:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-20 00:05:59 +0000 |
commit | fc8c74fd0cbe7384038ead2dd2493f5c63d2b98d (patch) | |
tree | 6fe0229558adf41fd48c1e9f6bc5e367011d4976 /doc/api | |
parent | b35b9ac7e2fd4a707ea9291eb57769c690403b4c (diff) | |
download | gitlab-ce-fc8c74fd0cbe7384038ead2dd2493f5c63d2b98d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/project_import_export.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md index e285c721d11..7040646641b 100644 --- a/doc/api/project_import_export.md +++ b/doc/api/project_import_export.md @@ -111,6 +111,7 @@ POST /projects/import | Attribute | Type | Required | Description | | --------- | -------------- | -------- | ---------------------------------------- | | `namespace` | integer/string | no | The ID or path of the namespace that the project will be imported to. Defaults to the current user's namespace | +| `name` | string | no | The name of the project to be imported. Defaults to the path of the project if not provided | | `file` | string | yes | The file to be uploaded | | `path` | string | yes | Name and path for new project | | `overwrite` | boolean | no | If there is a project with the same path the import will overwrite it. Default to false | @@ -131,14 +132,12 @@ cURL doesn't support posting a file from a remote server. Importing a project fr ```python import requests -import urllib -import json -import sys +from io import BytesIO -s3_file = urllib.urlopen(presigned_url) +s3_file = requests.get(presigned_url) url = 'https://gitlab.example.com/api/v4/projects/import' -files = {'file': s3_file} +files = {'file': BytesIO(s3_file.content)} data = { "path": "example-project", "namespace": "example-group" |