Plan schema migrations
POST /api/v1/ontology/migrations/plans: request fields and declared response contract.
POST/api/v1/ontology/migrations/plans
| Permission | parties.declareKind |
|---|---|
| Workspace scope | required |
| Scope target | workspace |
Request body
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
| kind | string | required | non-null | — |
| fields | array | required | non-null | — |
| implements | array | optional | non-null | — |
Response
201
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
| data | object | required | non-null | — |
| data.plan | object | required | non-null | — |
| data.plan.id | string | required | non-null | — |
| data.plan.companyId | string | required | non-null | — |
| data.plan.workspaceId | string | required | non-null | — |
| data.plan.kind | string | required | non-null | — |
| data.plan.diffFingerprint | string | required | non-null | — |
| data.plan.changes | array | required | non-null | — |
| data.plan.impacts | array | required | non-null | — |
| data.plan.steps | array | required | non-null | — |
| data.plan.status | "draft" | "approved" | "applied" | "abandoned" | required | non-null | — |
| data.plan.createdByMemberId | string | optional | non-null | — |
| data.plan.approvedByMemberId | string | optional | non-null | — |
| data.plan.appliedAt | string | optional | non-null | — |
| data.plan.createdAt | string | required | non-null | — |
| data.plan.updatedAt | string | required | non-null | — |
| data.created | boolean | required | non-null | — |
| data.classification | "safe" | "warning" | "breaking" | required | non-null | — |
Declared failures
| ONTOLOGY_MIGRATIONS_PLAN_FAILED | 400 — not retryable |
|---|
Readback
Read the result back with:
- ontology.migrations.get
Request example
Schematic only. Replace placeholders with real values and include all required nested fields.
POST /api/v1/ontology/migrations/plans HTTP/1.1
Authorization: Bearer <token>
x-merulan-workspace-id: <workspace-id>
Content-Type: application/json
{
"kind": "<kind>",
"fields": []
}