Skip to main content
POST

Authorizations

Authorization
string
header
required

a valid bearer token

Headers

Git-Provider-Access-Token
string

Personal access token or OAuth token used to authenticate with the target Git provider when pushing content. Required for private target repositories unless targetEnterpriseOauthId is supplied; omit for public repositories.

Path Parameters

projectId
string<uuid>
required

The unique identifier of the project that owns the working tree.

Body

application/json

Repository migration request describing the target repository to migrate the project's working tree to.

mode
enum<string>
required

The migration mode. MIRROR_PUSH copies the full working tree to the target repository; RECONFIGURE points the project at the target repository without pushing content.

Available options:
MIRROR_PUSH,
RECONFIGURE
targetCloneUrl
string
required

The clone URL of the target Git repository to migrate to.

Minimum string length: 1
Example:

"https://github.com/acme/new-pipelines.git"

targetName
string
required

The display name of the target repository.

Minimum string length: 1
Example:

"new-pipelines"

targetProvider
enum<string>
required

The Git provider hosting the target repository. One of GITHUB, GITLAB, AZURE_DEVOPS. Accepts any case.

Available options:
GITHUB,
GITLAB,
AZURE_DEVOPS
Example:

"GITHUB"

providerParameters
object | null

Provider-specific parameters for the target repository, as key/value pairs. Required for some providers. For Azure DevOps, supply organization, repositoryId and tenantId. See the create-repository provider-specific request schemas for field details.

targetEnterpriseOauthId
string<uuid> | null

The unique identifier of the enterprise OAuth connection used to authenticate with the target repository. Omit for public or personal repositories.

Response

Repository migration accepted and started

The result of accepting a repository migration request.

migrationId
string<uuid>
required

The unique identifier of the started repository migration. Use this to poll the migration-status endpoint.