project_import

Import repository from Bitbucket Server

Imports a repository from Bitbucket Server to GitLab. The Bitbucket Project Key is only used for finding the repository in Bitbucket. You must specify a target_namespace if you want to import the repository to a GitLab group.

post/api/v4/import/bitbucket_server

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Request body

bitbucket_server_urlstring required

Bitbucket Server URL

bitbucket_server_usernamestring required

BitBucket Server Username

personal_access_tokenstring required

BitBucket Server personal access token/password

bitbucket_server_projectstring required

BitBucket Server Project Key

bitbucket_server_repostring required

BitBucket Server Repository Name

new_namestring

New repo name

new_namespacestring

Namespace to import repo into

timeout_strategy'optimistic' | 'pessimistic'

Strategy for behavior on timeouts

Response

Import repository from Bitbucket Server

idinteger required
namestring required
full_pathstring required
full_namestring required
refs_urlstring required
forkedboolean required

Example response

{
  "id": 1,
  "name": "GitLab",
  "full_path": "gitlab-org/gitlab",
  "full_name": "GitLab Org / GitLab",
  "forked": true
}

Changes

No recorded changes to this operation across all 5 revisions of this API.