/migrations/{version}Get Migration
Returns the record for a single applied migration identified by its version number.
The version is the monotonic integer declared in the migration file.
Returns 404 if the version does not correspond to an applied migration in the project.
Authorized by the IAM action migrations:read (every project role holds it by default; a workload needs it on its bound IAM policy; a project service token reads as its scope's role).
| version * | path | The migration's version: an integer from 1 to 2147483647. |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_SESSION_EXPIRED | Your session has expired; re-authenticate and retry. |
| 403 | K9O_ACCESS_DENIED | You must be a project member to retrieve a specific migration. |
| 403 | K9O_IAM_POLICY_DENIED | The bound IAM policy ceiling denies migrations:read (for a workload: its bound policy does not grant it). |
| data * | object | An applied migration, with the operations it ran. |
| 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. |
| appliedAt * | string <date-time> | When the migration was applied. |
| checksum * | string | SHA-256 (hex) of the migration's canonical JSON ( Re-applying a version with a different checksum is refused. |
| noPolicy * | boolean | True when the migration was recorded as declaring no access policy. |
| affectedCollections * | string[] | The collections the migration's operations and policy section touch. |
| opPayload * | any | The migration body ( Null for migrations applied before bodies were recorded. |
| One of: object | ||
| up * | any | The migration's |
| One of: object | ||
| or: object[] | ||
| policy * | any | The migration's policy section as submitted, or null when it had none. |
| One of: object | ||
| or: null | ||
| or: null | ||
| meta * | any | Request metadata: cost, timing and correlation ids. |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.migrations.get('3')Showing example in TypeScript
{
"data": {
"version": 0,
"slug": "string",
"appliedAt": "string",
"checksum": "string",
"noPolicy": false,
"affectedCollections": [
"string"
],
"opPayload": {}
}
}