Skip to main content
L’API REST est maintenant versionnée. Pour plus d’informations, consultez « À propos des versions de l’API ».

REST API endpoints for Enterprise Live Migrations

Use the REST API to manage Enterprise Live Migrations on your GitHub Enterprise Server instance.

Remarque

Enterprise Live Migrations est préversion publique et sujet à changement.

List Enterprise Live Migrations

List Enterprise Live Migrations (ELM) for the current GHES appliance.

Jetons d'accès granulaires pour «List Enterprise Live Migrations»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «List Enterprise Live Migrations »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de requête
Nom, Type, Description
page_size integer

Number of results per page.

after string

Cursor for pagination. Use the value from next_cursor of a previous response.

status string

Optional filter by migration status.

Peut être l'un des: created, queued, in_progress, paused, completed, failed, terminated, all

Codes d’état de réponse HTTP pour «List Enterprise Live Migrations »

Code de statutDescription
200

OK

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

501

Not implemented.

Exemples de code pour «List Enterprise Live Migrations »

Exemple de requête

get/enterprise/live-migrations
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations

Response

Status: 200

Create an Enterprise Live Migration

Create an Enterprise Live Migration (ELM) for a single repository on the current GHES appliance. The migration is created in a created state and is not started; run the start endpoint to launch backfill and live updates. Credentials are referenced by name (pat_name) rather than submitted inline, and are not echoed back in the response.

Jetons d'accès granulaires pour «Create an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Create an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres du corps
Nom, Type, Description
source_organization_login string Requis

Source organization login on the GHES appliance.

source_repository_name string Requis

Source repository name.

target_organization_login string Requis

Target organization login on the destination GitHub environment.

target_repository_name string Requis

Target repository name.

target_api_endpoint string Requis

Migration target API endpoint URL. Must be a valid HTTPS URL.

pat_name string Requis

Name of the organization-scoped migration credential set to use. The raw token is never submitted inline and is never returned in the response.

target_visibility string

Target repository visibility. Defaults to internal when omitted. A source repository with public visibility must set this explicitly.

Peut être l'un des: private, internal

Codes d’état de réponse HTTP pour «Create an Enterprise Live Migration »

Code de statutDescription
201

The migration was created. The response contains the new migration identifier and its expiration. No credentials are returned.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The request conflicts with the current state of the migration.

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Create an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations

The migration was created. The response contains the new migration identifier and its expiration. No credentials are returned.

Status: 201

Get an Enterprise Live Migration

Retrieve combined status, progress, cutover readiness, expiration, and timing for an Enterprise Live Migration (ELM) on the current GHES appliance.

Jetons d'accès granulaires pour «Get an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Get an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The ID of the migration.

Codes d’état de réponse HTTP pour «Get an Enterprise Live Migration »

Code de statutDescription
200

OK

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Get an Enterprise Live Migration »

Exemple de requête

get/enterprise/live-migrations/{migration_id}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID

Response

Status: 200

Cancel an Enterprise Live Migration

Cancel an Enterprise Live Migration (ELM) in progress. This terminates the migration: it is cancelled locally, aborted on the migration backend, and its work items are removed. This is a terminal action with no recovery — a subsequent status request reflects the terminated state.

Jetons d'accès granulaires pour «Cancel an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Cancel an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The ID of the migration.

Codes d’état de réponse HTTP pour «Cancel an Enterprise Live Migration »

Code de statutDescription
204

The migration was cancelled. No content is returned; query the migration status to observe the terminal state.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The migration is not in a state that can be cancelled (for example, it has already completed or been terminated).

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Cancel an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations/{migration_id}/cancel
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID/cancel

The migration was cancelled. No content is returned; query the migration status to observe the terminal state.

Status: 204

Cutover an Enterprise Live Migration

Initiate cutover for an Enterprise Live Migration (ELM), archiving the source repository and draining remaining changes. Cutover is asynchronous; the migration transitions through cutover_pending and cutover_finalizing to completed. No content is returned — query the migration status to observe progress.

Jetons d'accès granulaires pour «Cutover an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Cutover an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The ID of the migration.

Paramètres du corps
Nom, Type, Description
force boolean

Bypass the cutover readiness checks and initiate cutover even when the migration is not reported as ready. Defaults to false.

Par défaut: false

Codes d’état de réponse HTTP pour «Cutover an Enterprise Live Migration »

