Search + K

Command Palette

Search for a command to run...

Sign In

Start an import

Deprecated
PUT /repos/{owner}/{repo}/import
Copy endpoint
https://api.github.com

Start a source import to a GitHub repository using GitHub Importer. Importing into a GitHub repository with GitHub Actions enabled is not supported and will return a status 422 Unprocessable Entity response.

[!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.

Parameters

path Path Parameters

Name Type
owner required

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

string
repo required

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

string

Request Body

application/json required
{
vcs_url: string;
vcs?: "subversion" | "git" | "mercurial" | "tfvc";
vcs_username?: string;
vcs_password?: string;
tfvc_project?: string;
}

Responses

201 application/json

Response

interface Import {
vcs: string | null;
use_lfs?: boolean;
vcs_url: string;
svc_root?: string;
tfvc_project?: string;
status: "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 | null;
failed_step?: string | null;
error_message?: string | null;
import_percent?: number | null;
commit_count?: number | null;
push_percent?: number | null;
has_large_files?: boolean;
large_files_size?: number;
large_files_count?: number;
project_choices?: { vcs?: string;tfvc_project?: string;human_name?: string; }[];
message?: string;
authors_count?: number | null;
url: string;
html_url: string;
authors_url: string;
repository_url: string;
svn_root?: string;
}

Client Errors

404 application/json

Resource not found

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json

Validation failed, or the endpoint has been spammed.

interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}
[]
;
}

Server Errors

503 application/json

Unavailable due to service under maintenance.

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}