Start an import
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
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”object
The URL of the originating repository.
The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.
If authentication is required, the username to provide to vcs_url.
If authentication is required, the password to provide to vcs_url.
For a tfvc import, the name of the project that is being imported.
Examples
{ "vcs": "subversion", "vcs_url": "http://svn.example.com/svn/myproject", "vcs_username": "octocat", "vcs_password": "secret"}Responses
Section titled “ Responses ”Response
A repository import from an external source.
object
The URL of the originating repository.
object
Examples
{ "vcs": "subversion", "use_lfs": true, "vcs_url": "http://svn.example.com/svn/myproject", "status": "importing", "status_text": "Importing...", "has_large_files": false, "large_files_size": 0, "large_files_count": 0, "authors_count": 0, "commit_count": 1042, "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"}Headers
Section titled “ Headers ”Example
https://api.github.com/repos/spraints/socm/importResource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}Unavailable due to service under maintenance.
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}