Code de statutDescription
204

Cutover was initiated. No content is returned; query the migration status to observe the cutover progress.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The migration is not ready for cutover (for example, backfill is still in progress, or the migration has already completed, been cancelled, or failed).

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Cutover an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations/{migration_id}/cutover
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID/cutover

Cutover was initiated. No content is returned; query the migration status to observe the cutover progress.

Status: 204

Pause an Enterprise Live Migration

Pause source-load work for an active Enterprise Live Migration (ELM). Backfill and Git synchronization are paused while live event collection and delivery continue. The operation is idempotent for a migration that is already paused. No content is returned; query the migration status to observe the durable state.

Jetons d'accès granulaires pour «Pause an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Pause an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The unique identifier of the Enterprise Live Migration.

Codes d’état de réponse HTTP pour «Pause an Enterprise Live Migration »

Code de statutDescription
204

The migration was paused. No content is returned; query the migration status to confirm its current state.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The migration is not in a state that can be paused, such as when it has not been started or has already completed.

422

The pause request was accepted by the migration service, but the migration did not complete the transition to paused. Query the migration status and retry. This status is also returned when the migration service is missing the source or target credentials required to service the request; an organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Pause an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations/{migration_id}/pause
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID/pause

The migration was paused. No content is returned; query the migration status to confirm its current state.

Status: 204

Resume an Enterprise Live Migration

Resume a paused Enterprise Live Migration (ELM). The migration is re-queued and resumes backfill and live updates. A subsequent status request reflects the resumed state.

Jetons d'accès granulaires pour «Resume an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Resume an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The ID of the migration.

Codes d’état de réponse HTTP pour «Resume an Enterprise Live Migration »

Code de statutDescription
204

The migration was resumed. No content is returned; query the migration status to observe the resumed state.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The migration is not in a state that can be resumed (for example, it is not paused, or has completed or terminated).

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Resume an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations/{migration_id}/resume
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID/resume

The migration was resumed. No content is returned; query the migration status to observe the resumed state.

Status: 204

Revert cutover for an Enterprise Live Migration

Revert cutover for an Enterprise Live Migration (ELM). This unarchives the source repository and terminates any cutover or migration still in progress so the source repository can be migrated again.

Jetons d'accès granulaires pour «Revert cutover for an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Revert cutover for an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The ID of the migration.

Codes d’état de réponse HTTP pour «Revert cutover for an Enterprise Live Migration »

Code de statutDescription
200

The cutover was reverted.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The migration is not in a state where cutover can be reverted.

422

The migration service is missing the source or target credentials required to service this request. An organization administrator must configure the required secrets before retrying.

500

Internal Error

503

Service unavailable

Exemples de code pour «Revert cutover for an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations/{migration_id}/revert-cutover
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID/revert-cutover

The cutover was reverted.

Status: 200

Start an Enterprise Live Migration

Start a created Enterprise Live Migration (ELM), launching backfill and enabling live updates. The migration must be in a startable state (for example, created, paused, or failed); preflight validation runs before the migration is queued unless it has been skipped.

Jetons d'accès granulaires pour «Start an Enterprise Live Migration»

Ce point de terminaison ne fonctionne pas avec des jetons d’accès utilisateur de l'application GitHub, les jetons d’accès d’installation de l'application GitHub, ou des jetons d’accès personnels affinés.

Paramètres pour «Start an Enterprise Live Migration »

En-têtes
Nom, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Paramètres de chemin d’accès
Nom, Type, Description
migration_id string Requis

The ID of the migration.

Codes d’état de réponse HTTP pour «Start an Enterprise Live Migration »

Code de statutDescription
204

The migration was started (queued for execution). No content is returned; query the migration status to observe progress.

400

Bad Request

401

Requires authentication

403

Forbidden

404

Resource not found

409

Conflict. The migration is not in a state that can be started (for example, it has already been started or has completed).

422

The migration could not be started because preflight validation did not pass. Query the migration status for details. This status is also returned when the migration service is missing the source or target credentials required to service the request; an organization administrator must configure the required secrets before retrying.

500

Internal Error

Exemples de code pour «Start an Enterprise Live Migration »

Exemple de requête

post/enterprise/live-migrations/{migration_id}/start
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/enterprise/live-migrations/MIGRATION_ID/start

The migration was started (queued for execution). No content is returned; query the migration status to observe progress.

Status: 204