diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /doc/api/import.md | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'doc/api/import.md')
-rw-r--r-- | doc/api/import.md | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/api/import.md b/doc/api/import.md index e377853ade0..27f5915b206 100644 --- a/doc/api/import.md +++ b/doc/api/import.md @@ -1,3 +1,9 @@ +--- +stage: none +group: unassigned +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +--- + # Import API ## Import repository from GitHub @@ -13,10 +19,20 @@ POST /import/github | `personal_access_token` | string | yes | GitHub personal access token | | `repo_id` | integer | yes | GitHub repository ID | | `new_name` | string | no | New repository name | -| `target_namespace` | string | yes | Namespace to import repository into | +| `target_namespace` | string | yes | Namespace to import repository into. Supports subgroups like `/namespace/subgroup`. | +| `github_hostname` | string | no | Custom GitHub enterprise hostname. Defaults to GitHub.com if `github_hostname` is not set. | ```shell -curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "personal_access_token=abc123&repo_id=12345&target_namespace=root" "https://gitlab.example.com/api/v4/import/github" +curl --request POST \ + --url "https://gitlab.example.com/api/v4/import/github" \ + --header "content-type: application/json" \ + --header "PRIVATE-TOKEN: <your_access_token>" \ + --data '{ + "personal_access_token": "aBc123abC12aBc123abC12abC123+_A/c123", + "repo_id": "12345", + "target_namespace": "group/subgroup", + "new_name": "NEW-NAME" +}' ``` Example response: @@ -51,7 +67,7 @@ POST /import/bitbucket_server | `bitbucket_server_project` | string | yes | Bitbucket Project Key | | `bitbucket_server_repo` | string | yes | Bitbucket Repository Name | | `new_name` | string | no | New repository name | -| `target_namespace` | string | no | Namespace to import repository into | +| `target_namespace` | string | no | Namespace to import repository into. Supports subgroups like `/namespace/subgroup` | ```shell curl --request POST \ |