Sample - GitHub REST API
PATCH/repos/{owner}/{repo}/importDeprecated

Update an 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.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 4 body fields
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
vcs_usernamestringoptional
The username to provide to the originating repository.
vcs_passwordstringoptional
The password to provide to the originating repository.
vcsstringoptional
The type of version control system you are migrating from.
Allowed:subversiontfvcgitmercurial
tfvc_projectstringoptional
For a tfvc import, the name of the project that is being imported.

2 status codes
200Response
vcsstringrequired
use_lfsbooleanoptional
vcs_urlstringrequired
The URL of the originating repository.
svc_rootstringoptional
tfvc_projectstringoptional
statusstringrequired
Allowed:autherrornonedetectingchooseauth_failedimportingmappingwaiting_to_pushpushingcompletesetup
status_textstringoptional
failed_stepstringoptional
error_messagestringoptional
import_percentintegeroptional
commit_countintegeroptional
push_percentintegeroptional
has_large_filesbooleanoptional
large_files_sizeintegeroptional
large_files_countintegeroptional
project_choicesarray<object>optional
messagestringoptional
authors_countintegeroptional
urlstringrequired
html_urlstringrequired
authors_urlstringrequired
repository_urlstringrequired
svn_rootstringoptional
503Unavailable due to service under maintenance.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 503 is returned: Unavailable due to service under maintenance.