{"openapi":"3.1.0","info":{"title":"Data Dictionary - Catalog API (v2)","description":"Author and browse the data-dictionary catalog (v2).\n\n- Everything lives under a **tenant**: `/v1/tenants/{tenant}/models/{model}/versions/{version}/…`\n  where `{version}` is `working` (the mutable head) or a snapshot label.\n- Artifacts are addressed by **natural key**; the numeric `id` is opaque.\n- **Editable by default.** Delete is **RESTRICT** (refused with `DD030` + the dependent\n  list) unless you pass `?on_delete=cascade`.\n- **Snapshots are immutable** (sealed). Writes to a snapshot are refused (`DD010`).\n- Errors are **RFC 9457 `application/problem+json`** with a stable `code`.\n","version":"2.10.2"},"paths":{"/v1/tenants":{"get":{"tags":["tenants"],"summary":"The estate directory","description":"Every client an internal principal may know about, with what the caller can do\nwith each.\n\n**Seeing is not a capability.** An internal principal sees the estate because that is\nwhat being internal means — no grant, and no new capability in the vocabulary. A\ntenant-scoped principal (a client-bound agent or service) sees only its bound tenant;\nthat asymmetry is in `principal`'s own schema comment and this is where it starts\nbeing enforced.\n\n**A row you hold nothing on carries name, slug and status only** (decision D1) —\nenough to prove the client exists and to name it in a request, and nothing that says\nwhat we do for them. `description` is withheld there, deliberately.\n\nThis used to return only what you could use, which was right while every member held\nan all-tenants grant. Once that stopped (A1) the same behaviour would have made the\nestate go dark: a new member would see an empty selector with no way to learn a\nclient exists, let alone ask for it. Discovery and use were one switch; they are two\nnow. Pass `?access=granted` for the old meaning — which is what the Console's tenant\nselector and `dd_start` want.","operationId":"list_tenants_v1_tenants_get","parameters":[{"name":"access","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^granted$"},{"type":"null"}],"description":"`granted` restricts to tenants you can actually use","title":"Access"},"description":"`granted` restricts to tenants you can actually use"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"keyset cursor from a previous page","title":"Cursor"},"description":"keyset cursor from a previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TenantOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenants"],"summary":"Create a tenant","description":"Journalled like every other structural write (ADR-0030 R1).\n\nThe tenant was the one container whose creation recorded nothing — and it is the row\nthat answers \"who brought this client into the estate\", which now has an agent as a\nplausible answer (`design_new_tenant` in dd-mcp). The insert and its journal entry\nshare one transaction, so a tenant cannot exist unattributed.\n\nA tenant is never deleted, only archived (`PATCH …/status`), so this row is the\npermanent record of its origin.","operationId":"create_tenant_v1_tenants_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}":{"get":{"tags":["tenants"],"summary":"Get a tenant","operationId":"get_tenant_v1_tenants__tenant__get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenants"],"summary":"Update a tenant (rename / describe / archive)","operationId":"update_tenant_v1_tenants__tenant__patch","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/grants":{"get":{"tags":["tenants"],"summary":"List capability grants on a tenant","operationId":"list_grants_v1_tenants__tenant__grants_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantOut"},"title":"Response List Grants V1 Tenants  Tenant  Grants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenants"],"summary":"Grant a capability to a principal on this tenant","operationId":"create_grant_v1_tenants__tenant__grants_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Revoke a capability from a principal","operationId":"revoke_grant_v1_tenants__tenant__grants_delete","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"external_subject","in":"query","required":true,"schema":{"type":"string","title":"External Subject"}},{"name":"capability","in":"query","required":true,"schema":{"type":"string","title":"Capability"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/changes":{"get":{"tags":["tenants"],"summary":"Who changed this tenant — attributed structural history (ADR-0030)","description":"Every attributed change in the tenant, newest first — including the ones that have\nno version: mapping sets, transforms, endpoints, and capability grants/revokes, which\nare tenant-scoped and cross model boundaries by design (specs 0008).\n\nThe version-scoped feed at `…/versions/{version}/changes` is the narrower view; this\nis the one that can answer \"who granted themselves access\".","operationId":"list_tenant_changes_v1_tenants__tenant__changes_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"keyset cursor from a previous page","title":"Cursor"},"description":"keyset cursor from a previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ChangeOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/access-requests":{"post":{"tags":["access"],"summary":"Ask for access to a tenant","description":"Self-service, no capability required beyond being internal.\n\nOn a tenant whose `access_policy` is `open`, a `reader` request is **approved on the\nspot** — that is the whole point of the policy, and the decision is still recorded\nwith the tenant named as the decider rather than silently skipped.","operationId":"create_request_v1_tenants__tenant__access_requests_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["access"],"summary":"Requests on this tenant","operationId":"list_for_tenant_v1_tenants__tenant__access_requests_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessRequestOut"},"title":"Response List For Tenant V1 Tenants  Tenant  Access Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/access-requests":{"get":{"tags":["access"],"summary":"Your requests, or your inbox — across the whole estate","description":"The estate-wide view, and the reason this endpoint exists rather than only the\nper-tenant one: an approver's question is \"what is waiting for me\", not \"what is\nwaiting on this client\". Making them walk tenants to find out is how a request sits\nfor a week.\n\n`?pending=true` returns requests on every tenant the caller holds `access.manage`\non — which an all-tenants grant satisfies everywhere, so estate admins are a\nuniversal fallback with no special case.","operationId":"list_across_estate_v1_access_requests_get","parameters":[{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","description":"requests you made","default":false,"title":"Mine"},"description":"requests you made"},{"name":"pending","in":"query","required":false,"schema":{"type":"boolean","description":"requests awaiting your decision","default":false,"title":"Pending"},"description":"requests awaiting your decision"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessRequestOut"},"title":"Response List Across Estate V1 Access Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/access-requests/{request_id}/decision":{"post":{"tags":["access"],"summary":"Approve or deny a request","description":"Grants and closure commit together.\n\nA request marked approved whose grants did not land is worse than a failure: it reads\nas access somebody has. So one transaction, with the journal entry in it — and the\njournal is the answer to \"who let them in\", which is the most consequential\nstructural write there is (ADR-0030).","operationId":"decide_v1_tenants__tenant__access_requests__request_id__decision_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/access-requests/{request_id}":{"delete":{"tags":["access"],"summary":"Withdraw your own request","operationId":"withdraw_v1_tenants__tenant__access_requests__request_id__delete","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me":{"get":{"tags":["access"],"summary":"Who you are and what you can do, per tenant","description":"The caller's own identity and capabilities.\n\nUntil this existed a principal could only discover its rights by being refused: a\nwrite you are not entitled to surfaced as a 403 at the moment you attempted it, and\n`dd_start` answered \"not yet reportable\" for capabilities while its own description\nclaimed otherwise. An agent orienting itself needs to know what it may do *before*\nit plans, not after a failed call — that is the whole argument for the endpoint.\n\n`all_tenants` carries grants that are not scoped to one tenant. It is normally\nempty; a non-empty list here is the D3 blanket-grant debt showing up for the person\nwho holds it (see `GET /v1/grants?scope=all-tenants`).","operationId":"me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me V1 Me Get"}}}}}}},"/v1/meta/roles":{"get":{"tags":["access"],"summary":"The roles a request can ask for","description":"What each role grants, so a requester chooses from a described list rather than\nguessing, and a client does not hardcode the expansion.","operationId":"roles_v1_meta_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Roles V1 Meta Roles Get"}}}}}}},"/v1/grants":{"get":{"tags":["access"],"summary":"Who holds a grant across all tenants (the D3 debt)","description":"All-tenants grants, grouped by principal.\n\nThese are the rows `ensure_principal` wrote before A1: five capabilities at\n`tenant_id = NULL` for everyone who signed in. They are not wrong — somebody has to\nbe able to reach the whole estate — but most of them were never a decision, and\ntelling the two apart needs them listed.","operationId":"blanket_grants_v1_grants_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^all-tenants$","default":"all-tenants","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Blanket Grants V1 Grants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/principals/{subject}/scope-blanket-grants":{"post":{"tags":["access"],"summary":"Convert one blanket grant into per-tenant grants, from actual activity","description":"Replace a principal's all-tenants grants with per-tenant ones on the tenants they\nhave actually changed.\n\nDerived from `structural_change.accountable_principal` — what they have done, not\nwhat they might do — so somebody keeps working on what they were working on and\nloses reach over everything they never touched.\n\n**Preview by default.** This narrows someone's access, and doing that to a colleague\nwithout them or you seeing the consequence first is how a migration becomes an\noutage. `confirm=true` applies it, in one journalled transaction.\n\nIt refuses to leave them with nothing: a principal with no recorded activity is\nreported and skipped, because silently reducing them to the directory is indis-\ntinguishable from a bug and they have no way to know why.","operationId":"scope_blanket_grants_v1_principals__subject__scope_blanket_grants_post","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","description":"apply; otherwise preview","default":false,"title":"Confirm"},"description":"apply; otherwise preview"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Scope Blanket Grants V1 Principals  Subject  Scope Blanket Grants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models":{"get":{"tags":["models"],"summary":"List a tenant's models","operationId":"list_models_v1_tenants__tenant__models_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelOut"},"title":"Response List Models V1 Tenants  Tenant  Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["models"],"summary":"Create a model (with its working line)","operationId":"create_model_v1_tenants__tenant__models_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}":{"get":{"tags":["models"],"summary":"Get a model","operationId":"get_model_v1_tenants__tenant__models__model__get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["models"],"summary":"Update a model (rename / describe)","operationId":"update_model_v1_tenants__tenant__models__model__patch","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions":{"get":{"tags":["models"],"summary":"List versions: the working line + snapshots","operationId":"list_versions_v1_tenants__tenant__models__model__versions_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VersionOut"},"title":"Response List Versions V1 Tenants  Tenant  Models  Model  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}":{"get":{"tags":["models"],"summary":"Get a version ('working' or a snapshot label)","operationId":"get_version_v1_tenants__tenant__models__model__versions__version__get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/snapshots":{"get":{"tags":["models"],"summary":"List snapshots","operationId":"list_snapshots_v1_tenants__tenant__models__model__snapshots_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VersionOut"},"title":"Response List Snapshots V1 Tenants  Tenant  Models  Model  Snapshots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["models"],"summary":"Snapshot the working line into a new immutable, sealed version","description":"One call, seeded by construction (ADR-v2-0002): copies the current working state\ninto a labelled snapshot and seals it. The working line keeps evolving.","operationId":"create_snapshot_endpoint_v1_tenants__tenant__models__model__snapshots_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts":{"get":{"tags":["artifacts"],"summary":"Browse artifacts","description":"Ordered for a reader: **ordinal where the kind has one, name otherwise** — so a\ntable's columns arrive in column order and concepts arrive alphabetically.\n\nThis used to be `order by id`, which is insertion order: driver order for a harvested\nmodel, emission order for an authored one. Neither is scannable, and it only became\nthe obvious problem once the tree stopped silently stopping at 50 rows.\n\nBecause the sort is not the primary key, `next_cursor` here is an **opaque string**\nrather than the integer the other paged endpoints return. It encodes the whole sort\ntuple; pass it back unchanged.\n\n`kind_group` / `exclude_kind_group` partition a level by kind *family* rather than by\nnaming kinds one at a time. The family that matters today is `relationship`: an edge\nis not contained by anything (its identity is source+target+role, so parenting it\nunder one end would pick a side), which leaves relationships as siblings of the things\nthey relate — and in a real model they outnumber them. Asking for a level twice, once\nexcluding the family and once for only the family, is how a client renders them as a\nsubtree without inventing containment that the model does not have. The families come\nfrom `/v1/meta/kinds`, so a client never has to hardcode which kinds are relationships.","operationId":"list_artifacts_v1_tenants__tenant__models__model__versions__version__artifacts_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"layer","in":"query","required":false,"schema":{"anyOf":[{"enum":["conceptual","logical","physical","api"],"type":"string"},{"type":"null"}],"title":"Layer"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"parent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"parent natural key (containment)","title":"Parent"},"description":"parent natural key (containment)"},{"name":"top_level","in":"query","required":false,"schema":{"type":"boolean","description":"only containment roots","default":false,"title":"Top Level"},"description":"only containment roots"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"free-text over name, keys, comments, curated, prior names","title":"Q"},"description":"free-text over name, keys, comments, curated, prior names"},{"name":"kind_group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"only kinds in these families (comma-separated); from ['relationship', 'rule']","title":"Kind Group"},"description":"only kinds in these families (comma-separated); from ['relationship', 'rule']"},{"name":"exclude_kind_group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"every kind except these families (comma-separated); from ['relationship', 'rule']","title":"Exclude Kind Group"},"description":"every kind except these families (comma-separated); from ['relationship', 'rule']"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"opaque `next_cursor` from a previous page","title":"Cursor"},"description":"opaque `next_cursor` from a previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowsePage_ArtifactSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}":{"get":{"tags":["artifacts"],"summary":"Get an artifact with curated context + kind-specific detail","operationId":"get_artifact_v1_tenants__tenant__models__model__versions__version__artifacts__key__get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["artifacts"],"summary":"Create or replace an artifact — the body is its complete representation","description":"PUT replaces (ADR-v2-0008). Fields the body omits are **cleared**, which is what\nmakes an exported artifact replayable through here unchanged. To change a few fields\nand leave the rest alone, use PATCH.","operationId":"put_artifact_v1_tenants__tenant__models__model__versions__version__artifacts__key__put","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactPut"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["artifacts"],"summary":"Merge a change set into an artifact — omitted fields are unchanged","description":"PATCH merges (ADR-v2-0008). Send only what you mean to change; anything absent is\nleft as it was, including kind-specific detail. 404 if the artifact does not exist —\nthere is nothing to merge into.","operationId":"patch_artifact_v1_tenants__tenant__models__model__versions__version__artifacts__key__patch","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["artifacts"],"summary":"Delete an artifact — RESTRICT by default, CASCADE on request","description":"RESTRICT (default): refused with DD030 + the dependent list if anything is attached.\nCASCADE: removes the artifact and its dependent closure, bottom-up (ADR-v2-0003).","operationId":"delete_artifact_v1_tenants__tenant__models__model__versions__version__artifacts__key__delete","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"on_delete","in":"query","required":false,"schema":{"enum":["restrict","cascade"],"type":"string","description":"restrict (default) | cascade","default":"restrict","title":"On Delete"},"description":"restrict (default) | cascade"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/name":{"patch":{"tags":["artifacts"],"summary":"Rename display name — the stable key is unchanged (MM-6)","operationId":"rename_artifact_v1_tenants__tenant__models__model__versions__version__artifacts__key__name_patch","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/names":{"get":{"tags":["artifacts"],"summary":"Rename history","operationId":"get_names_v1_tenants__tenant__models__model__versions__version__artifacts__key__names_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NameHistoryOut"},"title":"Response Get Names V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Names Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/metadata":{"post":{"tags":["artifacts"],"summary":"Attach/replace an extensible-metadata entry","operationId":"upsert_metadata_v1_tenants__tenant__models__model__versions__version__artifacts__key__metadata_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataUpsert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upsert Metadata V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Metadata Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/realizations":{"post":{"tags":["artifacts"],"summary":"Create a realization edge (adjacent layers)","operationId":"create_realization_v1_tenants__tenant__models__model__versions__version__realizations_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealizationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Realization V1 Tenants  Tenant  Models  Model  Versions  Version  Realizations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/relationships":{"post":{"tags":["artifacts"],"summary":"Create a first-class relationship artifact (ADR-0033)","operationId":"create_relationship_v1_tenants__tenant__models__model__versions__version__relationships_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Relationship V1 Tenants  Tenant  Models  Model  Versions  Version  Relationships Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/vocabulary-drift":{"get":{"tags":["artifacts"],"summary":"Kinds present in this version's data and absent from the registry","description":"Version-scoped `/v1/meta/kinds` drift (B4).\n\nAn off-registry kind is not described by `/v1/meta/kinds`, so no client can author or\nrender it properly and an agent is never told it exists. This names them rather than\nblocking them — the open vocabulary is deliberate (ADR-0027), and reconciling a kind\nis a rename with realizations and mappings attached.","operationId":"vocabulary_drift_report_v1_tenants__tenant__models__model__versions__version__vocabulary_drift_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Vocabulary Drift Report V1 Tenants  Tenant  Models  Model  Versions  Version  Vocabulary Drift Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/links":{"post":{"tags":["artifacts"],"summary":"Assert a typed link between two artifacts (e.g. a rule constrains a concept)","description":"`artifact_relationship` — the intra-layer annotation edge from migration 0002.\n\nIt has been in the schema since the beginning and nothing ever wrote to it: snapshots\ncopied it, cascade deleted it, and no endpoint created one. That is most of why\n`BusinessRule` is a complete piece of schema with zero rows anywhere — `0003` says a\nrule reaches the concepts it constrains through `artifact_relationship\n(type='constrains')`, and that edge could not be made.\n\n**Not a relationship artifact.** `ConceptRelationship` carries curated context,\nlineage and a modeller's name because a conceptual association is part of the model.\nA link is an annotation about two artifacts with no identity of its own. Same-version\nand same-layer are enforced by `dd_relationship_guard` (DD001/DD003), not here.","operationId":"create_link_v1_tenants__tenant__models__model__versions__version__links_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Link V1 Tenants  Tenant  Models  Model  Versions  Version  Links Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["artifacts"],"summary":"Withdraw a typed link","operationId":"delete_link_v1_tenants__tenant__models__model__versions__version__links_delete","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"source","in":"query","required":true,"schema":{"type":"string","title":"Source"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","title":"Target"}},{"name":"link_type","in":"query","required":true,"schema":{"type":"string","title":"Link Type"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/keys":{"post":{"tags":["artifacts"],"summary":"Define a logical key from ordered attributes (ADR-0033)","operationId":"create_key_v1_tenants__tenant__models__model__versions__version__keys_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Key V1 Tenants  Tenant  Models  Model  Versions  Version  Keys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/changes":{"get":{"tags":["artifacts"],"summary":"Who changed this version — attributed structural history (ADR-0030)","description":"Newest first. Direct structural writes (authoring, deletes, snapshots) plus the\nbulk loads attributed by `ingestion_run`, unioned by `v_structural_attribution`.\n\nA journal nobody can read is a journal that does not exist — F2 and F3 in\nCONSOLE-FINDINGS were both write surfaces whose state could not be recovered, so\nthis ships with the writers rather than after them.","operationId":"list_changes_v1_tenants__tenant__models__model__versions__version__changes_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"target_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"filter to one artifact's natural key","title":"Target Key"},"description":"filter to one artifact's natural key"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"keyset cursor from a previous page","title":"Cursor"},"description":"keyset cursor from a previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ChangeOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/dependents":{"get":{"tags":["artifacts"],"summary":"What depends on this artifact (a cascade-delete impact preview)","operationId":"get_dependents_v1_tenants__tenant__models__model__versions__version__artifacts__key__dependents_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DependentsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/realized-by":{"get":{"tags":["traversal"],"summary":"More-concrete artifacts that realize this one (downward, transitive)","description":"e.g. a Concept → the logical entity and physical table that realize it.","operationId":"realized_by_v1_tenants__tenant__models__model__versions__version__artifacts__key__realized_by_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RealizationEdge"},"title":"Response Realized By V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Realized By Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/realizes":{"get":{"tags":["traversal"],"summary":"More-abstract artifacts this one realizes (upward, transitive)","description":"e.g. a physical Column → the logical attribute and concept attribute it realizes.","operationId":"realizes_v1_tenants__tenant__models__model__versions__version__artifacts__key__realizes_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RealizationEdge"},"title":"Response Realizes V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Realizes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/relationships":{"get":{"tags":["traversal"],"summary":"Relationships incident to this artifact (kind-aware: table/column/constraint)","description":"Intra-layer associations, plus FKs surfaced by the artifact's kind:\ntable-level edges (Table), participations (Column), or both sides (Constraint).","operationId":"relationships_v1_tenants__tenant__models__model__versions__version__artifacts__key__relationships_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/usage":{"get":{"tags":["traversal"],"summary":"Reverse lookup — what realizes this and what maps from/to it","description":"The impact view: realization chains (both directions) plus every mapping\nitem that references this artifact as a source or a target.","operationId":"usage_v1_tenants__tenant__models__model__versions__version__artifacts__key__usage_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactUsage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/lineage":{"get":{"tags":["traversal"],"summary":"Direct (1-hop) lineage neighbours — realization, FK, mapping, relationship and link edges","description":"The graph fragment centred on this artifact: its immediately adjacent\nnodes plus the typed edges to them. The Console expands node-by-node.","operationId":"lineage_v1_tenants__tenant__models__model__versions__version__artifacts__key__lineage_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"edges","in":"query","required":false,"schema":{"type":"string","default":"realization,fk,mapping,relationship,link","title":"Edges"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineageGraph"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/ancestors":{"get":{"tags":["traversal"],"summary":"Containment ancestors of this artifact, root → parent","description":"Walk the containment chain upward so a client (the tree) can reveal a\ndeep-linked artifact. Ordered outermost → immediate parent; excludes self.","operationId":"ancestors_v1_tenants__tenant__models__model__versions__version__artifacts__key__ancestors_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelatedArtifact"},"title":"Response Ancestors V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Ancestors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/context":{"get":{"tags":["curated-context"],"summary":"Current curated fields (description/usage/impact) for an artifact","operationId":"get_context_v1_tenants__tenant__models__model__versions__version__artifacts__key__context_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CuratedField"},"title":"Response Get Context V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Context Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/context/{field}":{"put":{"tags":["curated-context"],"summary":"Set or clear a curated field — appends an attributed entry; allowed on any version","description":"Append-only (CC-4): each call records a new entry; `body` null clears the\nfield (a tombstone). Exempt from snapshot immutability (CC-3).","operationId":"set_context_v1_tenants__tenant__models__model__versions__version__artifacts__key__context__field__put","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"field","in":"path","required":true,"schema":{"enum":["description","usage","impact"],"type":"string","title":"Field"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratedSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratedField"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/context/{field}/history":{"get":{"tags":["curated-context"],"summary":"Full append-only history of a curated field","operationId":"get_history_v1_tenants__tenant__models__model__versions__version__artifacts__key__context__field__history_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"field","in":"path","required":true,"schema":{"enum":["description","usage","impact"],"type":"string","title":"Field"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CuratedEntryOut"},"title":"Response Get History V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Context  Field  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/artifacts/{key}/annotations":{"get":{"tags":["annotations"],"summary":"List an artifact's context annotations","operationId":"list_annotations_v1_tenants__tenant__models__model__versions__version__artifacts__key__annotations_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","resolved","retired"],"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationOut"},"title":"Response List Annotations V1 Tenants  Tenant  Models  Model  Versions  Version  Artifacts  Key  Annotations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["annotations"],"summary":"Add a context annotation","description":"Allowed on any version — annotations are commentary, not structure (ANN-2).","operationId":"create_annotation_v1_tenants__tenant__models__model__versions__version__artifacts__key__annotations_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/annotations/{annotation_id}":{"patch":{"tags":["annotations"],"summary":"Edit or retire an annotation","operationId":"update_annotation_v1_tenants__tenant__annotations__annotation_id__patch","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"integer","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/ingest":{"post":{"tags":["ingest"],"summary":"Bulk-load a JSON bundle into the working line (one atomic transaction)","description":"Load a bundle atomically into the working line. Additive: absence never deletes.\n\n**An omitted field means two different things here, and the difference matters.**\nKind-specific `detail` honours omitted-means-unchanged — a re-ingest never blanks a\nside-table field it did not mention. The artifact's own columns (`comments`,\n`qualified_name`, `local_name`) are always written from the bundle, so a bundle that\nomits `comments` clears it.\n\nThat is right for a *full* scan — a table whose `COMMENT ON` was dropped should lose\nits comment — and wrong for a partial one. Send what the source actually holds, not a\nsubset. `PUT …/artifacts/{key}` honours omitted-means-unchanged for both, so use that\nfor targeted edits. Recorded as a known limitation for 2.0.0; the intended resolution\nis to key this off the declared coverage scope, since a bundle claiming coverage is\nasserting it saw everything in that subtree.","operationId":"ingest_v1_tenants__tenant__models__model__versions__version__ingest_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/ingest/bundle":{"post":{"tags":["ingest"],"summary":"Bulk-load a CSV bundle (multipart: manifest.json + *.csv) — CSV-native","description":"CSV-native ingest: the bundle's raw files arrive as multipart — no JSON on\nthe wire. We persist them, run the same tested CSV→payload transform\n(`bundle.build`) server-side, then the same COPY-staging merge.","operationId":"ingest_bundle_v1_tenants__tenant__models__model__versions__version__ingest_bundle_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_bundle_v1_tenants__tenant__models__model__versions__version__ingest_bundle_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/ingest/upload-url":{"post":{"tags":["ingest"],"summary":"Mint a short-lived, write-only upload URL for a bundle (ADR-0028)","operationId":"upload_url_v1_tenants__tenant__ingest_upload_url_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Url V1 Tenants  Tenant  Ingest Upload Url Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/ingest/bundles":{"get":{"tags":["ingest"],"summary":"List bundles waiting in the landing zone","operationId":"bundles_v1_tenants__tenant__ingest_bundles_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bundles V1 Tenants  Tenant  Ingest Bundles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/ingest/bundles/{name}/manifest":{"get":{"tags":["ingest"],"summary":"Preview a bundle's manifest + object counts before loading","operationId":"bundle_manifest_v1_tenants__tenant__ingest_bundles__name__manifest_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bundle Manifest V1 Tenants  Tenant  Ingest Bundles  Name  Manifest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/ingest/bundles/{name}/load":{"post":{"tags":["ingest"],"summary":"Load a landing-zone bundle into the working line (one atomic transaction)","operationId":"load_bundle_v1_tenants__tenant__ingest_bundles__name__load_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/transforms":{"post":{"tags":["mappings"],"summary":"Create a transform","operationId":"create_transform_v1_tenants__tenant__transforms_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mappings"],"summary":"List transforms","operationId":"list_transforms_v1_tenants__tenant__transforms_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"keyset cursor from a previous page","title":"Cursor"},"description":"keyset cursor from a previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TransformOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/mapping-sets":{"post":{"tags":["mappings"],"summary":"Create a mapping set","operationId":"create_mapping_set_v1_tenants__tenant__mapping_sets_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingSetCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mappings"],"summary":"List mapping sets","operationId":"list_mapping_sets_v1_tenants__tenant__mapping_sets_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"keyset cursor from a previous page","title":"Cursor"},"description":"keyset cursor from a previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MappingSetOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/mapping-sets/{set_id}":{"get":{"tags":["mappings"],"summary":"Get a mapping set with its endpoints and items","operationId":"get_mapping_set_v1_tenants__tenant__mapping_sets__set_id__get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","title":"Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingSetDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/mapping-sets/{set_id}/items/{item_id}":{"get":{"tags":["mappings"],"summary":"Get a mapping item with its sources","description":"Sources were previously write-only — addable through the API and readable\nnowhere, so nothing could show a human what a mapping actually reads from.","operationId":"get_mapping_item_v1_tenants__tenant__mapping_sets__set_id__items__item_id__get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","title":"Set Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingItemDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/mapping-sets/{set_id}/endpoints":{"post":{"tags":["mappings"],"summary":"Pin a source/target model version to the set","operationId":"add_endpoint_v1_tenants__tenant__mapping_sets__set_id__endpoints_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","title":"Set Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/mapping-sets/{set_id}/items":{"post":{"tags":["mappings"],"summary":"Add a mapping rule (target + sources)","operationId":"add_item_v1_tenants__tenant__mapping_sets__set_id__items_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","title":"Set Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/mapping-sets/{set_id}/coverage":{"get":{"tags":["mappings"],"summary":"Coverage as a derived tree — gaps are uncovered data-bearing leaves","description":"Computed, never stored (MM-1). Excludes structural scaffolding; containers\nroll up from their contents; an entity-grain mapping covers its whole subtree.\n\n`layer` matters more than it looks. Coverage walks the whole target model version and\nknows nothing about realization, so a target with a conceptual or logical layer\nreports all of it as uncovered — mappings land on physical columns, and a logical\nattribute realized *by* a mapped column is not itself a mapping target. Without the\nfilter, a three-layer mart shows dozens of gaps that are an artefact of the question\nrather than a fact about the mappings.","operationId":"coverage_v1_tenants__tenant__mapping_sets__set_id__coverage_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","title":"Set Id"}},{"name":"unmapped_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unmapped Only"}},{"name":"layer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(conceptual|logical|physical|api)$"},{"type":"null"}],"description":"restrict to one layer of the target model","title":"Layer"},"description":"restrict to one layer of the target model"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoverageRow"},"title":"Response Coverage V1 Tenants  Tenant  Mapping Sets  Set Id  Coverage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/stale-in-source":{"get":{"tags":["mappings"],"summary":"Artifacts a source no longer reports","description":"Populated once scope-declaring ingestion runs exist (specs 0006 IN-6).\nTenant-scoped via the scope artifact's model.","operationId":"stale_in_source_v1_tenants__tenant__stale_in_source_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StaleRow"},"title":"Response Stale In Source V1 Tenants  Tenant  Stale In Source Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta/kinds":{"get":{"tags":["discovery"],"summary":"Artifact kinds, their containment rules, and their detail fields","description":"Every artifact kind: its layer, the parent kinds it may sit under, and the\ndetail fields it carries with types and permitted values.\n\nField definitions are read from the live schema rather than declared, so they cannot\ndrift from it. Containment is convention the database does not police beyond\nsame-layer (`DD004`) — a client should not offer an illegal parent in the first place.","operationId":"kinds_v1_meta_kinds_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Kinds V1 Meta Kinds Get"}}}}}}},"/v1/meta/link-types":{"get":{"tags":["discovery"],"summary":"Typed links that may be asserted between two artifacts","description":"The `artifact_relationship` vocabulary.\n\nValidated, unlike artifact kinds. A kind earns an open vocabulary because it brings a\nside table with it (ADR-0027); a link type is a bare string on a generic edge, so\nleaving it open would buy no capability and cost what B4 documents — two names for\none idea, sitting in the data with nothing to notice it.","operationId":"link_types_v1_meta_link_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Link Types V1 Meta Link Types Get"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/working/reconcile":{"post":{"tags":["reconciliation"],"summary":"Diff an observed bundle against the working design (dry run — persists nothing)","description":"Reconciliation is design-first's closing step: read a deployed database back\n(as an ingest-shaped bundle) and see how the design and reality differ. Nothing\nis written — apply the changes by ingesting the bundle into the working line.","operationId":"reconcile_v1_tenants__tenant__models__model__versions_working_reconcile_post","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reconcile V1 Tenants  Tenant  Models  Model  Versions Working Reconcile Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/drift":{"get":{"tags":["reconciliation"],"summary":"Persisted schema drift for a version (design artifacts a source scan no longer reports)","operationId":"drift_v1_tenants__tenant__models__model__versions__version__drift_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Drift V1 Tenants  Tenant  Models  Model  Versions  Version  Drift Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/diff":{"get":{"tags":["reconciliation"],"summary":"Diff two versions of this model (snapshot↔working or snapshot↔snapshot)","operationId":"diff_v1_tenants__tenant__models__model__diff_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"version selector: 'working' or a snapshot label","default":"working","title":"From"},"description":"version selector: 'working' or a snapshot label"},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"version selector: 'working' or a snapshot label","default":"working","title":"To"},"description":"version selector: 'working' or a snapshot label"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Diff V1 Tenants  Tenant  Models  Model  Diff Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant}/models/{model}/versions/{version}/export":{"get":{"tags":["reconciliation"],"summary":"Export the version as a canonical bundle (the inverse of ingest)","description":"Emit the version in the `IngestRequest` shape — artifacts with kind-specific\ndetail, ordered constraint/index/key members, and a coverage scope.\n\nStreamed, because the largest migrated model is ~99k artifacts and building the\nwhole payload in memory to serialise it is what this endpoint exists to avoid.\nRound-trips exactly: ingesting the result into the same version is a no-op.","operationId":"export_v1_tenants__tenant__models__model__versions__version__export_get","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","title":"Tenant"}},{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"layer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(conceptual|logical|physical|api)$"},{"type":"null"}],"description":"restrict to one layer; a renderer wants 'physical'","title":"Layer"},"description":"restrict to one layer; a renderer wants 'physical'"},{"name":"source_system","in":"query","required":false,"schema":{"type":"string","description":"source_system stamped on the bundle","default":"dd-export","title":"Source System"},"description":"source_system stamped on the bundle"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills":{"get":{"tags":["skills"],"summary":"List the agent skills this API bundles (agentskills.io format)","description":"Discovery: the `name` + `description` of each bundled skill and the URL to fetch its\n`SKILL.md`. Each skill is a standard Agent Skills folder (https://agentskills.io).","operationId":"list_skills_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Skills Skills Get"}}}}}}},"/skills/{name}/{path}":{"get":{"tags":["skills"],"summary":"Fetch a file from a bundled skill (its SKILL.md, or a referenced/asset file)","operationId":"get_skill_file_skills__name___path__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"tags":["meta"],"summary":"Liveness","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/readyz":{"get":{"tags":["meta"],"summary":"Readiness (DB reachable)","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readyz Readyz Get"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["meta"],"summary":"OAuth Protected Resource Metadata (RFC 9728) — how to authenticate to this API","description":"Unauthenticated discovery: a standard, machine-readable pointer to the\nauthorization server + scope, so an agent can bootstrap auth with no out-of-band\nknowledge. `WWW-Authenticate` on a 401 points here too.\n\nComposition lives in `discovery.py` so `dd-mcp` publishes its own document from the\nsame rules rather than a copy that drifts (ADR-v2-0009).","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Protected Resource Metadata  Well Known Oauth Protected Resource Get"}}}}}}},"/v1/auth/documentation":{"get":{"tags":["meta"],"summary":"How to authenticate + the capability vocabulary (human/agent-readable)","description":"Unauthenticated, opinionated auth guide — flows, how to get a token, the\ncapability vocabulary, and where the docs/metadata live. The single 'how do I call\nthis' reference for a human or an agent.","operationId":"auth_documentation_v1_auth_documentation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Auth Documentation V1 Auth Documentation Get"}}}}}}}},"components":{"schemas":{"AccessDecision":{"properties":{"approve":{"type":"boolean","title":"Approve"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"on approval: when the grants lapse. Null = permanent"},"role":{"anyOf":[{"type":"string","enum":["reader","contributor","manager","admin"]},{"type":"null"}],"title":"Role","description":"grant a different role than was asked for"}},"type":"object","required":["approve"],"title":"AccessDecision"},"AccessRequestIn":{"properties":{"role":{"type":"string","enum":["reader","contributor","manager","admin"],"title":"Role","default":"reader"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"why you need it; the approver reads this"},"requested_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested Until","description":"an asked-for expiry; the decider may set their own"}},"type":"object","title":"AccessRequestIn","description":"Ask for access to a tenant. A role, not a capability — one decision instead of\neight, expanded on approval."},"AccessRequestOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant":{"type":"string","title":"Tenant"},"principal":{"type":"string","title":"Principal"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"requested_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested Until"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"decision_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"grants":{"items":{"type":"string"},"type":"array","title":"Grants"}},"type":"object","required":["id","tenant","principal","role","status","created_at"],"title":"AccessRequestOut"},"AnnotationCreate":{"properties":{"annotation_type":{"type":"string","enum":["note","caveat","example","link"],"title":"Annotation Type","default":"note"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"AnnotationCreate"},"AnnotationOut":{"properties":{"id":{"type":"integer","title":"Id"},"artifact_id":{"type":"integer","title":"Artifact Id"},"author":{"type":"string","title":"Author"},"annotation_type":{"type":"string","title":"Annotation Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"type":"string","title":"Body"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","artifact_id","author","annotation_type","body","status","created_at","updated_at"],"title":"AnnotationOut"},"AnnotationUpdate":{"properties":{"annotation_type":{"anyOf":[{"type":"string","enum":["note","caveat","example","link"]},{"type":"null"}],"title":"Annotation Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"status":{"anyOf":[{"type":"string","enum":["active","resolved","retired"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"AnnotationUpdate"},"ArtifactDetail":{"properties":{"id":{"type":"integer","title":"Id"},"layer":{"type":"string","title":"Layer"},"kind":{"type":"string","title":"Kind"},"local_name":{"type":"string","title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Key"},"parent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Key"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"lifecycle_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"curated":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Curated","default":[]},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"metadata":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Metadata","default":[]}},"type":"object","required":["id","layer","kind","local_name"],"title":"ArtifactDetail"},"ArtifactPatch":{"properties":{"layer":{"anyOf":[{"type":"string","enum":["conceptual","logical","physical","api"]},{"type":"null"}],"title":"Layer"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"local_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"source_identity_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Identity Key"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"lifecycle_status":{"anyOf":[{"type":"string","enum":["active","deprecated","proposed","retired"]},{"type":"null"}],"title":"Lifecycle Status"},"parent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Key"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"}},"type":"object","title":"ArtifactPatch","description":"A change set. PATCH merges: anything this omits is left alone. Send only what you\nmean to change — the counterpart to PUT, not a synonym for it."},"ArtifactPut":{"properties":{"layer":{"type":"string","enum":["conceptual","logical","physical","api"],"title":"Layer"},"kind":{"type":"string","title":"Kind"},"local_name":{"type":"string","title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"source_identity_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Identity Key"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"lifecycle_status":{"type":"string","enum":["active","deprecated","proposed","retired"],"title":"Lifecycle Status","default":"active"},"parent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Key","description":"parent artifact natural key (containment)"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail","description":"kind-specific side-table fields"}},"type":"object","required":["layer","kind","local_name"],"title":"ArtifactPut","description":"The artifact's complete representation (ADR-v2-0008). PUT replaces: anything this\nomits is cleared. It is the same shape export emits, so an exported artifact can be\nreplayed through PUT unchanged."},"ArtifactRef":{"properties":{"model":{"type":"string","title":"Model"},"version":{"type":"string","title":"Version"},"key":{"type":"string","title":"Key","description":"natural key"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant","description":"cross-tenant soft ref; defaults to the mapping set's tenant"}},"type":"object","required":["model","version","key"],"title":"ArtifactRef"},"ArtifactRelationships":{"properties":{"relationships":{"items":{"$ref":"#/components/schemas/RelationshipEdgeOut"},"type":"array","title":"Relationships"},"foreign_keys":{"items":{"$ref":"#/components/schemas/FkEdgeOut"},"type":"array","title":"Foreign Keys"},"participates_in_fks":{"items":{"$ref":"#/components/schemas/FkParticipation"},"type":"array","title":"Participates In Fks"},"fk_endpoints":{"anyOf":[{"$ref":"#/components/schemas/FkEndpoints"},{"type":"null"}]},"links":{"items":{"$ref":"#/components/schemas/LinkOut"},"type":"array","title":"Links"}},"type":"object","title":"ArtifactRelationships","description":"Relationships for one artifact, kind-aware: intra-layer `relationships`;\na Table's `foreign_keys`; a Column's `participates_in_fks`; a Constraint's\n`fk_endpoints` (both sides)."},"ArtifactSummary":{"properties":{"id":{"type":"integer","title":"Id"},"layer":{"type":"string","title":"Layer"},"kind":{"type":"string","title":"Kind"},"local_name":{"type":"string","title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Key"},"parent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Key"}},"type":"object","required":["id","layer","kind","local_name"],"title":"ArtifactSummary"},"ArtifactUsage":{"properties":{"realizes":{"items":{"$ref":"#/components/schemas/RealizationEdge"},"type":"array","title":"Realizes"},"realized_by":{"items":{"$ref":"#/components/schemas/RealizationEdge"},"type":"array","title":"Realized By"},"mappings":{"items":{"$ref":"#/components/schemas/UsageMapping"},"type":"array","title":"Mappings"}},"type":"object","title":"ArtifactUsage","description":"Consolidated reverse lookup — what realizes/maps to or from this artifact."},"Body_ingest_bundle_v1_tenants__tenant__models__model__versions__version__ingest_bundle_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_ingest_bundle_v1_tenants__tenant__models__model__versions__version__ingest_bundle_post"},"BrowsePage_ArtifactSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ArtifactSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"pass as ?cursor= for the next page"}},"type":"object","required":["items"],"title":"BrowsePage[ArtifactSummary]"},"ChangeOut":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"operation":{"type":"string","title":"Operation"},"target_kind":{"type":"string","title":"Target Kind"},"target_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Key"},"accountable_principal":{"type":"string","title":"Accountable Principal"},"acting_principal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acting Principal"},"author":{"type":"string","title":"Author"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["created_at","operation","target_kind","accountable_principal","author"],"title":"ChangeOut","description":"One attributed change to a version or tenant (ADR-0030 R1).\n\n`accountable_principal` is the party answerable for the change — the human, whenever\none is behind it. `acting_principal` is what actually made the call: the Console, an\nagent, the MCP server. Under on-behalf-of they differ, and that difference is the\nwhole point of recording both."},"ConstraintColumnIn":{"properties":{"constraint_key":{"type":"string","title":"Constraint Key"},"ordinal":{"type":"integer","title":"Ordinal"},"column_key":{"type":"string","title":"Column Key"},"referenced_column_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referenced Column Key"}},"type":"object","required":["constraint_key","ordinal","column_key"],"title":"ConstraintColumnIn"},"CoverageIn":{"properties":{"scope_keys":{"items":{"type":"string"},"type":"array","title":"Scope Keys","description":"natural keys of fully-observed containers"},"recursive":{"type":"boolean","title":"Recursive","default":true}},"type":"object","title":"CoverageIn"},"CoverageRow":{"properties":{"target_artifact_id":{"type":"integer","title":"Target Artifact Id"},"layer":{"type":"string","title":"Layer"},"kind":{"type":"string","title":"Kind"},"local_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Key"},"depth":{"type":"integer","title":"Depth","default":0},"is_container":{"type":"boolean","title":"Is Container","default":false},"mappable":{"type":"boolean","title":"Mappable","default":true},"directly_mapped":{"type":"boolean","title":"Directly Mapped","default":false},"total_leaves":{"type":"integer","title":"Total Leaves","default":0},"mapped_leaves":{"type":"integer","title":"Mapped Leaves","default":0},"is_covered":{"type":"boolean","title":"Is Covered","default":false}},"type":"object","required":["target_artifact_id","layer","kind"],"title":"CoverageRow","description":"A node in the derived coverage tree (MM-1: computed, never stored).\nGaps are uncovered, data-bearing *leaves*; containers roll up; structural\nscaffolding (constraints, indexes, …) is excluded entirely."},"CuratedEntryOut":{"properties":{"id":{"type":"integer","title":"Id"},"field":{"type":"string","title":"Field"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"author":{"type":"string","title":"Author"},"authored_in_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authored In Version Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","field","author","created_at"],"title":"CuratedEntryOut"},"CuratedField":{"properties":{"field":{"type":"string","title":"Field"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"last_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Changed At"},"authored_in_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authored In Version Id"},"changed_in_this_version":{"type":"boolean","title":"Changed In This Version","default":false}},"type":"object","required":["field"],"title":"CuratedField","description":"A current curated-meaning field on an artifact. Identity-scoped (shared\nacross versions); `changed_in_this_version` flags edits in the viewed version."},"CuratedSet":{"properties":{"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"CuratedSet","description":"Set a curated field. `body` null clears it (a tombstone). Allowed on any\nversion (CC-3); author from the caller's identity."},"DeleteResult":{"properties":{"status":{"type":"string","title":"Status"},"key":{"type":"string","title":"Key"},"on_delete":{"type":"string","title":"On Delete"},"removed":{"type":"integer","title":"Removed","description":"artifacts removed (1 for restrict; closure size for cascade)"}},"type":"object","required":["status","key","on_delete","removed"],"title":"DeleteResult"},"Dependent":{"properties":{"relation":{"type":"string","title":"Relation","description":"how it depends: child|realization|relationship|key-column|constraint-column|index-column"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Key"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["relation"],"title":"Dependent"},"DependentsOut":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"},"dependents":{"items":{"$ref":"#/components/schemas/Dependent"},"type":"array","title":"Dependents"}},"type":"object","required":["key","count","dependents"],"title":"DependentsOut"},"EndpointCreate":{"properties":{"role":{"type":"string","enum":["source","target"],"title":"Role"},"model":{"type":"string","title":"Model"},"version":{"type":"string","title":"Version"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant","description":"cross-tenant soft ref; defaults to the mapping set's tenant"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"}},"type":"object","required":["role","model","version"],"title":"EndpointCreate"},"EndpointOut":{"properties":{"id":{"type":"integer","title":"Id"},"role":{"type":"string","title":"Role"},"model_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Version Id"},"pinned_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinned Label"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant"}},"type":"object","required":["id","role"],"title":"EndpointOut"},"FkColumnPair":{"properties":{"ordinal":{"type":"integer","title":"Ordinal"},"referencing_column":{"type":"string","title":"Referencing Column"},"referenced_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referenced Column"}},"type":"object","required":["ordinal","referencing_column"],"title":"FkColumnPair"},"FkEdgeOut":{"properties":{"direction":{"type":"string","enum":["outgoing","incoming"],"title":"Direction"},"constraint_id":{"type":"integer","title":"Constraint Id"},"on_delete":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On Delete"},"on_update":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On Update"},"other":{"$ref":"#/components/schemas/RelatedArtifact"}},"type":"object","required":["direction","constraint_id","other"],"title":"FkEdgeOut"},"FkEndpoints":{"properties":{"referencing_table":{"anyOf":[{"$ref":"#/components/schemas/RelatedArtifact"},{"type":"null"}]},"referenced_table":{"anyOf":[{"$ref":"#/components/schemas/RelatedArtifact"},{"type":"null"}]},"columns":{"items":{"$ref":"#/components/schemas/FkColumnPair"},"type":"array","title":"Columns"},"on_delete":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On Delete"},"on_update":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On Update"}},"type":"object","title":"FkEndpoints","description":"Both sides of a FK *constraint* — all by natural key, no ids."},"FkParticipation":{"properties":{"role":{"type":"string","enum":["referencing","referenced"],"title":"Role"},"constraint":{"$ref":"#/components/schemas/RelatedArtifact"},"other_column":{"anyOf":[{"$ref":"#/components/schemas/RelatedArtifact"},{"type":"null"}]},"other_table":{"anyOf":[{"$ref":"#/components/schemas/RelatedArtifact"},{"type":"null"}]}},"type":"object","required":["role","constraint"],"title":"FkParticipation","description":"A FK a *column* takes part in. role = this column's side."},"GrantIn":{"properties":{"external_subject":{"type":"string","title":"External Subject","description":"the principal's stable Entra subject/oid"},"capability":{"type":"string","enum":["read","ingest","annotate","curate","version.manage","access.manage","principal.manage","admin"],"title":"Capability"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"kind":{"type":"string","enum":["human","agent","service"],"title":"Kind","default":"human"}},"type":"object","required":["external_subject","capability"],"title":"GrantIn"},"GrantOut":{"properties":{"external_subject":{"type":"string","title":"External Subject"},"capability":{"type":"string","title":"Capability"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant"}},"type":"object","required":["external_subject","capability"],"title":"GrantOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IndexColumnIn":{"properties":{"index_key":{"type":"string","title":"Index Key"},"ordinal":{"type":"integer","title":"Ordinal"},"column_key":{"type":"string","title":"Column Key"},"is_included":{"type":"boolean","title":"Is Included","default":false},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},"type":"object","required":["index_key","ordinal","column_key"],"title":"IndexColumnIn"},"IngestArtifact":{"properties":{"layer":{"type":"string","enum":["conceptual","logical","physical","api"],"title":"Layer"},"kind":{"type":"string","title":"Kind"},"natural_key":{"type":"string","title":"Natural Key"},"parent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Key"},"local_name":{"type":"string","title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail","description":"kind-specific side-table fields; a Constraint may include 'referenced_table_key'"}},"type":"object","required":["layer","kind","natural_key","local_name"],"title":"IngestArtifact"},"IngestReport":{"properties":{"run_id":{"type":"integer","title":"Run Id"},"artifacts":{"type":"integer","title":"Artifacts"},"inserted":{"type":"integer","title":"Inserted"},"updated":{"type":"integer","title":"Updated"},"deduped":{"type":"integer","title":"Deduped","default":0},"constraint_columns":{"type":"integer","title":"Constraint Columns"},"index_columns":{"type":"integer","title":"Index Columns"},"key_columns":{"type":"integer","title":"Key Columns","default":0},"realizations":{"type":"integer","title":"Realizations","default":0},"links":{"type":"integer","title":"Links","default":0},"coverage_scopes":{"type":"integer","title":"Coverage Scopes"}},"type":"object","required":["run_id","artifacts","inserted","updated","constraint_columns","index_columns","coverage_scopes"],"title":"IngestReport"},"IngestRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"artifacts":{"items":{"$ref":"#/components/schemas/IngestArtifact"},"type":"array","title":"Artifacts"},"constraint_columns":{"items":{"$ref":"#/components/schemas/ConstraintColumnIn"},"type":"array","title":"Constraint Columns","default":[]},"index_columns":{"items":{"$ref":"#/components/schemas/IndexColumnIn"},"type":"array","title":"Index Columns","default":[]},"key_columns":{"items":{"$ref":"#/components/schemas/KeyColumnIn"},"type":"array","title":"Key Columns","default":[]},"realizations":{"items":{"$ref":"#/components/schemas/RealizationIn"},"type":"array","title":"Realizations","default":[]},"links":{"items":{"$ref":"#/components/schemas/LinkIn"},"type":"array","title":"Links","default":[]},"coverage":{"anyOf":[{"$ref":"#/components/schemas/CoverageIn"},{"type":"null"}]}},"type":"object","required":["source_system","artifacts"],"title":"IngestRequest","description":"A bundle to load atomically into the working line (specs 0006)."},"KeyColumnIn":{"properties":{"key_key":{"type":"string","title":"Key Key"},"attribute_key":{"type":"string","title":"Attribute Key"},"ordinal":{"type":"integer","title":"Ordinal"}},"type":"object","required":["key_key","attribute_key","ordinal"],"title":"KeyColumnIn"},"KeyCreate":{"properties":{"entity":{"type":"string","title":"Entity"},"key_type":{"type":"string","enum":["primary","candidate","alternate"],"title":"Key Type","default":"primary"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"attributes":{"items":{"type":"string"},"type":"array","title":"Attributes"}},"type":"object","required":["entity","attributes"],"title":"KeyCreate"},"LineageEdge":{"properties":{"source":{"type":"integer","title":"Source"},"target":{"type":"integer","title":"Target"},"type":{"type":"string","enum":["realization","fk","mapping","relationship","link"],"title":"Type"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"source_cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Cardinality"},"target_cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Cardinality"},"source_optionality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Optionality"},"target_optionality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Optionality"},"relationship_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Key"}},"type":"object","required":["source","target","type"],"title":"LineageEdge","description":"A directed edge between two node ids. Direction is meaningful per type:\nrealization abstract→concrete; fk referencing→referenced; mapping source→target."},"LineageGraph":{"properties":{"focus_id":{"type":"integer","title":"Focus Id"},"nodes":{"items":{"$ref":"#/components/schemas/LineageNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/LineageEdge"},"type":"array","title":"Edges"}},"type":"object","required":["focus_id"],"title":"LineageGraph","description":"The 1-hop neighbourhood of the focus artifact."},"LineageNode":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"local_name":{"type":"string","title":"Local Name"},"layer":{"type":"string","title":"Layer"},"kind":{"type":"string","title":"Kind"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"model":{"type":"string","title":"Model"},"version":{"type":"string","title":"Version"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"is_focus":{"type":"boolean","title":"Is Focus","default":false}},"type":"object","required":["id","local_name","layer","kind","model","version"],"title":"LineageNode","description":"A graph node. `id` is the global artifact id (a stable node id);\n`key`+`model`+`version` let the client deep-link and expand."},"LinkCreate":{"properties":{"source":{"type":"string","title":"Source","description":"natural key of the asserting artifact (e.g. a BusinessRule)"},"target":{"type":"string","title":"Target","description":"natural key of the artifact it is asserted about"},"link_type":{"type":"string","title":"Link Type","description":"from /v1/meta/link-types, e.g. 'constrains'"},"semantics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semantics","description":"free note on what the link means here"}},"type":"object","required":["source","target","link_type"],"title":"LinkCreate","description":"A typed edge between two artifacts in one version and layer (`artifact_relationship`).\nDistinct from a relationship *artifact* — see `app/links.py`."},"LinkIn":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"link_type":{"type":"string","title":"Link Type","description":"from /v1/meta/link-types, e.g. 'constrains'"},"semantics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semantics"}},"type":"object","required":["source","target","link_type"],"title":"LinkIn","description":"A typed intra-layer annotation edge — today, a BusinessRule constraining a\nconcept. Lost on export for the same reason realizations were."},"LinkOut":{"properties":{"direction":{"type":"string","enum":["outgoing","incoming"],"title":"Direction"},"link_type":{"type":"string","title":"Link Type"},"semantics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semantics"},"other":{"$ref":"#/components/schemas/ArtifactSummary"}},"type":"object","required":["direction","link_type","other"],"title":"LinkOut"},"LoadIn":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"version":{"type":"string","title":"Version","default":"working"}},"type":"object","title":"LoadIn"},"MappingItemCreate":{"properties":{"target":{"$ref":"#/components/schemas/ArtifactRef"},"grain":{"type":"string","enum":["entity","attribute"],"title":"Grain"},"transform_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transform Name","description":"reference a tenant transform (precedence over inline)"},"transformation_type":{"anyOf":[{"type":"string","enum":["direct","cast","derived","constant","lookup","concatenate","split","aggregate","filter","unmapped"]},{"type":"null"}],"title":"Transformation Type"},"transformation_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transformation Expression"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"status":{"type":"string","enum":["proposed","confirmed","implemented"],"title":"Status","default":"proposed"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"sources":{"items":{"$ref":"#/components/schemas/MappingSourceIn"},"type":"array","title":"Sources","default":[]}},"type":"object","required":["target","grain"],"title":"MappingItemCreate"},"MappingItemDetail":{"properties":{"id":{"type":"integer","title":"Id"},"target_natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Natural Key"},"grain":{"type":"string","title":"Grain"},"transformation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transformation Type"},"status":{"type":"string","title":"Status"},"source_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Count"},"transformation_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transformation Expression"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"sources":{"items":{"$ref":"#/components/schemas/MappingSourceOut"},"type":"array","title":"Sources","default":[]}},"type":"object","required":["id","grain","status"],"title":"MappingItemDetail","description":"An item with the sources it reads from — the read side of what the item editor\nwrites."},"MappingItemOut":{"properties":{"id":{"type":"integer","title":"Id"},"target_natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Natural Key"},"grain":{"type":"string","title":"Grain"},"transformation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transformation Type"},"status":{"type":"string","title":"Status"},"source_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Count"}},"type":"object","required":["id","grain","status"],"title":"MappingItemOut"},"MappingSetCreate":{"properties":{"name":{"type":"string","title":"Name"},"purpose":{"type":"string","enum":["migration","integration","enrichment","replication","reconciliation","other"],"title":"Purpose"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Label"},"status":{"type":"string","enum":["draft","in-review","stable","retired"],"title":"Status","default":"draft"},"supersedes_mapping_set_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supersedes Mapping Set Id"}},"type":"object","required":["name","purpose"],"title":"MappingSetCreate"},"MappingSetDetail":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"purpose":{"type":"string","title":"Purpose"},"status":{"type":"string","title":"Status"},"version_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"supersedes_mapping_set_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supersedes Mapping Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointOut"},"type":"array","title":"Endpoints","default":[]},"items":{"items":{"$ref":"#/components/schemas/MappingItemOut"},"type":"array","title":"Items","default":[]}},"type":"object","required":["id","name","purpose","status"],"title":"MappingSetDetail"},"MappingSetOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"purpose":{"type":"string","title":"Purpose"},"status":{"type":"string","title":"Status"},"version_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"supersedes_mapping_set_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supersedes Mapping Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name","purpose","status"],"title":"MappingSetOut"},"MappingSourceIn":{"properties":{"model":{"type":"string","title":"Model"},"version":{"type":"string","title":"Version"},"key":{"type":"string","title":"Key","description":"natural key"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant","description":"cross-tenant soft ref; defaults to the mapping set's tenant"},"role":{"anyOf":[{"type":"string","enum":["key","input","filter"]},{"type":"null"}],"title":"Role"},"ordinal":{"type":"integer","title":"Ordinal","default":1}},"type":"object","required":["model","version","key"],"title":"MappingSourceIn"},"MappingSourceOut":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"ordinal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ordinal"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant"}},"type":"object","required":["id"],"title":"MappingSourceOut"},"MetadataUpsert":{"properties":{"namespace":{"type":"string","title":"Namespace"},"key":{"type":"string","title":"Key"},"value":{"title":"Value"},"value_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Type"}},"type":"object","required":["namespace","key"],"title":"MetadataUpsert"},"ModelCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"ModelCreate"},"ModelOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tenant":{"type":"string","title":"Tenant"}},"type":"object","required":["id","name","tenant"],"title":"ModelOut"},"ModelUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ModelUpdate"},"NameHistoryOut":{"properties":{"display_name":{"type":"string","title":"Display Name"},"local_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Name"},"author":{"type":"string","title":"Author"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["display_name","author","created_at"],"title":"NameHistoryOut"},"Page_ChangeOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChangeOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor","description":"pass as ?cursor= for the next page"}},"type":"object","required":["items"],"title":"Page[ChangeOut]"},"Page_MappingSetOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MappingSetOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor","description":"pass as ?cursor= for the next page"}},"type":"object","required":["items"],"title":"Page[MappingSetOut]"},"Page_TenantOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TenantOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor","description":"pass as ?cursor= for the next page"}},"type":"object","required":["items"],"title":"Page[TenantOut]"},"Page_TransformOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TransformOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor","description":"pass as ?cursor= for the next page"}},"type":"object","required":["items"],"title":"Page[TransformOut]"},"RealizationCreate":{"properties":{"higher":{"type":"string","title":"Higher"},"lower":{"type":"string","title":"Lower"},"mapping_type":{"type":"string","enum":["exact","partial","derived","aggregate"],"title":"Mapping Type","default":"exact"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["higher","lower"],"title":"RealizationCreate"},"RealizationEdge":{"properties":{"artifact_id":{"type":"integer","title":"Artifact Id"},"layer":{"type":"string","title":"Layer"},"kind":{"type":"string","title":"Kind"},"local_name":{"type":"string","title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"depth":{"type":"integer","title":"Depth"}},"type":"object","required":["artifact_id","layer","kind","local_name","depth"],"title":"RealizationEdge"},"RealizationIn":{"properties":{"higher":{"type":"string","title":"Higher"},"lower":{"type":"string","title":"Lower"},"mapping_type":{"type":"string","enum":["exact","partial","derived","aggregate"],"title":"Mapping Type","default":"exact"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["higher","lower"],"title":"RealizationIn","description":"A vertical cross-layer edge, by natural key.\n\nWithout this the bundle carried artifacts and nothing joining the layers, so an\nexported model re-ingested elsewhere lost every Concept->Entity->Table connection\n(ADR-v2-0006 R1 requires `ingest o export = id`, which that broke)."},"RelatedArtifact":{"properties":{"artifact_id":{"type":"integer","title":"Artifact Id"},"layer":{"type":"string","title":"Layer"},"kind":{"type":"string","title":"Kind"},"local_name":{"type":"string","title":"Local Name"},"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Key"}},"type":"object","required":["artifact_id","layer","kind","local_name"],"title":"RelatedArtifact"},"RelationshipCreate":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"name":{"type":"string","title":"Name"},"inverse_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inverse Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"natural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Key"},"source_cardinality":{"anyOf":[{"type":"string","enum":["one","many"]},{"type":"null"}],"title":"Source Cardinality"},"target_cardinality":{"anyOf":[{"type":"string","enum":["one","many"]},{"type":"null"}],"title":"Target Cardinality"},"source_optionality":{"anyOf":[{"type":"string","enum":["mandatory","optional"]},{"type":"null"}],"title":"Source Optionality"},"target_optionality":{"anyOf":[{"type":"string","enum":["mandatory","optional"]},{"type":"null"}],"title":"Target Optionality"},"is_identifying":{"type":"boolean","title":"Is Identifying","default":false},"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"}},"type":"object","required":["source","target","name"],"title":"RelationshipCreate"},"RelationshipEdgeOut":{"properties":{"direction":{"type":"string","enum":["outgoing","incoming"],"title":"Direction"},"relationship_type":{"type":"string","title":"Relationship Type","description":"'logical' | 'concept'"},"relationship_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Key"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardinality","description":"derived compact form: 1:1 | 1:N | N:M"},"source_cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Cardinality"},"target_cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Cardinality"},"source_optionality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Optionality"},"target_optionality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Optionality"},"is_identifying":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Identifying","description":"logical only; null for conceptual"},"is_mandatory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Mandatory"},"semantics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semantics","description":"definition (artifact comment) or justification"},"other":{"$ref":"#/components/schemas/RelatedArtifact"}},"type":"object","required":["direction","relationship_type","other"],"title":"RelationshipEdgeOut","description":"A first-class relationship (ADR-0033) incident to an artifact. Barker\nnotation: `name` is the verb phrase read in `direction`; per-end cardinality\nand optionality are authoritative, `cardinality` is the derived compact form."},"RenameRequest":{"properties":{"qualified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualified Name"},"local_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Name"}},"type":"object","title":"RenameRequest"},"SnapshotCreate":{"properties":{"label":{"type":"string","title":"Label","description":"the snapshot tag, unique within the model"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Summary"},"change_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Rationale"}},"type":"object","required":["label"],"title":"SnapshotCreate"},"StaleRow":{"properties":{"source_system":{"type":"string","title":"Source System"},"scope_artifact_id":{"type":"integer","title":"Scope Artifact Id"},"stale_artifact_id":{"type":"integer","title":"Stale Artifact Id"}},"type":"object","required":["source_system","scope_artifact_id","stale_artifact_id"],"title":"StaleRow"},"TenantAccess":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","description":"empty = visible in the directory only"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"when the access lapses"},"policy":{"type":"string","title":"Policy","description":"gated = an approver decides; open = `reader` auto-approves","default":"gated"},"request":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request","description":"the caller's own open request, if any"},"has_approver":{"type":"boolean","title":"Has Approver","description":"false = nobody holds access.manage here, so a request would queue forever","default":true}},"type":"object","title":"TenantAccess","description":"What the caller may do with this tenant, and how to get more.\n\nPresent on every directory row so \"can I open this, and if not what now\" is one\nread rather than a 403 and a hunt."},"TenantCreate":{"properties":{"slug":{"type":"string","title":"Slug","description":"stable, URL-safe id used in paths"},"name":{"type":"string","title":"Name","description":"display name (shown as 'client' in the Console)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["slug","name"],"title":"TenantCreate"},"TenantOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status","default":"active"},"access":{"anyOf":[{"$ref":"#/components/schemas/TenantAccess"},{"type":"null"}]}},"type":"object","required":["id","slug","name"],"title":"TenantOut"},"TenantUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","enum":["active","archived"]},{"type":"null"}],"title":"Status"},"access_policy":{"anyOf":[{"type":"string","enum":["gated","open"]},{"type":"null"}],"title":"Access Policy"}},"type":"object","title":"TenantUpdate"},"TransformCreate":{"properties":{"name":{"type":"string","title":"Name"},"transformation_type":{"type":"string","enum":["direct","cast","derived","constant","lookup","concatenate","split","aggregate","filter","unmapped"],"title":"Transformation Type"},"expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expression"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","transformation_type"],"title":"TransformCreate"},"TransformOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"transformation_type":{"type":"string","title":"Transformation Type"},"expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expression"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","transformation_type"],"title":"TransformOut"},"UploadUrlIn":{"properties":{"filename":{"type":"string","title":"Filename","default":"bundle.zip"}},"type":"object","title":"UploadUrlIn"},"UsageMapping":{"properties":{"role":{"type":"string","enum":["source","target"],"title":"Role"},"mapping_set_id":{"type":"integer","title":"Mapping Set Id"},"mapping_set_name":{"type":"string","title":"Mapping Set Name"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"mapping_item_id":{"type":"integer","title":"Mapping Item Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["role","mapping_set_id","mapping_set_name","mapping_item_id"],"title":"UsageMapping"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionOut":{"properties":{"id":{"type":"integer","title":"Id"},"is_working":{"type":"boolean","title":"Is Working"},"label":{"type":"string","title":"Label"},"sealed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sealed At"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Summary"}},"type":"object","required":["id","is_working","label"],"title":"VersionOut"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"meta","description":"Health, readiness, discovery."},{"name":"tenants","description":"Tenants — the first-class container (ADR-v2-0001) — and capability grants."},{"name":"models","description":"Models, the mutable working line, and immutable snapshots (ADR-v2-0002)."},{"name":"artifacts","description":"Author, browse, and delete artifacts. Delete is RESTRICT by default, CASCADE on request (ADR-v2-0003)."},{"name":"traversal","description":"Read-only traceability: realization chains, relationships, FK edges, usage/impact, lineage, ancestors."},{"name":"curated-context","description":"The living human-meaning layer (description/usage/impact): identity-scoped, append-only, editable on any version (specs 0010)."},{"name":"annotations","description":"Attributed context-note stream on artifacts (specs 0009); exempt from snapshot immutability."},{"name":"ingest","description":"Bulk-load JSON/CSV bundles into the working line — one atomic, idempotent transaction; also the reconciliation intake (ADR-v2-0004)."},{"name":"mappings","description":"Source-to-target mappings, transforms, and coverage/stale analysis — a separate subsystem that crosses model/tenant boundaries with soft refs (specs 0008)."},{"name":"skills","description":"Bundled Agent Skills (agentskills.io) served openly for discovery — no auth required."},{"name":"reconciliation","description":"The design-first closing loop (ADR-v2-0004/0005): dry-run reconcile of an observed bundle, persisted drift, and version diff."}],"security":[{"bearerAuth":[]}]}