/migrations/queueQueue Migration
Proposes one or more migration files for admin approval by inserting them into the pending-migration queue with status queued.
The body accepts an array of migration payloads; each queued row carries a SHA-256 checksum of the migration content, ensuring byte-identical execution at apply time.
Emits a migration.queued audit event covering all rows in the batch.
Returns data: PendingMigration[] for the queued rows.
Requires PROJECT_ADMIN.
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 400 | K9O_INVALID_FIELD_VALUE | The request body is not a JSON object with a migrations array; fix the request and retry. |
| 403 | K9O_ACCESS_DENIED | Queuing migrations requires the PROJECT_ADMIN role. |
| data * | object[] | One entry per submitted migration, in the order submitted. |
| id * | string | The pending migration's id ( |
| version * | integer | The migration's version, an integer from 1 to 2147483647. Versions apply in ascending order. |
| slug * | string | The migration's slug, as given when it was submitted. |
| status * | "queued" | "pending_approval" |
|
| approvalId * | any | The linked approval ( |
| One of: string | ||
| or: null | ||
| affectedCollections * | string[] | The collections the migration's operations and policy section touch. |
| meta * | any | Request metadata: cost, timing and correlation ids. |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.migrations.queue()Showing example in TypeScript
{
"data": [
{
"id": "string",
"version": 0,
"slug": "string",
"status": "queued",
"approvalId": "string",
"affectedCollections": [
"string"
]
}
]
}