注册类型
POST /ontology/v1/types
Register a node or relation type for this organization. Not open yet — this call currently answers 501 NOT_IMPLEMENTED and writes nothing, because a registration is checked and stored by the deploy gate that ships the registering service, not by a runtime call. Until it opens, read the types already in force with praxis.ontology.types.list and create records only of those types.
支持状态: partial
运行时注册尚未开放;类型注册由部署门写入,此操作当前返回 501。
请求体 (application/json)
必填: true
| 名称 | 类型 | 说明 |
|---|---|---|
| owner | string | Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against. |
| version | integer | Monotonic version of this owner’s registration; a later registration must extend this one without removing or narrowing anything. |
| nodes | array<object> | Node types this owner registers. |
| nodes[].name | string | Globally unique type name, used as a node’s type when creating it; a dotted name marks a namespaced subtype. |
| nodes[].ref_prefix | string | Required prefix of the external record id when a node of this type carries a ref, for example file_ for the file type; omit for types that are pure concepts. |
| nodes[].weight | number | Type significance from 0 to 1, used when ranking how strongly reaching this kind of node matters. |
| nodes[].passable | boolean | Whether the graph may continue through a node of this type; false makes it a stopping point that is reached but never expanded. |
| nodes[].description | string | What this type means in the registering service, used to choose the right type when writing. |
| edges | array<object> | Relation types this owner registers. |
| edges[].name | string | Globally unique relation type name, used as a relation’s type when creating it. |
| edges[].source | array<string> | Node type names this relation may start from; the single entry * admits every type. |
| edges[].target | array<string> | Node type names this relation may point at; the single entry * admits every type. |
| edges[].direction | string | Whether the fact reads one way or the same in both directions, which decides how it renders on each endpoint. |
| edges[].passable | boolean | Whether spreading may continue through this relation; false makes it a stopping point that is reached but never traversed. |
| edges[].weight | number | Relation significance from 0 to 1, used when ranking how strongly reaching through this relation matters. |
| edges[].functional | boolean | Whether a source may have at most one valid relation of this type at a time; true makes a new one supersede the old. |
| edges[].persistence | number | How long the relation stays strong while valid, from 0 to 1; 1 never fades and lower values decay faster. Omit for the default decay. |
| edges[].origins | array<string> | Origins a relation of this type may carry; each value names where the fact came from and they are checked when writing. |
| edges[].description | string | What this fact means in the registering service, used to choose the right type when writing. |
{ "type": "object", "required": [ "owner", "version", "nodes", "edges" ], "description": "One service's registered types for this organization, as shipped by that service and stored by the deploy gate.", "properties": { "owner": { "type": "string", "description": "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against.", "example": "file" }, "version": { "type": "integer", "description": "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything.", "example": 1 }, "nodes": { "type": "array", "description": "Node types this owner registers.", "items": { "$ref": "#/components/schemas/ontology-NodeType" } }, "edges": { "type": "array", "description": "Relation types this owner registers.", "items": { "$ref": "#/components/schemas/ontology-EdgeType" } } }}响应
此端点没有声明成功响应。