{ "swagger": "2.0", "info": { "description": "全域数据平台 - 知识图谱模块 API | All Domain Data Platform - Knowledge Graph Module API", "title": "ADDP Graph API", "contact": {}, "version": "1.0" }, "host": "localhost:8186", "basePath": "/api/v1/graph", "paths": { "/cleanup-executions/{execution_id}/result": { "get": { "security": [ { "BearerAuth": [] } ], "description": "仅第一方 unrestricted 租户用户;同时要求本模块专业结果权限、Cleanup公共读取权限及本人子执行归属。不返回SQL、凭据、对象路径或原始错误。 | First-party unrestricted tenant Users only; requires both professional and public Cleanup read permissions and ownership of the child execution. No SQL, credentials, object paths or raw errors.", "produces": [ "application/json" ], "tags": [ "Cleanup" ], "summary": "获取本模块资源回收专业结果 | Get module cleanup professional result", "parameters": [ { "type": "string", "description": "子执行UUID | Child execution UUID", "name": "execution_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/cleanup.Result" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "503": { "description": "Service Unavailable", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.cleanup_result.read", "system.cleanup.read" ] } }, "/execution-read-scope": { "get": { "security": [ { "BearerAuth": [] } ], "description": "仅第一方租户用户;范围由 Owner 的现有读取 Permission 裁决,任务历史与本人一次性执行使用不同条件。| First-party tenant users only; Owner permissions decide task history and own ad-hoc visibility.", "produces": [ "application/json" ], "tags": [ "Execution diagnostics" ], "summary": "获取任务执行读取范围 | Get execution read scope", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/execution.ReadScope" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "authenticated" } }, "/executions/{execution_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "同次执行完成汇总后返回材料总数、自动写入数和送审数,缺少汇总时省略 build_result。| Returns material, automatic write and review submission counts when this execution recorded a final summary.", "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "获取 Graph 构建执行详情 | Get graph build execution detail", "parameters": [ { "type": "string", "description": "执行UUID | Execution UUID", "name": "execution_id", "in": "path", "required": true } ], "responses": { "200": { "description": "构建执行与本次结果 | Build execution and its result", "schema": { "$ref": "#/definitions/internal_api.graphBuildExecutionResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.read" ] } }, "/graphs": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前租户的所有知识图谱实例 | Get all knowledge graph instances for current tenant", "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "知识图谱列表 | List knowledge graphs", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "创建新的知识图谱实例,绑定本体、业务图目录路径和索引管理范围 | Bind ontology, business graph catalog path and index management scope", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "创建知识图谱 | Create knowledge graph", "parameters": [ { "description": "创建知识图谱请求 | Create knowledge graph request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CreateKnowledgeGraphRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.create" ] } }, "/graphs/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取知识图谱实例详情 | Get knowledge graph instance detail", "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "知识图谱详情 | Get knowledge graph detail", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "description": "更新名称、描述、状态或知识服务公开状态;省略 is_public 保留原值,false 关闭公开 | Update name, description, status or knowledge-service public access; omit is_public to retain it, false disables public access", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "更新知识图谱 | Update knowledge graph", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "更新知识图谱请求 | Update knowledge graph request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.UpdateKnowledgeGraphRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "删除知识图谱实例 | Delete a knowledge graph instance", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "删除知识图谱 | Delete knowledge graph", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "当前版本 | Current version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphControlRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.delete" ] } }, "/graphs/{id}/analysis/capabilities": { "get": { "security": [ { "BearerAuth": [] } ], "description": "探测知识图谱支持的图算法能力(GDS/Cypher)| Detect supported graph algorithm capabilities (GDS/Cypher)", "produces": [ "application/json" ], "tags": [ "图算法分析 | Graph Algorithm Analysis" ], "summary": "算法能力探测 | Detect algorithm capabilities", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.AlgorithmCapabilities" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.analysis.read" ] } }, "/graphs/{id}/analysis/run": { "post": { "security": [ { "BearerAuth": [] } ], "description": "执行指定图算法(度中心性/K跳/最短路径/PageRank/Louvain/WCC/介数中心性)| Run specified graph algorithm (degree centrality/K-hop/shortest path/PageRank/Louvain/WCC/betweenness centrality)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图算法分析 | Graph Algorithm Analysis" ], "summary": "执行图算法 | Run graph algorithm", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "算法执行请求 | Algorithm run request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.AlgorithmRunRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.AlgorithmResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.analysis.execute" ] } }, "/graphs/{id}/analysis/sync-spatial": { "post": { "security": [ { "BearerAuth": [] } ], "description": "将本体中所有有效空间类型(含从父类型继承)的图层同步到 Neo4j,并注册已有节点(幂等)| Sync all valid spatial type layers from ontology to Neo4j and register existing nodes (idempotent)", "produces": [ "application/json" ], "tags": [ "图算法分析 | Graph Algorithm Analysis" ], "summary": "同步空间图层 | Sync spatial layers", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.analysis.execute" ] } }, "/graphs/{id}/browse-snapshot": { "get": { "security": [ { "BearerAuth": [] } ], "description": "从同一组图事实返回 Schema、统计和聚合概览 | Return schema, statistics and aggregate overview derived from the same graph facts", "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "图谱浏览快照 | Get graph browse snapshot", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BrowseSnapshot" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] } }, "/graphs/{id}/build/tasks": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取知识图谱的所有构建任务 | Get all build tasks for a knowledge graph", "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "构建任务列表 | List build tasks", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildTask" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "创建新的知识图谱构建任务 | Create a new knowledge graph build task", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "创建构建任务 | Create build task", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildTask" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.create" ] } }, "/graphs/{id}/build/tasks/{tid}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "获取构建任务 | Get build task", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildTask" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.read" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "删除构建任务 | Delete build task", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.delete" ] } }, "/graphs/{id}/build/tasks/{tid}/cancel": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "取消构建任务 | Cancel build task", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true }, { "description": "准确执行及观察到的 attempt | Exact execution and observed attempt", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CancelBuildRequest" } } ], "responses": { "200": { "description": "未启动取消或已终态 | Cancelled before start or already terminal", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CancelBuildResponse" } }, "202": { "description": "取消意图已持久受理,运行尚未停止 | Cancellation durably accepted; execution has not yet stopped", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CancelBuildResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "执行身份已变化 | Execution identity has changed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.cancel" ] } }, "/graphs/{id}/build/tasks/{tid}/materials": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "列出构建材料 | List build materials", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildMaterial" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "上传构建材料 | Upload build material", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true }, { "type": "file", "description": "材料文件 | Material files", "name": "files", "in": "formData", "required": true } ], "responses": { "201": { "description": "Created", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildMaterial" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.update" ] } }, "/graphs/{id}/build/tasks/{tid}/materials/{mid}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "删除构建材料 | Delete build material", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true }, { "type": "integer", "description": "材料 ID | Material ID", "name": "mid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.update" ] } }, "/graphs/{id}/build/tasks/{tid}/rerun": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "重新运行构建任务 | Rerun build task", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true } ], "responses": { "202": { "description": "已持久入队,尚未开始 | Durably queued, not yet started", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildEnqueueResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.execute" ] } }, "/graphs/{id}/build/tasks/{tid}/run": { "post": { "security": [ { "BearerAuth": [] } ], "description": "启动知识图谱构建任务 | Start a knowledge graph build task", "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "执行构建任务 | Run build task", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "tid", "in": "path", "required": true } ], "responses": { "202": { "description": "已持久入队,尚未开始 | Durably queued, not yet started", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildEnqueueResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.build_task.execute" ] } }, "/graphs/{id}/constraints": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "获取图约束 | Get graph constraints", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] } }, "/graphs/{id}/expand": { "post": { "security": [ { "BearerAuth": [] } ], "description": "展开聚合桶的代表性实体,或按跳数和双预算展开实体局部子图 | Expand representative entities of an aggregate bucket, or an entity-centric subgraph with depth and node/relationship budgets", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "展开图视图目标 | Expand graph view target", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "展开请求 | Expand request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ExpandRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SubgraphResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] } }, "/graphs/{id}/infer-schema": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "推断图谱 Schema | Infer graph schema", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "本体 ID | Ontology ID", "name": "ontology_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-conditional-permissions": [ "graph.ontology.read" ], "x-addp-required-permissions": [ "graph.graph.read" ] } }, "/graphs/{id}/infer-schema/apply": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "应用推断 Schema | Apply inferred schema", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "应用请求 | Apply request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ApplyInferredSchemaRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read", "graph.ontology.update" ] } }, "/graphs/{id}/path": { "post": { "security": [ { "BearerAuth": [] } ], "description": "查询两个节点之间的最短路径 | Find the shortest path between two nodes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "最短路径查询 | Find shortest path", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "路径查询请求 | Path query request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.PathRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SubgraphResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] } }, "/graphs/{id}/reconcile": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅接受当前版本;证据不足保持阻断,不自动重跑 | Accept only the current version; insufficient evidence remains blocked without automatic rerun", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "核验关闭图谱的持久证据 | Reconcile durable evidence of a closed graph", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "当前版本 | Current version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphControlRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.reconcile" ] } }, "/graphs/{id}/reopen": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅接受当前版本;证据不足保持阻断,不自动重跑 | Accept only the current version; insufficient evidence remains blocked without automatic rerun", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "知识图谱 | Knowledge Graph" ], "summary": "重新开放原物理图谱 | Reopen the original physical graph", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "当前版本 | Current version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphControlRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.update", "graph.graph.reconcile" ] } }, "/graphs/{id}/review": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "列出审核项 | List review items", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "task_id", "in": "query" }, { "type": "string", "description": "项目类型 | Item type", "name": "item_type", "in": "query" }, { "type": "string", "description": "状态 | Status", "name": "status", "in": "query" }, { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 20, "description": "每页数量 | Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.read" ] } }, "/graphs/{id}/review/batch/approve": { "post": { "security": [ { "BearerAuth": [] } ], "description": "先核对全部 ID 归属,再逐项处理;任一失败返回 500,保留成功结果 | Validate ownership of all IDs before processing; any item failure returns 500 and preserves successful results", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "批量通过审核项 | Batch approve review items", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "审核项 ID | Review item IDs", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BatchReviewRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "400": { "description": "请求参数无效 | Invalid request parameters", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "访问被拒绝 | Access denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "当前租户及图谱内不存在审核项 | Review item not found in this tenant and graph", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "审核处理失败 | Review processing failed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.approve" ] } }, "/graphs/{id}/review/batch/reject": { "post": { "security": [ { "BearerAuth": [] } ], "description": "先核对全部 ID 归属,再逐项处理;任一失败返回 500,保留成功结果 | Validate ownership of all IDs before processing; any item failure returns 500 and preserves successful results", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "批量拒绝审核项 | Batch reject review items", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "审核项 ID | Review item IDs", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BatchReviewRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "400": { "description": "请求参数无效 | Invalid request parameters", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "访问被拒绝 | Access denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "当前租户及图谱内不存在审核项 | Review item not found in this tenant and graph", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "审核处理失败 | Review processing failed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.reject" ] } }, "/graphs/{id}/review/pending-count": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "待审核数量 | Pending review count", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "integer" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.read" ] } }, "/graphs/{id}/review/{iid}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "修改审核项 | Modify review item", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "审核项 ID | Review item ID", "name": "iid", "in": "path", "required": true }, { "description": "修改内容 | Modify content", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "400": { "description": "请求参数无效 | Invalid request parameters", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "访问被拒绝 | Access denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "当前租户及图谱内不存在审核项 | Review item not found in this tenant and graph", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "审核项已处理 | Review item already processed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "审核处理失败 | Review processing failed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.update" ] } }, "/graphs/{id}/review/{iid}/approve": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "通过审核项 | Approve review item", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "审核项 ID | Review item ID", "name": "iid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "400": { "description": "请求参数无效 | Invalid request parameters", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "访问被拒绝 | Access denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "当前租户及图谱内不存在审核项 | Review item not found in this tenant and graph", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "审核项已处理 | Review item already processed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "审核处理失败 | Review processing failed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.approve" ] } }, "/graphs/{id}/review/{iid}/reject": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "拒绝审核项 | Reject review item", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "审核项 ID | Review item ID", "name": "iid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "400": { "description": "请求参数无效 | Invalid request parameters", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "访问被拒绝 | Access denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "当前租户及图谱内不存在审核项 | Review item not found in this tenant and graph", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "审核项已处理 | Review item already processed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "审核处理失败 | Review processing failed", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.review.reject" ] } }, "/graphs/{id}/search": { "post": { "security": [ { "BearerAuth": [] } ], "description": "在知识图谱中全文搜索实体节点 | Full-text search entity nodes in a knowledge graph", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱浏览 | Graph Browse" ], "summary": "全文搜索节点 | Full-text search nodes", "parameters": [ { "type": "integer", "description": "知识图谱 ID | Knowledge graph ID", "name": "id", "in": "path", "required": true }, { "description": "搜索请求 | Search request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SearchRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SubgraphResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.graph.read" ] } }, "/kg/{graphId}/entities/{type}": { "get": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "按类型列出实体(分页)| List entities by type (paginated)", "parameters": [ { "type": "integer", "description": "图谱 ID | Graph ID", "name": "graphId", "in": "path", "required": true }, { "type": "string", "description": "本体实体类型名称 | Ontology entity type name", "name": "type", "in": "path", "required": true }, { "type": "integer", "description": "页码(默认 1)| Page number (default 1)", "name": "page", "in": "query" }, { "type": "integer", "description": "每页大小(默认 20)| Page size (default 20)", "name": "page_size", "in": "query" } ], "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/entities/{type}/{nodeId}": { "get": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "获取实体详情 | Get entity detail", "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/nodes/{nodeId}/neighbors": { "get": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "获取节点邻居 | Get node neighbors", "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/ontology": { "get": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "获取图谱本体描述 | Get graph ontology description", "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/paths": { "post": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "路径查找 | Find paths", "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/search": { "get": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "全文搜索实体 | Full-text search entities", "responses": { "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/stats": { "get": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "图谱统计信息 | Graph statistics", "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/kg/{graphId}/subgraph": { "post": { "description": "显式公开图谱允许匿名访问;私有图谱要求当前租户及 graph.graph.read;所有读取仍执行数据保护门禁 | Explicit public graphs allow anonymous access; private graphs require the current tenant and graph.graph.read; all reads remain subject to data protection", "tags": [ "知识服务 | Knowledge Service" ], "summary": "获取实体中心子图 | Get entity-centric subgraph", "responses": { "401": { "description": "认证失败或图谱尚未公开 | Authentication failed or graph is private", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "功能权限或数据保护拒绝 | Functional permission or data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "public" } }, "/ontologies": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前租户的所有本体模型 | Get all ontology models for current tenant", "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "本体列表 | List ontologies", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.Ontology" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "创建新的本体模型 | Create a new ontology model", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "创建本体 | Create ontology", "parameters": [ { "description": "创建本体请求 | Create ontology request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CreateOntologyRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.Ontology" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.create" ] } }, "/ontologies/import-preview/from-model": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "预览模型导入 | Preview model import", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read" ] } }, "/ontologies/infer-schema/from-engine": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "从引擎推断 Schema | Infer schema from engine", "parameters": [ { "description": "目标图与本体 | Target graph and ontology", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.InferGraphSchemaRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read", "system.engine_catalog.read" ] } }, "/ontologies/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取本体详情,含实体类型和关系类型 | Get ontology detail including entity types and relation types", "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "本体详情 | Get ontology detail", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.OntologyDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "description": "更新本体模型的名称、描述或状态 | Update ontology model name, description or status", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "更新本体 | Update ontology", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "description": "更新本体请求 | Update ontology request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.UpdateOntologyRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.Ontology" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "删除本体及其所有实体类型和关系类型 | Delete ontology and all its entity types and relation types", "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "删除本体 | Delete ontology", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SuccessResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.delete" ] } }, "/ontologies/{id}/entity-types": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取本体下的所有实体类型 | Get all entity types under an ontology", "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "实体类型列表 | List entity types", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "在本体下创建新的实体类型 | Create a new entity type under an ontology", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "创建实体类型 | Create entity type", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "description": "创建实体类型请求 | Create entity type request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CreateEntityTypeRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.create" ] } }, "/ontologies/{id}/entity-types/{eid}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "更新实体类型 | Update entity type", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "实体类型 ID | Entity type ID", "name": "eid", "in": "path", "required": true }, { "description": "更新实体类型请求 | Update entity type request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.UpdateEntityTypeRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "删除实体类型 | Delete entity type", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "实体类型 ID | Entity type ID", "name": "eid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.delete" ] } }, "/ontologies/{id}/entity-types/{eid}/sync-constraints": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "同步实体约束 | Sync entity constraints", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "实体类型 ID | Entity type ID", "name": "eid", "in": "path", "required": true }, { "description": "同步请求 | Sync request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SyncConstraintsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update" ] } }, "/ontologies/{id}/entity-types/{eid}/sync-spatial-layer": { "put": { "security": [ { "BearerAuth": [] } ], "description": "将实体类型的空间图层同步到指定的 Neo4j 图谱实例(仅 is_spatial_layer=true 的类型可操作)| Sync entity type spatial layer to specified Neo4j graph instance (only for types with is_spatial_layer=true)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "同步空间图层 | Sync spatial layer", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "实体类型 ID | Entity type ID", "name": "eid", "in": "path", "required": true }, { "description": "同步请求 | Sync request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SyncSpatialLayersRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update" ] } }, "/ontologies/{id}/import-from-model": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "从模型导入 | Import from model", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "description": "导入请求 | Import request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_service.ImportFromModelRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update" ] } }, "/ontologies/{id}/infer-schema/from-engine/apply": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "应用引擎推断 Schema | Apply inferred schema from engine", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "description": "应用请求 | Apply request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ApplyInferredSchemaFromEngineRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "403": { "description": "数据保护拒绝 | Data protection denied", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update", "system.engine_catalog.read" ] } }, "/ontologies/{id}/relation-types": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取本体下的所有关系类型 | Get all relation types under an ontology", "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "关系类型列表 | List relation types", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationType" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "在本体下创建新的关系类型 | Create a new relation type under an ontology", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "创建关系类型 | Create relation type", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "description": "创建关系类型请求 | Create relation type request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CreateRelationTypeRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationType" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.create" ] } }, "/ontologies/{id}/relation-types/{rid}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "更新关系类型 | Update relation type", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "关系类型 ID | Relation type ID", "name": "rid", "in": "path", "required": true }, { "description": "更新关系类型请求 | Update relation type request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.UpdateRelationTypeRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationType" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "删除关系类型 | Delete relation type", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "关系类型 ID | Relation type ID", "name": "rid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.delete" ] } }, "/ontologies/{id}/versions": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取本体的所有版本快照 | Get all version snapshots of an ontology", "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "版本列表 | List ontology versions", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.OntologyVersion" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "为本体创建版本快照 | Create a version snapshot for an ontology", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "本体管理 | Ontology Management" ], "summary": "创建版本快照 | Create version snapshot", "parameters": [ { "type": "integer", "description": "本体 ID | Ontology ID", "name": "id", "in": "path", "required": true }, { "description": "创建版本请求 | Create version request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.CreateOntologyVersionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.OntologyVersion" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.ontology.create" ] } }, "/task-provider/executions/{execution_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按 execution_id 查询 Graph 构建任务统一执行记录。| Get a Graph build task execution record by execution_id.", "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "获取 Graph 构建执行状态 | Get graph build execution status", "parameters": [ { "type": "string", "description": "执行UUID | Execution UUID", "name": "execution_id", "in": "path", "required": true } ], "responses": { "200": { "description": "执行记录 | Execution", "schema": { "$ref": "#/definitions/taskprovider.ExecutionStatusResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.task_provider.read" ] } }, "/task-provider/tasks": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按标准 TaskProvider 协议列出 Graph 构建任务;task_type 仅支持 kg_build。| List Graph build tasks through the standard TaskProvider protocol; task_type only supports kg_build.", "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "列出 TaskProvider 图谱构建任务 | List TaskProvider graph build tasks", "parameters": [ { "type": "string", "description": "任务类型,固定为 kg_build | Task type, fixed to kg_build", "name": "task_type", "in": "query" } ], "responses": { "200": { "description": "任务列表 | Task list", "schema": { "$ref": "#/definitions/internal_api.graphTaskListResponse" } }, "400": { "description": "请求参数错误 | Bad request", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.task_provider.read" ] } }, "/task-provider/tasks/{task_type}/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按标准 TaskProvider 协议获取 Graph 构建任务详情;task_type 仅支持 kg_build。| Get Graph build task detail through the standard TaskProvider protocol; task_type only supports kg_build.", "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "获取 TaskProvider 图谱构建任务详情 | Get TaskProvider graph build task detail", "parameters": [ { "type": "string", "description": "任务类型,固定为 kg_build | Task type, fixed to kg_build", "name": "task_type", "in": "path", "required": true }, { "type": "integer", "description": "构建任务ID | Build task ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.graphTaskListItem" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.task_provider.read" ] } }, "/task-provider/tasks/{task_type}/{id}/execute": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅接受 addp-orchestrator 以父 execution 血缘触发;task_type 仅支持 kg_build,请求必须提供 source=orchestrator 和 parent_execution_id,parameters 当前不支持覆盖。| Only accepts addp-orchestrator execution-lineage invocation; task_type only supports kg_build, source=orchestrator and parent_execution_id are required, and parameters overrides are not supported.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "图谱构建 | Graph Build" ], "summary": "执行 TaskProvider 图谱构建任务 | Execute TaskProvider graph build task", "parameters": [ { "type": "string", "description": "任务类型,固定为 kg_build | Task type, fixed to kg_build", "name": "task_type", "in": "path", "required": true }, { "type": "integer", "description": "构建任务ID | Build task ID", "name": "id", "in": "path", "required": true }, { "description": "TaskProvider 执行请求 | TaskProvider execution request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/internal_api.graphTaskProviderExecuteRequest" } } ], "responses": { "202": { "description": "执行ID | Execution ID", "schema": { "$ref": "#/definitions/internal_api.graphTaskProviderExecuteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "graph.task_provider.execute" ] } } }, "definitions": { "cleanup.Result": { "type": "object", "properties": { "action": { "type": "string" }, "attempt": { "type": "integer" }, "cleanup_mode": { "type": "string" }, "execution_id": { "type": "string" }, "module": { "type": "string" }, "reason": { "type": "string" }, "request_id": { "type": "string" }, "schema": { "type": "string" }, "statistics": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "status": { "type": "string" }, "summary": { "$ref": "#/definitions/events.CleanupResultSummary" } } }, "events.CleanupResultSummary": { "type": "object", "properties": { "affected_records": { "type": "integer" }, "deleted_physical_artifacts": { "type": "integer" }, "deleted_task_definitions": { "type": "integer" }, "disabled_task_definitions": { "type": "integer" }, "error_count": { "type": "integer" }, "freed_bytes": { "type": "integer" }, "marked_missing_source": { "type": "integer" }, "marked_outdated": { "type": "integer" }, "risk_level": { "type": "string" }, "scanned_items": { "type": "integer" }, "skipped_items": { "type": "integer" } } }, "execution.DiagnosticStep": { "type": "object", "properties": { "duration": { "type": "integer" }, "ended_at": { "type": "string" }, "error_code": { "type": "string" }, "id": { "type": "string" }, "phase": { "type": "string" }, "started_at": { "type": "string" }, "status": { "type": "string" } } }, "execution.ReadGrant": { "type": "object", "properties": { "own_ad_hoc": { "type": "boolean" }, "task_history": { "type": "boolean" }, "task_type": { "type": "string" } } }, "execution.ReadScope": { "type": "object", "properties": { "grants": { "type": "array", "items": { "$ref": "#/definitions/execution.ReadGrant" } }, "module": { "type": "string" }, "principal_id": { "type": "integer" }, "tenant_id": { "type": "integer" } } }, "github_com_addp_graph_internal_models.AlgorithmCapabilities": { "type": "object", "properties": { "cypher_algos": { "description": "始终返回", "type": "array", "items": { "type": "string" } }, "gds_algos": { "description": "不可用时返回空列表", "type": "array", "items": { "type": "string" } }, "gds_available": { "type": "boolean" }, "gds_version": { "type": "string" }, "pending_layers": { "description": "本体中已定义(含继承)但尚未同步到 Neo4j 的空间图层", "type": "array", "items": { "type": "string" } }, "spatial_algos": { "description": "不可用时返回空列表", "type": "array", "items": { "type": "string" } }, "spatial_available": { "type": "boolean" }, "spatial_layers": { "description": "已在 Neo4j 中创建的空间图层", "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SpatialLayerInfo" } } } }, "github_com_addp_graph_internal_models.AlgorithmResult": { "type": "object", "properties": { "algorithm": { "type": "string" }, "algorithm_name": { "description": "中文展示名", "type": "string" }, "metadata": { "description": "耗时/社区数等", "type": "object", "additionalProperties": true }, "node_scores": { "description": "中心性/排名算法", "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.NodeScore" } }, "subgraph": { "description": "路径/邻居算法", "allOf": [ { "$ref": "#/definitions/github_com_addp_graph_internal_models.SubgraphResult" } ] }, "warning": { "type": "string" } } }, "github_com_addp_graph_internal_models.AlgorithmRunRequest": { "type": "object", "required": [ "algorithm" ], "properties": { "algorithm": { "type": "string" }, "limit": { "description": "Top-N,默认50,最大200", "type": "integer" }, "node_shapes": { "description": "节点形状过滤(空=全部)", "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.AnalysisNodeShape" } }, "params": { "type": "object", "additionalProperties": true }, "rel_types": { "description": "关系类型过滤(空=全部)", "type": "array", "items": { "type": "string" } } } }, "github_com_addp_graph_internal_models.AnalysisNodeShape": { "type": "object", "properties": { "labels": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" } } }, "github_com_addp_graph_internal_models.ApplyInferredSchemaFromEngineRequest": { "type": "object", "required": [ "catalog_path", "engine_id" ], "properties": { "catalog_path": { "$ref": "#/definitions/plugin.EngineCatalogPath" }, "conflict": { "description": "\"skip\" | \"overwrite\"", "type": "string" }, "engine_id": { "type": "integer" }, "entity_type_names": { "type": "array", "items": { "type": "string" } }, "relation_type_keys": { "type": "array", "items": { "type": "string" } } } }, "github_com_addp_graph_internal_models.ApplyInferredSchemaRequest": { "type": "object", "required": [ "ontology_id" ], "properties": { "conflict": { "description": "\"skip\" | \"overwrite\"", "type": "string" }, "entity_type_names": { "type": "array", "items": { "type": "string" } }, "ontology_id": { "type": "integer" }, "relation_type_keys": { "type": "array", "items": { "type": "string" } } } }, "github_com_addp_graph_internal_models.BatchReviewRequest": { "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "maxItems": 100, "minItems": 1, "uniqueItems": true, "items": { "type": "integer" } } } }, "github_com_addp_graph_internal_models.BrowseSchema": { "type": "object", "properties": { "node_shapes": { "description": "所有节点形状", "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.NodeShapeDTO" } }, "relationship_shapes": { "description": "所有关系形状", "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationshipShapeDTO" } } } }, "github_com_addp_graph_internal_models.BrowseSnapshot": { "type": "object", "properties": { "overview": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SubgraphResult" }, "schema": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BrowseSchema" }, "stats": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BrowseStats" } } }, "github_com_addp_graph_internal_models.BrowseStats": { "type": "object", "properties": { "by_label": { "description": "按标签分组的节点数", "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "node_count": { "description": "总节点数", "type": "integer" }, "relationship_count": { "description": "总关系数", "type": "integer" } } }, "github_com_addp_graph_internal_models.BuildEnqueueResponse": { "type": "object", "properties": { "execution_id": { "type": "string" }, "status": { "type": "string" } } }, "github_com_addp_graph_internal_models.BuildMaterial": { "type": "object", "properties": { "created_at": { "type": "string" }, "error_message": { "type": "string" }, "file_name": { "type": "string" }, "file_path": { "description": "MinIO path (graph/build/ 前缀)", "type": "string" }, "file_size": { "type": "integer" }, "graph_id": { "type": "integer" }, "id": { "type": "integer" }, "processed_at": { "type": "string" }, "processed_chunks": { "description": "已处理 chunk 数", "type": "integer" }, "stats": { "description": "{total_chunks,processed_chunks,auto_written,queued_review,entities_count,relations_count}", "type": "array", "items": { "type": "integer" } }, "status": { "description": "pending/processing/completed/failed", "type": "string" }, "task_id": { "type": "integer" }, "tenant_id": { "type": "integer" }, "total_chunks": { "description": "分块进度(支持断点续传)", "type": "integer" }, "type": { "description": "document/url", "type": "string" } } }, "github_com_addp_graph_internal_models.BuildTask": { "type": "object", "properties": { "chunk_overlap": { "description": "相邻 chunk 的重叠字符数", "type": "integer" }, "chunk_size": { "description": "每个 chunk 的字符数", "type": "integer" }, "completed_at": { "type": "string" }, "confidence_threshold": { "type": "number" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "doc_context_size": { "description": "文档头部上下文字符数", "type": "integer" }, "error_message": { "type": "string" }, "execution_attempt": { "type": "integer" }, "execution_id": { "description": "关联 common.task_executions.execution_id", "type": "string" }, "graph": { "$ref": "#/definitions/github_com_addp_graph_internal_models.KnowledgeGraph" }, "graph_id": { "type": "integer" }, "id": { "type": "integer" }, "materials": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.BuildMaterial" } }, "name": { "type": "string" }, "started_at": { "type": "string" }, "stats": { "description": "{total_materials,processed,auto_written,pending_review,approved,rejected}", "type": "array", "items": { "type": "integer" } }, "status": { "description": "pending/running/success/failed/timeout/cancelled", "type": "string" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "github_com_addp_graph_internal_models.CancelBuildRequest": { "type": "object", "required": [ "attempt", "execution_id" ], "properties": { "attempt": { "type": "integer", "minimum": 0 }, "execution_id": { "type": "string" } } }, "github_com_addp_graph_internal_models.CancelBuildResponse": { "type": "object", "properties": { "attempt": { "type": "integer" }, "cancellation_requested": { "type": "boolean" }, "execution_id": { "type": "string" }, "status": { "type": "string" } } }, "github_com_addp_graph_internal_models.ConstraintDefinition": { "type": "object", "properties": { "field": { "description": "属性字段名", "type": "string" }, "name": { "description": "约束名(空则自动生成)", "type": "string" }, "type": { "description": "\"unique\" | \"not_null\"(not_null 需 Neo4j 企业版)", "type": "string" } } }, "github_com_addp_graph_internal_models.CreateEntityTypeRequest": { "type": "object", "required": [ "name" ], "properties": { "color": { "type": "string" }, "constraints": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ConstraintDefinition" } }, "description": { "type": "string" }, "display_property": { "type": "string" }, "icon": { "type": "string" }, "is_spatial_layer": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" }, "node_labels": { "type": "array", "items": { "type": "string" } }, "parent_id": { "type": "integer" }, "properties": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.PropertyDefinition" } }, "sort_order": { "type": "integer" }, "spatial_layer_config": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SpatialLayerConfig" } } }, "github_com_addp_graph_internal_models.CreateKnowledgeGraphRequest": { "type": "object", "required": [ "catalog_path", "engine_id", "index_management", "name", "ontology_id" ], "properties": { "catalog_path": { "$ref": "#/definitions/plugin.EngineCatalogPath" }, "description": { "type": "string" }, "engine_id": { "type": "integer" }, "index_management": { "type": "string", "enum": [ "managed", "external" ] }, "name": { "type": "string" }, "ontology_id": { "type": "integer" } } }, "github_com_addp_graph_internal_models.CreateOntologyRequest": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": true }, "name": { "type": "string" } } }, "github_com_addp_graph_internal_models.CreateOntologyVersionRequest": { "type": "object", "required": [ "version" ], "properties": { "description": { "type": "string" }, "version": { "type": "string" } } }, "github_com_addp_graph_internal_models.CreateRelationTypeRequest": { "type": "object", "required": [ "name" ], "properties": { "color": { "type": "string" }, "constraints": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ConstraintDefinition" } }, "description": { "type": "string" }, "directed": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" }, "properties": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.PropertyDefinition" } }, "sort_order": { "type": "integer" }, "source_type_id": { "type": "integer" }, "target_type_id": { "type": "integer" } } }, "github_com_addp_graph_internal_models.EntityType": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" } }, "color": { "description": "可视化颜色", "type": "string" }, "constraints": { "description": "约束规则列表", "type": "array", "items": { "type": "integer" } }, "created_at": { "type": "string" }, "description": { "type": "string" }, "display_property": { "description": "节点展示字段(可引用继承的字符串属性)", "type": "string" }, "icon": { "type": "string" }, "id": { "type": "integer" }, "is_spatial_layer": { "description": "是否为空间图层类型", "type": "boolean" }, "label": { "description": "显示名称", "type": "string" }, "name": { "description": "本体概念标识", "type": "string" }, "node_labels": { "description": "图节点标签执行映射", "type": "array", "items": { "type": "integer" } }, "ontology_id": { "type": "integer" }, "parent": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" }, "parent_id": { "description": "继承关系 (subClassOf)", "type": "integer" }, "properties": { "description": "属性定义列表", "type": "array", "items": { "type": "integer" } }, "sort_order": { "type": "integer" }, "spatial_layer_config": { "description": "空间图层配置", "type": "array", "items": { "type": "integer" } }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "github_com_addp_graph_internal_models.ErrorResponse": { "type": "object", "properties": { "error": { "type": "string", "example": "错误信息描述" }, "error_code": { "type": "string", "example": "permission_denied" } } }, "github_com_addp_graph_internal_models.ExpandRequest": { "type": "object", "required": [ "target" ], "properties": { "depth": { "type": "integer" }, "node_limit": { "type": "integer" }, "relationship_limit": { "type": "integer" }, "target": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ExpandTarget" } } }, "github_com_addp_graph_internal_models.ExpandTarget": { "type": "object", "required": [ "kind" ], "properties": { "id": { "type": "string" }, "kind": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } } } }, "github_com_addp_graph_internal_models.GraphAdmissionView": { "type": "object", "properties": { "closed": { "type": "boolean" }, "has_unresolved_operations": { "type": "boolean" } } }, "github_com_addp_graph_internal_models.GraphControlRequest": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "integer" } } }, "github_com_addp_graph_internal_models.GraphEdgeDTO": { "type": "object", "properties": { "color": { "description": "本体中定义的颜色", "type": "string" }, "count": { "type": "integer" }, "directed": { "description": "是否按本体定义显示方向", "type": "boolean" }, "id": { "description": "引擎节点/关系 ID", "type": "string" }, "kind": { "description": "entity | aggregate", "type": "string" }, "properties": { "type": "object", "additionalProperties": true }, "relation_type": { "description": "本体关系类型 name", "type": "string" }, "source": { "description": "源节点 elementId", "type": "string" }, "target": { "description": "目标节点 elementId", "type": "string" }, "type": { "description": "关系类型名称(大写)", "type": "string" } } }, "github_com_addp_graph_internal_models.GraphEndpointDTO": { "type": "object", "properties": { "labels": { "type": "array", "items": { "type": "string" } }, "shape_name": { "type": "string" } } }, "github_com_addp_graph_internal_models.GraphNodeDTO": { "type": "object", "properties": { "color": { "description": "本体中定义的颜色", "type": "string" }, "display_name": { "description": "用于图标签的展示名称", "type": "string" }, "entity_type": { "description": "匹配到的本体实体类型 name", "type": "string" }, "id": { "description": "引擎节点/关系 ID", "type": "string" }, "kind": { "description": "entity | aggregate", "type": "string" }, "labels": { "description": "图节点标签列表", "type": "array", "items": { "type": "string" } }, "member_count": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": true } } }, "github_com_addp_graph_internal_models.InferGraphSchemaRequest": { "type": "object", "required": [ "catalog_path", "engine_id" ], "properties": { "catalog_path": { "$ref": "#/definitions/plugin.EngineCatalogPath" }, "engine_id": { "type": "integer" }, "ontology_id": { "type": "integer" } } }, "github_com_addp_graph_internal_models.KnowledgeGraph": { "type": "object", "properties": { "admission": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphAdmissionView" }, "catalog_path": { "$ref": "#/definitions/plugin.EngineCatalogPath" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "engine_id": { "type": "integer" }, "id": { "type": "integer" }, "index_management": { "type": "string" }, "is_public": { "type": "boolean" }, "name": { "type": "string" }, "ontology": { "$ref": "#/definitions/github_com_addp_graph_internal_models.Ontology" }, "ontology_id": { "type": "integer" }, "stats": { "description": "统计信息缓存", "type": "array", "items": { "type": "integer" } }, "status": { "description": "active, building, error, archived", "type": "string" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "version": { "type": "integer" } } }, "github_com_addp_graph_internal_models.NodeScore": { "type": "object", "properties": { "community_id": { "description": "仅社区算法填充", "type": "integer" }, "display_name": { "type": "string" }, "entity_type": { "type": "string" }, "node_id": { "type": "string" }, "rank": { "description": "1-based", "type": "integer" }, "score": { "type": "number" } } }, "github_com_addp_graph_internal_models.NodeShapeDTO": { "type": "object", "properties": { "color": { "type": "string" }, "count": { "type": "integer" }, "kind": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" } } }, "github_com_addp_graph_internal_models.Ontology": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "entity_types": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" } }, "id": { "type": "integer" }, "metadata": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "relation_types": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationType" } }, "status": { "description": "active, archived", "type": "string" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.OntologyVersion" } } } }, "github_com_addp_graph_internal_models.OntologyDetail": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "entity_types": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" } }, "id": { "type": "integer" }, "metadata": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "relation_types": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationType" } }, "status": { "description": "active, archived", "type": "string" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.OntologyVersion" } } } }, "github_com_addp_graph_internal_models.OntologyVersion": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "id": { "type": "integer" }, "ontology_id": { "type": "integer" }, "snapshot": { "description": "版本快照(完整本体JSON)", "type": "array", "items": { "type": "integer" } }, "tenant_id": { "type": "integer" }, "version": { "description": "e.g. \"1.0.0\"", "type": "string" } } }, "github_com_addp_graph_internal_models.PathRequest": { "type": "object", "required": [ "source_id", "target_id" ], "properties": { "source_id": { "type": "string" }, "target_id": { "type": "string" } } }, "github_com_addp_graph_internal_models.PropertyDefinition": { "type": "object", "properties": { "data_type": { "description": "string, integer, float, boolean, date, datetime, wkt", "type": "string" }, "default_val": {}, "description": { "type": "string" }, "label": { "type": "string" }, "name": { "type": "string" }, "required": { "type": "boolean" }, "searchable": { "type": "boolean" }, "unique": { "type": "boolean" } } }, "github_com_addp_graph_internal_models.RelationType": { "type": "object", "properties": { "color": { "type": "string" }, "constraints": { "type": "array", "items": { "type": "integer" } }, "created_at": { "type": "string" }, "description": { "type": "string" }, "directed": { "description": "是否有向", "type": "boolean" }, "id": { "type": "integer" }, "label": { "description": "显示名称 (中文)", "type": "string" }, "name": { "description": "内部标识符 (英文)", "type": "string" }, "ontology_id": { "type": "integer" }, "properties": { "type": "array", "items": { "type": "integer" } }, "sort_order": { "type": "integer" }, "source_type": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" }, "source_type_id": { "description": "来源实体类型 (nil=任意)", "type": "integer" }, "target_type": { "$ref": "#/definitions/github_com_addp_graph_internal_models.EntityType" }, "target_type_id": { "description": "目标实体类型 (nil=任意)", "type": "integer" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "github_com_addp_graph_internal_models.RelationshipPatternDTO": { "type": "object", "properties": { "count": { "type": "integer" }, "from": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphEndpointDTO" }, "to": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphEndpointDTO" } } }, "github_com_addp_graph_internal_models.RelationshipShapeDTO": { "type": "object", "properties": { "color": { "type": "string" }, "count": { "type": "integer" }, "directed": { "type": "boolean" }, "patterns": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.RelationshipPatternDTO" } }, "type": { "type": "string" } } }, "github_com_addp_graph_internal_models.SearchRequest": { "type": "object", "required": [ "query" ], "properties": { "limit": { "type": "integer" }, "query": { "type": "string" } } }, "github_com_addp_graph_internal_models.SpatialLayerConfig": { "type": "object", "properties": { "geom_field": { "description": "WKT 属性名,默认 \"wkt\"(wkt 类型)", "type": "string" }, "geometry_type": { "description": "\"point\" | \"wkt\"", "type": "string" }, "lat_field": { "description": "纬度字段名,默认 \"lat\"(point 类型)", "type": "string" }, "layer_name": { "description": "Neo4j spatial layer name,默认使用实体类型名", "type": "string" }, "lon_field": { "description": "经度字段名,默认 \"lon\"(point 类型)", "type": "string" } } }, "github_com_addp_graph_internal_models.SpatialLayerInfo": { "type": "object", "properties": { "config": { "description": "含 geometry_type / lon_field / lat_field / geom_field", "allOf": [ { "$ref": "#/definitions/github_com_addp_graph_internal_models.SpatialLayerConfig" } ] }, "entity_type": { "description": "本体实体类型 name", "type": "string" }, "entity_type_label": { "description": "本体实体类型显示名称", "type": "string" }, "name": { "description": "Neo4j layer name", "type": "string" }, "node_labels": { "description": "Neo4j 节点标签执行映射", "type": "array", "items": { "type": "string" } } } }, "github_com_addp_graph_internal_models.SubgraphResult": { "type": "object", "properties": { "edges": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphEdgeDTO" } }, "nodes": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.GraphNodeDTO" } } } }, "github_com_addp_graph_internal_models.SuccessResponse": { "type": "object", "properties": { "message": { "type": "string", "example": "操作成功" } } }, "github_com_addp_graph_internal_models.SyncConstraintsRequest": { "type": "object", "required": [ "graph_id" ], "properties": { "graph_id": { "type": "integer" } } }, "github_com_addp_graph_internal_models.SyncSpatialLayersRequest": { "type": "object", "required": [ "graph_id" ], "properties": { "graph_id": { "type": "integer" } } }, "github_com_addp_graph_internal_models.UpdateEntityTypeRequest": { "type": "object", "properties": { "color": { "type": "string" }, "constraints": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ConstraintDefinition" } }, "description": { "type": "string" }, "display_property": { "type": "string" }, "icon": { "type": "string" }, "is_spatial_layer": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" }, "node_labels": { "type": "array", "items": { "type": "string" } }, "parent_id": { "type": "integer" }, "properties": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.PropertyDefinition" } }, "sort_order": { "type": "integer" }, "spatial_layer_config": { "$ref": "#/definitions/github_com_addp_graph_internal_models.SpatialLayerConfig" } } }, "github_com_addp_graph_internal_models.UpdateKnowledgeGraphRequest": { "type": "object", "required": [ "version" ], "properties": { "description": { "type": "string" }, "is_public": { "description": "省略时保留现值,false 显式关闭公开 | Omit to retain; false disables public access", "type": "boolean" }, "name": { "type": "string" }, "version": { "type": "integer" } } }, "github_com_addp_graph_internal_models.UpdateOntologyRequest": { "type": "object", "properties": { "description": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": true }, "name": { "type": "string" }, "status": { "type": "string" } } }, "github_com_addp_graph_internal_models.UpdateRelationTypeRequest": { "type": "object", "properties": { "color": { "type": "string" }, "constraints": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.ConstraintDefinition" } }, "description": { "type": "string" }, "directed": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" }, "properties": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_graph_internal_models.PropertyDefinition" } }, "sort_order": { "type": "integer" }, "source_type_id": { "type": "integer" }, "target_type_id": { "type": "integer" } } }, "github_com_addp_graph_internal_service.ImportFromModelRequest": { "type": "object", "properties": { "conflict": { "description": "\"skip\" | \"overwrite\"", "type": "string" }, "entity_ids": { "description": "选中的 Model entity id 列表", "type": "array", "items": { "type": "integer" } }, "relation_ids": { "description": "选中的 Model relation id 列表", "type": "array", "items": { "type": "integer" } } } }, "internal_api.graphBuildExecutionResponse": { "type": "object", "properties": { "attempt": { "type": "integer" }, "build_result": { "$ref": "#/definitions/internal_api.graphBuildResult" }, "bytes_read": { "type": "integer" }, "bytes_written": { "type": "integer" }, "completed_at": { "type": "string" }, "created_at": { "type": "string" }, "current_step": { "type": "string" }, "diagnostics_truncated": { "type": "boolean" }, "error_details": { "$ref": "#/definitions/models.JSONMap" }, "execution_boundary": { "type": "string" }, "execution_id": { "type": "string" }, "execution_time_ms": { "type": "integer" }, "id": { "type": "integer" }, "max_attempts": { "type": "integer" }, "metadata": { "$ref": "#/definitions/models.JSONMap" }, "module": { "type": "string" }, "parent_execution_id": { "type": "string" }, "progress": { "type": "integer" }, "records_read": { "type": "integer" }, "records_written": { "type": "integer" }, "retry_of_execution_id": { "type": "string" }, "rows_affected": { "type": "integer" }, "source": { "type": "string" }, "source_task_id": { "type": "string" }, "source_task_name": { "type": "string" }, "started_at": { "type": "string" }, "status": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/execution.DiagnosticStep" } }, "steps_attempt_unverified": { "type": "boolean" }, "steps_truncated": { "type": "boolean" }, "task_type": { "type": "string" }, "trigger_type": { "type": "string" }, "triggered_by": { "type": "integer" }, "updated_at": { "type": "string" } } }, "internal_api.graphBuildResult": { "type": "object", "properties": { "auto_written": { "type": "integer" }, "pending_review": { "type": "integer" }, "total_materials": { "type": "integer" } } }, "internal_api.graphTaskListItem": { "type": "object", "properties": { "description": { "type": "string" }, "enabled": { "type": "boolean" }, "execution_contract": { "$ref": "#/definitions/taskprovider.ExecutionContract" }, "graph_id": { "type": "integer" }, "id": { "type": "integer" }, "last_execution_id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "task_type": { "type": "string" }, "tenant_id": { "type": "integer" } } }, "internal_api.graphTaskListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/internal_api.graphTaskListItem" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" } } }, "internal_api.graphTaskProviderExecuteRequest": { "type": "object", "properties": { "parameters": { "type": "object", "additionalProperties": true }, "parent_execution_id": { "type": "string" }, "source": { "type": "string" }, "trigger_type": { "type": "string" } } }, "internal_api.graphTaskProviderExecuteResponse": { "type": "object", "properties": { "execution_id": { "type": "string" }, "status": { "type": "string", "enum": [ "pending" ], "example": "pending" } } }, "models.JSONMap": { "type": "object", "additionalProperties": true }, "plugin.EngineCatalogPath": { "type": "object", "properties": { "engine_id": { "type": "integer" }, "segments": { "type": "array", "items": { "$ref": "#/definitions/plugin.EngineCatalogSegment" } }, "version": { "type": "string" } } }, "plugin.EngineCatalogSegment": { "type": "object", "properties": { "kind": { "type": "string" }, "name": { "type": "string" }, "term": { "type": "string" } } }, "taskprovider.ExecutionContract": { "type": "object", "properties": { "input_defaults": { "type": "object", "additionalProperties": true }, "input_schema": { "type": "object", "additionalProperties": true }, "input_ui_schema": { "type": "object", "additionalProperties": true }, "output_schema": { "type": "object", "additionalProperties": true } } }, "taskprovider.ExecutionStatusResponse": { "type": "object", "required": [ "outputs" ], "properties": { "attempt": { "type": "integer" }, "bytes_read": { "type": "integer" }, "bytes_written": { "type": "integer" }, "completed_at": { "type": "string" }, "created_at": { "type": "string" }, "current_step": { "type": "string" }, "diagnostics_truncated": { "type": "boolean" }, "error_details": { "$ref": "#/definitions/models.JSONMap" }, "execution_boundary": { "type": "string" }, "execution_id": { "type": "string" }, "execution_time_ms": { "type": "integer" }, "id": { "type": "integer" }, "max_attempts": { "type": "integer" }, "metadata": { "$ref": "#/definitions/models.JSONMap" }, "module": { "type": "string" }, "outputs": { "$ref": "#/definitions/models.JSONMap" }, "parent_execution_id": { "type": "string" }, "progress": { "type": "integer" }, "records_read": { "type": "integer" }, "records_written": { "type": "integer" }, "retry_of_execution_id": { "type": "string" }, "rows_affected": { "type": "integer" }, "source": { "type": "string" }, "source_task_id": { "type": "string" }, "source_task_name": { "type": "string" }, "started_at": { "type": "string" }, "status": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/execution.DiagnosticStep" } }, "steps_attempt_unverified": { "type": "boolean" }, "steps_truncated": { "type": "boolean" }, "task_type": { "type": "string" }, "trigger_type": { "type": "string" }, "triggered_by": { "type": "integer" }, "updated_at": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "description": "Type \"Bearer\" followed by a space and JWT token.", "type": "apiKey", "name": "Authorization", "in": "header" } } }