Move projects to or from GitHub.
22 endpoints tagged migrations, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /orgs/{org}/migrations
Lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API).
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
exclude | query | no | Exclude attributes from the API response to improve performance |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/migrations
Initiates the generation of a migration archive.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/migrations/{migration_id}
Fetches the status of a migration.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
migration_id | path | yes | The unique identifier of the migration. |
exclude | query | no | Exclude attributes from the API response to improve performance |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | * pending, which means the migration hasn't started yet.
* exporting, which means the migration is in progress.
* exported, which means the migration finished successfully.
* failed, which means the migration failed. | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/migrations/{migration_id}/archive
Fetches the URL to a migration archive.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
migration_id | path | yes | The unique identifier of the migration. |
| Status | Description | Has JSON body |
|---|---|---|
| 302 | Response | no |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/migrations/{migration_id}/archive
Deletes a previous migration archive. Migration archives are automatically deleted after seven days.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
migration_id | path | yes | The unique identifier of the migration. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock
Unlocks a repository that was locked for migration. You should unlock each migrated repository and delete them when the migration is complete and you no longer need the source data.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
migration_id | path | yes | The unique identifier of the migration. |
repo_name | path | yes | repo_name parameter |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
GET /orgs/{org}/migrations/{migration_id}/repositories
List all the repositories for this organization migration.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
migration_id | path | yes | The unique identifier of the migration. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/import
View the progress of an import.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 503 | Unavailable due to service under maintenance. | yes |
PUT /repos/{owner}/{repo}/import
Start a source import to a GitHub repository using GitHub Importer.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
| 503 | Unavailable due to service under maintenance. | yes |
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
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 503 | Unavailable due to service under maintenance. | yes |
DELETE /repos/{owner}/{repo}/import
Stop an import for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 503 | Unavailable due to service under maintenance. | yes |
GET /repos/{owner}/{repo}/import/large_files
List files larger than 100MB found during the import
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 503 | Unavailable due to service under maintenance. | yes |
PATCH /repos/{owner}/{repo}/import/lfs
You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 503 | Unavailable due to service under maintenance. | yes |
GET /user/migrations
Lists all migrations a user has started.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /user/migrations
Initiates the generation of a user migration archive.
No parameters.
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /user/migrations/{migration_id}
Fetches a single user migration. The response includes the state of the migration, which can be one of the following values:
| Name | In | Required | Description |
|---|---|---|---|
migration_id | path | yes | The unique identifier of the migration. |
exclude | query | no |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /user/migrations/{migration_id}/archive
Fetches the URL to download the migration archive as a tar.gz file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:
| Name | In | Required | Description |
|---|---|---|---|
migration_id | path | yes | The unique identifier of the migration. |
| Status | Description | Has JSON body |
|---|---|---|
| 302 | Response | no |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
DELETE /user/migrations/{migration_id}/archive
Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the List user migrations and Get a user migration status endpoints, will continue to be available even after an archive is deleted.
| Name | In | Required | Description |
|---|---|---|---|
migration_id | path | yes | The unique identifier of the migration. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock
Unlocks a repository. You can lock repositories when you start a user migration. Once the migration is complete you can unlock each repository to begin using it again or delete the repository if you no longer need the source data. Returns a status of 404 Not Found if the repository is not locked.
| Name | In | Required | Description |
|---|---|---|---|
migration_id | path | yes | The unique identifier of the migration. |
repo_name | path | yes | repo_name parameter |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 304 | Not modified | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /user/migrations/{migration_id}/repositories
Lists all the repositories for this user migration.
| Name | In | Required | Description |
|---|---|---|---|
migration_id | path | yes | The unique identifier of the migration. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |