Use this API to list, retrieve, pause, and resume the batched background migrations running on an instance.

These endpoints require administrator access to the instance.

Get the list of batched background migrations

GET /api/v4/admin/batched_background_migrations

FE version

Parameters

NameTypeDescription
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
status
Query
StringFilter by status
Allowed values: paused, active, finished, failed, finalizing, finalized
database
Query
StringThe name of the database, the default main
Allowed values: main, ci, sec
Default: main
job_class_name
Query
StringFilter migrations by job class name

Responses

CodeDescriptionSchema
200OKAPIEntitiesBatchedBackgroundMigration
400Bad Request—
401401 Unauthorized—
403403 Forbidden—

Retrieve a batched background migration

GET /api/v4/admin/batched_background_migrations/{id}

Parameters

NameTypeDescription
id
Path, required
IntegerThe batched background migration id
database
Query
StringThe name of the database
Allowed values: main, ci, sec
Default: main

Responses

CodeDescriptionSchema
200OKAPIEntitiesBatchedBackgroundMigration
400Bad Request—
401401 Unauthorized—
403403 Forbidden—
404404 Not found—

Pause a batched background migration

PUT /api/v4/admin/batched_background_migrations/{id}/pause

Parameters

NameTypeDescription
id
Path, required
IntegerThe batched background migration id

Request body (application/json)

PropertyTypeDescription
databaseStringThe name of the database
Allowed values: main, ci, sec
Default: main

Responses

CodeDescriptionSchema
200OKAPIEntitiesBatchedBackgroundMigration
400Bad Request—
401401 Unauthorized—
403403 Forbidden—
404404 Not found—
422You can pause only active batched background migrations.—

Resume a batched background migration

PUT /api/v4/admin/batched_background_migrations/{id}/resume

Parameters

NameTypeDescription
id
Path, required
IntegerThe batched background migration id

Request body (application/json)

PropertyTypeDescription
databaseStringThe name of the database
Allowed values: main, ci, sec
Default: main

Responses

CodeDescriptionSchema
200OKAPIEntitiesBatchedBackgroundMigration
400Bad Request—
401401 Unauthorized—
403403 Forbidden—
404404 Not found—
422You can resume only paused batched background migrations.—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesBatchedBackgroundMigration

PropertyTypeDescription
column_nameStringExample: id
created_atString (date-time)Example: 2022-11-28T16:26:39+02:00
estimated_time_remainingStringExample: 1 day
idStringExample: 1234
job_class_nameStringExample: CopyColumnUsingBackgroundMigrationJob
progressNumberExample: 50
statusStringExample: active
table_nameStringExample: events