Skip to content

Update an import

Deprecated
PATCH
/repos/{owner}/{repo}/import

An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted.

Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status detection_found_multiple and the Import Progress response will include a project_choices array. You can select the project to import by providing one of the objects in the project_choices array in the update request.

[!WARNING] Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Media type application/json
object
vcs_username

The username to provide to the originating repository.

string
vcs_password

The password to provide to the originating repository.

string
vcs

The type of version control system you are migrating from.

string
Allowed values: subversion tfvc git mercurial
tfvc_project

For a tfvc import, the name of the project that is being imported.

string
Examples

Update authentication for an import

{
"vcs_username": "octocat",
"vcs_password": "secret"
}

Response

Media type application/json
Import

A repository import from an external source.

object
vcs
required
string
nullable
use_lfs
boolean
vcs_url
required

The URL of the originating repository.

string
svc_root
string
tfvc_project
string
status
required
string
Allowed values: auth error none detecting choose auth_failed importing mapping waiting_to_push pushing complete setup unknown detection_found_multiple detection_found_nothing detection_needs_auth
status_text
string
nullable
failed_step
string
nullable
error_message
string
nullable
import_percent
integer
nullable
commit_count
integer
nullable
push_percent
integer
nullable
has_large_files
boolean
large_files_size
integer
large_files_count
integer
project_choices
Array<object>
object
vcs
string
tfvc_project
string
human_name
string
message
string
authors_count
integer
nullable
url
required
string format: uri
html_url
required
string format: uri
authors_url
required
string format: uri
repository_url
required
string format: uri
svn_root
string
Examples

Example 1

{
"vcs": "subversion",
"use_lfs": true,
"vcs_url": "http://svn.example.com/svn/myproject",
"status": "detecting",
"url": "https://api.github.com/repos/octocat/socm/import",
"html_url": "https://import.github.com/octocat/socm/import",
"authors_url": "https://api.github.com/repos/octocat/socm/import/authors",
"repository_url": "https://api.github.com/repos/octocat/socm"
}

Unavailable due to service under maintenance.

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}