POST/user/migrations

Start a user migration

Initiates the generation of a user migration archive.

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

9 body fields
lock_repositoriesbooleanoptional
Lock the repositories being migrated at the start of the migration
exclude_metadatabooleanoptional
Indicates whether metadata should be excluded and only git source should be included for the migration.
exclude_git_databooleanoptional
Indicates whether the repository git data should be excluded from the migration.
exclude_attachmentsbooleanoptional
Do not include attachments in the migration
exclude_releasesbooleanoptional
Do not include releases in the migration
exclude_owner_projectsbooleanoptional
Indicates whether projects owned by the organization or users should be excluded.
org_metadata_onlybooleanoptional
Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).
Default:false
excludearray<string>optional
Exclude attributes from the API response to improve performance
repositoriesarray<string>required

5 status codes
201Response
idintegerrequired
ownerobjectrequired
A GitHub user.
guidstringrequired
statestringrequired
lock_repositoriesbooleanrequired
exclude_metadatabooleanrequired
exclude_git_databooleanrequired
exclude_attachmentsbooleanrequired
exclude_releasesbooleanrequired
exclude_owner_projectsbooleanrequired
org_metadata_onlybooleanrequired
repositoriesarray<Repository>required
The repositories included in the migration. Only returned for export migrations.
urlstringrequired
created_atstringrequired
updated_atstringrequired
node_idstringrequired
archive_urlstringoptional
excludearray<string>optional
Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`.
304Not modified
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 422 is returned: Validation failed, or the endpoint has been spammed.

Was this helpful?