{"meta":{"title":"조직 마이그레이션에 대한 REST API 엔드포인트","intro":"REST API를 사용하여 하나 이상의 리포지토리를 내보내서 다른GitHub Enterprise Server 인스턴스이동할 수 있습니다.","product":"REST API","breadcrumbs":[{"href":"/ko/rest","title":"REST API"},{"href":"/ko/rest/migrations","title":"마이그레이션"},{"href":"/ko/rest/migrations/orgs","title":"조직"}],"documentType":"article"},"body":"# 조직 마이그레이션에 대한 REST API 엔드포인트\n\nREST API를 사용하여 하나 이상의 리포지토리를 내보내서 다른GitHub Enterprise Server 인스턴스이동할 수 있습니다.\n\n## 조직 마이그레이션 정보\n\n이러한 엔드포인트는 인증된 조직 소유자만 사용할 수 있습니다. 자세한 내용은 [조직의 역할](/ko/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#organization-owners) 및 [REST API에 인증](/ko/rest/authentication/authenticating-to-the-rest-api)을(를) 참조하세요.\n\n이러한 엔드포인트를 사용하여 하나 이상의 리포지토리를 내보낼 수 있으므로 해당 엔드포인트를 이전 인스턴스로GitHub Enterprise Server이동할 수 있습니다. 자세한 내용은 [GitHub.com 마이그레이션 데이터 내보내기](/ko/migrations/using-ghe-migrator/exporting-migration-data-from-githubcom)을(를) 참조하세요.\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List organization migrations\n\n```\nGET /orgs/{org}/migrations\n```\n\nLists 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).\nA list of repositories is only returned for export migrations.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n* **`exclude`** (array)\n  Exclude attributes from the API response to improve performance\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/migrations\n```\n\n**Response schema (Status: 200):**\n\nArray of `Migration`:\n\n* `id`: required, integer, format: int64\n* `owner`: required, any of:\n  * **null**\n  * **Simple User**\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n* `guid`: required, string\n* `state`: required, string\n* `lock_repositories`: required, boolean\n* `exclude_metadata`: required, boolean\n* `exclude_git_data`: required, boolean\n* `exclude_attachments`: required, boolean\n* `exclude_releases`: required, boolean\n* `exclude_owner_projects`: required, boolean\n* `org_metadata_only`: required, boolean\n* `repositories`: required, array of `Simple Repository`:\n  * `id`: required, integer, format: int64\n  * `node_id`: required, string\n  * `name`: required, string\n  * `full_name`: required, string\n  * `owner`: required, `Simple User` (see above)\n  * `private`: required, boolean\n  * `html_url`: required, string, format: uri\n  * `description`: required, string or null\n  * `fork`: required, boolean\n  * `url`: required, string, format: uri\n  * `archive_url`: required, string\n  * `assignees_url`: required, string\n  * `blobs_url`: required, string\n  * `branches_url`: required, string\n  * `collaborators_url`: required, string\n  * `comments_url`: required, string\n  * `commits_url`: required, string\n  * `compare_url`: required, string\n  * `contents_url`: required, string\n  * `contributors_url`: required, string, format: uri\n  * `deployments_url`: required, string, format: uri\n  * `downloads_url`: required, string, format: uri\n  * `events_url`: required, string, format: uri\n  * `forks_url`: required, string, format: uri\n  * `git_commits_url`: required, string\n  * `git_refs_url`: required, string\n  * `git_tags_url`: required, string\n  * `issue_comment_url`: required, string\n  * `issue_events_url`: required, string\n  * `issues_url`: required, string\n  * `keys_url`: required, string\n  * `labels_url`: required, string\n  * `languages_url`: required, string, format: uri\n  * `merges_url`: required, string, format: uri\n  * `milestones_url`: required, string\n  * `notifications_url`: required, string\n  * `pulls_url`: required, string\n  * `releases_url`: required, string\n  * `stargazers_url`: required, string, format: uri\n  * `statuses_url`: required, string\n  * `subscribers_url`: required, string, format: uri\n  * `subscription_url`: required, string, format: uri\n  * `tags_url`: required, string, format: uri\n  * `teams_url`: required, string, format: uri\n  * `trees_url`: required, string\n  * `hooks_url`: required, string, format: uri\n* `url`: required, string, format: uri\n* `created_at`: required, string, format: date-time\n* `updated_at`: required, string, format: date-time\n* `node_id`: required, string\n* `archive_url`: string, format: uri\n* `exclude`: array of string\n\n## Start an organization migration\n\n```\nPOST /orgs/{org}/migrations\n```\n\nInitiates the generation of a migration archive.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n* **`repositories`** (array of strings) (required)\n  A list of arrays indicating which repositories should be migrated.\n\n* **`lock_repositories`** (boolean)\n  Indicates whether repositories should be locked (to prevent manipulation) while migrating data.\n  Default: `false`\n\n* **`exclude_metadata`** (boolean)\n  Indicates whether metadata should be excluded and only git source should be included for the migration.\n  Default: `false`\n\n* **`exclude_git_data`** (boolean)\n  Indicates whether the repository git data should be excluded from the migration.\n  Default: `false`\n\n* **`exclude_attachments`** (boolean)\n  Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).\n  Default: `false`\n\n* **`exclude_releases`** (boolean)\n  Indicates whether releases should be excluded from the migration (to reduce migration archive file size).\n  Default: `false`\n\n* **`exclude_owner_projects`** (boolean)\n  Indicates whether projects owned by the organization or users should be excluded. from the migration.\n  Default: `false`\n\n* **`org_metadata_only`** (boolean)\n  Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).\n  Default: `false`\n\n* **`exclude`** (array of strings)\n  Exclude related items from being returned in the response in order to improve performance of the request.\n  Supported values are: repositories\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/migrations \\\n  -d '{\n  \"repositories\": [\n    \"github/Hello-World\"\n  ],\n  \"lock_repositories\": true\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `id`: required, integer, format: int64\n* `owner`: required, any of:\n  * **null**\n  * **Simple User**\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n* `guid`: required, string\n* `state`: required, string\n* `lock_repositories`: required, boolean\n* `exclude_metadata`: required, boolean\n* `exclude_git_data`: required, boolean\n* `exclude_attachments`: required, boolean\n* `exclude_releases`: required, boolean\n* `exclude_owner_projects`: required, boolean\n* `org_metadata_only`: required, boolean\n* `repositories`: required, array of `Simple Repository`:\n  * `id`: required, integer, format: int64\n  * `node_id`: required, string\n  * `name`: required, string\n  * `full_name`: required, string\n  * `owner`: required, `Simple User` (see above)\n  * `private`: required, boolean\n  * `html_url`: required, string, format: uri\n  * `description`: required, string or null\n  * `fork`: required, boolean\n  * `url`: required, string, format: uri\n  * `archive_url`: required, string\n  * `assignees_url`: required, string\n  * `blobs_url`: required, string\n  * `branches_url`: required, string\n  * `collaborators_url`: required, string\n  * `comments_url`: required, string\n  * `commits_url`: required, string\n  * `compare_url`: required, string\n  * `contents_url`: required, string\n  * `contributors_url`: required, string, format: uri\n  * `deployments_url`: required, string, format: uri\n  * `downloads_url`: required, string, format: uri\n  * `events_url`: required, string, format: uri\n  * `forks_url`: required, string, format: uri\n  * `git_commits_url`: required, string\n  * `git_refs_url`: required, string\n  * `git_tags_url`: required, string\n  * `issue_comment_url`: required, string\n  * `issue_events_url`: required, string\n  * `issues_url`: required, string\n  * `keys_url`: required, string\n  * `labels_url`: required, string\n  * `languages_url`: required, string, format: uri\n  * `merges_url`: required, string, format: uri\n  * `milestones_url`: required, string\n  * `notifications_url`: required, string\n  * `pulls_url`: required, string\n  * `releases_url`: required, string\n  * `stargazers_url`: required, string, format: uri\n  * `statuses_url`: required, string\n  * `subscribers_url`: required, string, format: uri\n  * `subscription_url`: required, string, format: uri\n  * `tags_url`: required, string, format: uri\n  * `teams_url`: required, string, format: uri\n  * `trees_url`: required, string\n  * `hooks_url`: required, string, format: uri\n* `url`: required, string, format: uri\n* `created_at`: required, string, format: date-time\n* `updated_at`: required, string, format: date-time\n* `node_id`: required, string\n* `archive_url`: string, format: uri\n* `exclude`: array of string\n\n## Get an organization migration status\n\n```\nGET /orgs/{org}/migrations/{migration_id}\n```\n\nFetches the status of a migration.\nThe state of a migration can be one of the following values:\n\npending, which means the migration hasn't started yet.\nexporting, which means the migration is in progress.\nexported, which means the migration finished successfully.\nfailed, which means the migration failed.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`migration_id`** (integer) (required)\n  The unique identifier of the migration.\n\n* **`exclude`** (array)\n  Exclude attributes from the API response to improve performance\n\n### HTTP response status codes\n\n* **200** - pending, which means the migration hasn't started yet.\n  exporting, which means the migration is in progress.\n  exported, which means the migration finished successfully.\n  failed, which means the migration failed.\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/migrations/MIGRATION_ID\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Start an organization migration](#start-an-organization-migration).\n\n## Download an organization migration archive\n\n```\nGET /orgs/{org}/migrations/{migration_id}/archive\n```\n\nFetches the URL to a migration archive.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`migration_id`** (integer) (required)\n  The unique identifier of the migration.\n\n### HTTP response status codes\n\n* **302** - Found\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/migrations/MIGRATION_ID/archive\n```\n\n**Response schema (Status: 302):**\n\n## Delete an organization migration archive\n\n```\nDELETE /orgs/{org}/migrations/{migration_id}/archive\n```\n\nDeletes a previous migration archive. Migration archives are automatically deleted after seven days.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`migration_id`** (integer) (required)\n  The unique identifier of the migration.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/migrations/MIGRATION_ID/archive\n```\n\n**Response schema (Status: 204):**\n\n## Unlock an organization repository\n\n```\nDELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\n```\n\nUnlocks 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`migration_id`** (integer) (required)\n  The unique identifier of the migration.\n\n* **`repo_name`** (string) (required)\n  repo\\_name parameter\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/migrations/MIGRATION_ID/repos/REPO_NAME/lock\n```\n\n**Response schema (Status: 204):**\n\n## List repositories in an organization migration\n\n```\nGET /orgs/{org}/migrations/{migration_id}/repositories\n```\n\nList all the repositories for this organization migration.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`migration_id`** (integer) (required)\n  The unique identifier of the migration.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/migrations/MIGRATION_ID/repositories\n```\n\n**Response schema (Status: 200):**"}