Start an organization migration
POST
/orgs/{org}/migrations https://api.github.com
Initiates the generation of a migration archive.
Parameters
path Path Parameters
| Name | Type |
|---|---|
org
required
The organization name. The name is not case sensitive. | string |
Request Body
application/json
required
{
repositories: string[];
lock_repositories?: boolean;
exclude_metadata?: boolean;
exclude_git_data?: boolean;
exclude_attachments?: boolean;
exclude_releases?: boolean;
exclude_owner_projects?: boolean;
org_metadata_only?: boolean;
exclude?: "repositories"[];
}
repositories: string[];
lock_repositories?: boolean;
exclude_metadata?: boolean;
exclude_git_data?: boolean;
exclude_attachments?: boolean;
exclude_releases?: boolean;
exclude_owner_projects?: boolean;
org_metadata_only?: boolean;
exclude?: "repositories"[];
}
Responses
201 application/json
Response
interface Migration {
id: number;
owner:SimpleUser | null;
guid: string;
state: string;
lock_repositories: boolean;
exclude_metadata: boolean;
exclude_git_data: boolean;
exclude_attachments: boolean;
exclude_releases: boolean;
exclude_owner_projects: boolean;
org_metadata_only: boolean;
repositories:Repository [];
url: string;
created_at: string;
updated_at: string;
node_id: string;
archive_url?: string;
exclude?: string[];
}
id: number;
owner:
guid: string;
state: string;
lock_repositories: boolean;
exclude_metadata: boolean;
exclude_git_data: boolean;
exclude_attachments: boolean;
exclude_releases: boolean;
exclude_owner_projects: boolean;
org_metadata_only: boolean;
repositories:
url: string;
created_at: string;
updated_at: string;
node_id: string;
archive_url?: string;
exclude?: string[];
}
Client Errors
404 application/json
Resource not found
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
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;
}[];
}
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}