Skip to content

Import repository from Bitbucket Cloud

POST
/api/v4/import/bitbucket

Imports a repository from Bitbucket Cloud to GitLab. Prerequisites: - The prerequisites for Bitbucket Cloud importer. This feature was introduced in GitLab 17.0.

Media type application/json
object
bitbucket_email
required

BitBucket email

string
nullable
bitbucket_api_token
required

BitBucket API token

string
nullable
repo_path
required

Repository path

string
nullable
target_namespace
required

Target namespace

string
nullable
new_name

New repository name

string
nullable
Example generated
{
"bitbucket_email": "example",
"bitbucket_api_token": "example",
"repo_path": "example",
"target_namespace": "example",
"new_name": "example"
}

Created

Media type application/json
object
id
integer
name
string
full_path
string
full_name
string
refs_url
string
forked
boolean
import_source
string
import_status
string
human_import_status_name
string
provider_link
string
import_error
string
import_warning
string
relation_type
string
Example
{
"id": 1,
"name": "GitLab",
"full_path": "gitlab-org/gitlab",
"full_name": "GitLab Org / GitLab",
"forked": true,
"import_source": "source/source-repo",
"import_status": "scheduled",
"human_import_status_name": "canceled",
"provider_link": "/source/source-repo"
}

Bad request

Unauthorized

Forbidden

Unprocessable entity

Service unavailable