跳转到内容
EN

注册类型

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

名称类型说明
ownerstringService that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against.
versionintegerMonotonic version of this owner’s registration; a later registration must extend this one without removing or narrowing anything.
nodesarray<object>Node types this owner registers.
nodes[].namestringGlobally unique type name, used as a node’s type when creating it; a dotted name marks a namespaced subtype.
nodes[].ref_prefixstringRequired 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[].weightnumberType significance from 0 to 1, used when ranking how strongly reaching this kind of node matters.
nodes[].passablebooleanWhether the graph may continue through a node of this type; false makes it a stopping point that is reached but never expanded.
nodes[].descriptionstringWhat this type means in the registering service, used to choose the right type when writing.
edgesarray<object>Relation types this owner registers.
edges[].namestringGlobally unique relation type name, used as a relation’s type when creating it.
edges[].sourcearray<string>Node type names this relation may start from; the single entry * admits every type.
edges[].targetarray<string>Node type names this relation may point at; the single entry * admits every type.
edges[].directionstringWhether the fact reads one way or the same in both directions, which decides how it renders on each endpoint.
edges[].passablebooleanWhether spreading may continue through this relation; false makes it a stopping point that is reached but never traversed.
edges[].weightnumberRelation significance from 0 to 1, used when ranking how strongly reaching through this relation matters.
edges[].functionalbooleanWhether a source may have at most one valid relation of this type at a time; true makes a new one supersede the old.
edges[].persistencenumberHow 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[].originsarray<string>Origins a relation of this type may carry; each value names where the fact came from and they are checked when writing.
edges[].descriptionstringWhat 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"
}
}
}
}

响应

此端点没有声明成功响应。