Skip to main content

Type registry

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: type-registry · 8 operations

GET /v1/types/{tenant_slug}/namespaces​

List Namespaces

List namespaces visible to the tenant: system-core (std/*) plus the tenant's own.

Args: tenant_slug: The tenant slug (caller scope comes from the authenticated token). auth_data: Authentication data (injected by dependency).

Returns: Namespaces (system-core first, then alphabetical), each with its tenant-scoped type count.

Operation id: list_namespaces_v1_types__tenant_slug__namespaces_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list namespaces.application/json array of TypeNamespaceSchema
422Validation Errorapplication/json HTTPValidationError

POST /v1/types/{tenant_slug}/namespaces​

Create Namespace

Create a namespace.

A tenant administrator may create a tenant-scoped namespace. Creating a system-core namespace requires a platform admin, which this API does not expose, so scope='system' is rejected with 403 — system namespaces are read-only here.

Args: tenant_slug: The tenant slug. request: Namespace creation data. auth_data: Authentication data (injected by dependency).

Returns: The created namespace.

Operation id: create_namespace_v1_types__tenant_slug__namespaces_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for create namespace.

Responses

StatusDescriptionBody
200Successful response for create namespace.application/json TypeNamespaceSchema
422Validation Errorapplication/json HTTPValidationError

PUT /v1/types/{tenant_slug}/namespaces/{namespace_id}​

Update Namespace

Update a tenant namespace's base URI, version root, description, visibility, or default flag.

The namespace path itself is immutable (it links the namespace to its primitives). System-core namespaces are read-only and return 403.

Args: tenant_slug: The tenant slug. namespace_id: The namespace row id. request: Namespace update data. auth_data: Authentication data (injected by dependency).

Returns: The updated namespace.

Operation id: update_namespace_v1_types__tenant_slug__namespaces__namespace_id__put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
namespace_idpathstringyesPath parameter identifying the namespace id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for update namespace.

Responses

StatusDescriptionBody
200Successful response for update namespace.application/json TypeNamespaceSchema
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/types/{tenant_slug}/namespaces/{namespace_id}​

Delete Namespace

Remove a tenant namespace registration.

The namespace list is referential: apiome.primitives.namespace is a string column with no foreign key to apiome.type_namespaces, so this unregisters the namespace and leaves its types untouched. They keep their namespace path and surface as "unregistered" on the Primitives dashboard, from which the namespace can be registered again. type_count is returned so the caller can report how many types are now unregistered.

System-core namespaces are read-only and return 403.

Args: tenant_slug: The tenant slug. namespace_id: The namespace row id. auth_data: Authentication data (injected by dependency).

Returns: The deleted namespace's path and the number of types left unregistered.

Operation id: delete_namespace_v1_types__tenant_slug__namespaces__namespace_id__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
namespace_idpathstringyesPath parameter identifying the namespace id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for delete namespace.application/json object
422Validation Errorapplication/json HTTPValidationError

POST /v1/types/{tenant_slug}/resolve​

Resolve Refs

Re-resolve the tenant's $ref edges and return the dependency listing (#3459).

The resolver API for the UI and Designer (#3470). It walks every primitive visible to the tenant (system-core ∪ own), re-evaluates each stored dependency edge's resolved/unresolved status against the current registry — so a target created since the edge was last computed now resolves, and a deleted one now dangles — and persists the refreshed edges for any of the tenant's own primitives whose status changed ("re-resolve updates statuses"). Each resolved edge is enriched with its dependency target's id and name so the response is the dependency graph the resolver UI lists.

Only primitives that carry at least one $ref edge appear in primitives; the flat system-core seed (no refs) is omitted. System-core rows are read-only, so a status change on one is reflected in the response but never written back.

Args: tenant_slug: The tenant slug (caller scope comes from the authenticated token). auth_data: Authentication data (injected by dependency).

Returns: ResolveResponse with tenant-wide edge counts, the number of primitives whose stored statuses were updated by this pass, and the per-primitive dependency listing.

Operation id: resolve_refs_v1_types__tenant_slug__resolve_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for resolve refs.application/json ResolveResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/types/{tenant_slug}/settings​

Get Registry Settings

Return the tenant's type-registry settings (#3472).

Serves the saved row when one exists. A tenant that has never saved settings receives the model defaults with is_default = true (a pure read never materializes a row), so the Settings UI always has a complete, effective configuration to render.

Args: tenant_slug: The tenant slug (caller scope comes from the authenticated token). auth_data: Authentication data (injected by dependency).

Returns: The tenant's effective type-registry settings.

Operation id: get_registry_settings_v1_types__tenant_slug__settings_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get registry settings.application/json TypeRegistrySettingsSchema
422Validation Errorapplication/json HTTPValidationError

PUT /v1/types/{tenant_slug}/settings​

Update Registry Settings

Save the tenant's type-registry settings (#3472).

Tenant-administrator only. The request may be partial — omitted fields keep their current persisted value (or the table default on the first save). Enum and range validation happens on the request model, so an invalid value is rejected with 422 before the upsert. The saved settings become the source of truth the resolver and the validation gate (#3479) read.

Args: tenant_slug: The tenant slug. request: The settings to persist (partial allowed). auth_data: Authentication data (injected by dependency).

Returns: The full persisted settings after the write.

Operation id: update_registry_settings_v1_types__tenant_slug__settings_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for update registry settings.

Responses

StatusDescriptionBody
200Successful response for update registry settings.application/json TypeRegistrySettingsSchema
422Validation Errorapplication/json HTTPValidationError

GET /v1/types/{tenant_slug}/stats​

Get Registry Coverage Stats

Return aggregate registry coverage KPIs for the Primitives overview (#3454).

Counts core vs tenant types, imported schemas, property bindings, unresolved $ref edges, and distinct namespaces. Feeds the Governance → Primitives KPI strip (#3467).

Args: tenant_slug: The tenant slug. auth_data: Authentication data (injected by dependency).

Returns: RegistryCoverageStatsResponse with the tenant's registry coverage counts.

Operation id: get_registry_coverage_stats_v1_types__tenant_slug__stats_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get registry coverage stats.application/json RegistryCoverageStatsResponse
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

RegistryCoverageStatsResponse​

Aggregate registry coverage KPIs for the Primitives overview (#3454).

Counts are scoped to the caller's tenant: system-core types are seeded per tenant (is_system = true rows owned by the tenant), tenant types are private rows (is_system = false). unresolved_ref_count mirrors GET …/unresolved (#3457).

PropertyTypeRequiredDescription
core_type_countintegernoNumber of core type.
tenant_type_countintegernoNumber of tenant type.
imported_countintegernoNumber of imported.
properties_bound_countintegernoNumber of properties bound.
bound_class_countintegernoNumber of bound class.
unresolved_ref_countintegernoNumber of unresolved ref.
namespace_countintegernoNumber of namespace.

ResolveResponse​

Result of a tenant-wide $ref re-resolution pass (#3459).

POST /v1/types/{tenant_slug}/resolve recomputes the resolved/unresolved status of every dependency edge across the tenant's primitives against the current registry state, persists any edge whose status changed, and returns the per-primitive dependency listing the resolver UI consumes (#3470). The top-level counts mirror the coverage KPIs of GET …/unresolved (#3457/#3454); reresolved_primitive_count is how many primitives had at least one edge status flip during this pass.

PropertyTypeRequiredDescription
total_primitivesintegernoTotal Primitives.
ref_countintegernoNumber of ref.
resolved_ref_countintegernoNumber of resolved ref.
unresolved_ref_countintegernoNumber of unresolved ref.
affected_primitive_countintegernoNumber of affected primitive.
reresolved_primitive_countintegernoNumber of reresolved primitive.
primitivesarray of ResolvedPrimitiveRefsnoPrimitives.

TypeNamespaceCreateRequest​

Request model for creating a namespace.

scope selects system-core vs tenant ownership; system namespaces require a platform admin (currently unavailable via the API, so they are effectively read-only). base_uri and version_root are derived from the namespace path when omitted.

PropertyTypeRequiredDescription
namespacestringyesRegistry namespace segment for the primitive.
scopeenum "system", "tenant"noScope.
base_uristring or nullnoBase URI used to resolve relative $ref values.
version_rootstring or nullnoVersion Root.
descriptionstring or nullnoFree-text description.
is_publicboolean or nullnoTrue when the primitive is visible outside the authoring tenant.
is_defaultbooleannoWhether default.

TypeNamespaceSchema​

A type-registry namespace: scope, base URI, version root, visibility, and default flag.

scope is derived from is_system for the client. type_count is the number of primitives the caller's tenant has in this namespace.

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
tenant_idstring or nullnoTenant that owns the resource.
namespacestringyesRegistry namespace segment for the primitive.
base_uristringyesBase URI used to resolve relative $ref values.
version_rootstring or nullnoVersion Root.
descriptionstring or nullnoFree-text description.
scopestringyesScope.
is_systembooleannoTrue when the primitive is shipped by the platform.
is_publicbooleannoTrue when the primitive is visible outside the authoring tenant.
is_defaultbooleannoWhether default.
type_countintegernoNumber of type.
created_bystring or nullnoCreated By.
created_atstring (date-time) or string or nullnoCreation timestamp (ISO 8601).
updated_atstring (date-time) or string or nullnoLast update timestamp (ISO 8601).

TypeNamespaceUpdateRequest​

Request model for updating a namespace. The namespace path is immutable (it links the namespace to its primitives); only base URI, version root, description, visibility, and the default flag may change.

PropertyTypeRequiredDescription
base_uristring or nullnoBase URI used to resolve relative $ref values.
version_rootstring or nullnoVersion Root.
descriptionstring or nullnoFree-text description.
is_publicboolean or nullnoTrue when the primitive is visible outside the authoring tenant.
is_defaultboolean or nullnoWhether default.

TypeRegistrySettingsSchema​

Per-tenant type-registry behavior settings (#3472).

Configures the default JSON Schema dialect, the $ref resolution policy, import defaults, and the validation/publishing governance toggles read by the validation gate (#3479). A tenant that has never saved settings receives the column defaults below.

PropertyTypeRequiredDescription
default_draftenum "2020-12", "2019-09", "draft-07"noDefault Draft.
strict_validationbooleannoStrict Validation.
allow_annotation_keywordsbooleannoAllow Annotation Keywords.
coerce_imported_draftsbooleannoCoerce Imported Drafts.
resolution_base_urlstringnoResolution Base URL.
ref_styleenum "relative", "absolute", "anchor"noRef Style.
allow_remote_refsbooleannoAllow Remote Refs.
remote_host_allowlistarray of stringnoRemote Host Allowlist.
max_resolution_depthintegernoMax Resolution Depth.
circular_ref_policyenum "error", "warn"noCircular Ref Policy.
default_import_scopeenum "tenant", "system"noDefault Import Scope.
default_target_namespacestring or nullnoDefault Target Namespace.
rewrite_refs_on_importbooleannoRewrite Refs On Import.
accepted_formatsarray of stringnoAccepted Formats.
dedupe_identical_typesbooleannoDedupe Identical Types.
validate_on_savebooleannoValidate On Save.
block_publish_on_errorsbooleannoBlock Publish On Errors.
core_publish_roleenum "platform_admin", "tenant_admin", "maintainer"noCore Publish Role.
is_defaultbooleannoWhether default.
updated_bystring or nullnoUpdated By.
created_atstring (date-time) or string or nullnoCreation timestamp (ISO 8601).
updated_atstring (date-time) or string or nullnoLast update timestamp (ISO 8601).

TypeRegistrySettingsUpdateRequest​

Request model for saving a tenant's type-registry settings (#3472).

Every field is optional so the UI may send a partial update; omitted fields keep their current persisted value (or the default when no row exists yet). Enum and range checks here mirror the apiome.type_registry_settings CHECK constraints so an invalid value is rejected with a clean 422 before it ever reaches the database.

PropertyTypeRequiredDescription
default_draftenum "2020-12", "2019-09", "draft-07" or nullnoDefault Draft.
strict_validationboolean or nullnoStrict Validation.
allow_annotation_keywordsboolean or nullnoAllow Annotation Keywords.
coerce_imported_draftsboolean or nullnoCoerce Imported Drafts.
resolution_base_urlstring or nullnoResolution Base URL.
ref_styleenum "relative", "absolute", "anchor" or nullnoRef Style.
allow_remote_refsboolean or nullnoAllow Remote Refs.
remote_host_allowlistarray of string or nullnoRemote Host Allowlist.
max_resolution_depthinteger or nullnoMax Resolution Depth.
circular_ref_policyenum "error", "warn" or nullnoCircular Ref Policy.
default_import_scopeenum "tenant", "system" or nullnoDefault Import Scope.
default_target_namespacestring or nullnoDefault Target Namespace.
rewrite_refs_on_importboolean or nullnoRewrite Refs On Import.
accepted_formatsarray of string or nullnoAccepted Formats.
dedupe_identical_typesboolean or nullnoDedupe Identical Types.
validate_on_saveboolean or nullnoValidate On Save.
block_publish_on_errorsboolean or nullnoBlock Publish On Errors.
core_publish_roleenum "platform_admin", "tenant_admin", "maintainer" or nullnoCore Publish Role.