Skip to content

Import repository from Bitbucket Server

POST
/api/v4/import/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.

Media type application/json
object
bitbucket_server_url
required

Bitbucket Server URL

string
nullable
bitbucket_server_username
required

BitBucket Server Username

string
nullable
personal_access_token
required

BitBucket Server personal access token/password

string
nullable
bitbucket_server_project
required

BitBucket Server Project Key

string
nullable
bitbucket_server_repo
required

BitBucket Server Repository Name

string
nullable
new_name

New repo name

string
nullable
new_namespace

Namespace to import repo into

string
nullable
timeout_strategy

Strategy for behavior on timeouts

string
nullable
Allowed values: optimistic pessimistic

Created

Media type application/json
object
id
integer
name
string
full_path
string
full_name
string
refs_url
string
forked
boolean
Example
{
"id": 1,
"name": "GitLab",
"full_path": "gitlab-org/gitlab",
"full_name": "GitLab Org / GitLab",
"forked": true
}

Bad request

Unauthorized

Forbidden

Unprocessable entity

Service unavailable