独立 copilot 服务
This commit is contained in:
@@ -48,9 +48,3 @@ METADATA_DB_PASSWORD="password"
|
||||
KEYCLOAK_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
|
||||
KEYCLOAK_ALGORITHM=RS256
|
||||
KEYCLOAK_AUDIENCE="account"
|
||||
|
||||
# ============================================
|
||||
# Copilot Python Sidecar
|
||||
# ============================================
|
||||
COPILOT_SIDECAR_URL="http://127.0.0.1:8787"
|
||||
COPILOT_STREAM_TIMEOUT_SECONDS=120
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
name: api-operations-overview
|
||||
description: 按“领域 -> 场景 -> 操作”组织 TJWater API Skills,快速定位可调用接口。
|
||||
version: 2.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你需要按业务语义快速定位 API,或希望在联调时按分层目录检索接口。
|
||||
|
||||
# 分层结构(<=3 层)
|
||||
|
||||
- 领域(Domain)
|
||||
- 场景(Scenario)
|
||||
- 操作(Action)
|
||||
|
||||
# 目录导航
|
||||
|
||||
- `business/identity-access`
|
||||
- `business/project-workspace`
|
||||
- `business/network-assets`
|
||||
- `business/component-config`
|
||||
- `analytics/simulation-analysis`
|
||||
- `analytics/scada-operations`
|
||||
- `data/timeseries-access`
|
||||
- `platform/governance-observability`
|
||||
- `ai/copilot-assistant`
|
||||
|
||||
完整操作清单:`api-spec.md`
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联示例: `examples.md`
|
||||
- 关联运行手册: `runbook.md`
|
||||
|
||||
Action Skills 总数:`39`
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: api-operations-ai-copilot-assistant
|
||||
description: Copilot 助手接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **ai/copilot-assistant** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `copilot`: `copilot/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `copilot`
|
||||
- 详情技能:`copilot/SKILL.md`
|
||||
- `POST /api/v1/copilot/chat/stream` - Copilot 聊天流式响应
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联项目空间: `../../business/project-workspace`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: api-operations-ai-copilot-assistant-copilot
|
||||
description: ai/copilot-assistant 场景下 copilot 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **copilot** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/copilot/chat/stream` - Copilot 聊天流式响应
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联项目空间: `../../business/project-workspace`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
@@ -1,60 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-scada-operations
|
||||
description: SCADA 数据读写与历史查询接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **analytics/scada-operations** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`DELETE`, `GET`, `PATCH`, `POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `scada`: `scada/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `scada`
|
||||
- 详情技能:`scada/SKILL.md`
|
||||
- `POST /api/v1/addscadadevice/` - 添加SCADA设备
|
||||
- `POST /api/v1/addscadadevicedata/` - 添加SCADA设备数据
|
||||
- `POST /api/v1/addscadaelement/` - 添加SCADA元素映射
|
||||
- `POST /api/v1/cleanscadadevice/` - 清空SCADA设备表
|
||||
- `POST /api/v1/cleanscadadevicedata/` - 清空SCADA设备数据表
|
||||
- `POST /api/v1/cleanscadaelement/` - 清空SCADA元素映射表
|
||||
- `POST /api/v1/deletescadadevice/` - 删除SCADA设备
|
||||
- `POST /api/v1/deletescadadevicedata/` - 删除SCADA设备数据
|
||||
- `POST /api/v1/deletescadaelement/` - 删除SCADA元素映射
|
||||
- `GET /api/v1/getallscadadeviceids/` - 获取所有SCADA设备ID
|
||||
- `GET /api/v1/getallscadadevices/` - 获取所有SCADA设备
|
||||
- `GET /api/v1/getallscadainfo/` - 获取所有SCADA信息
|
||||
- `GET /api/v1/getallscadaproperties/` - 获取所有SCADA属性
|
||||
- `GET /api/v1/getscadadevice/` - 获取SCADA设备
|
||||
- `GET /api/v1/getscadadevicedata/` - 获取SCADA设备数据
|
||||
- `GET /api/v1/getscadadevicedataschema/` - 获取SCADA设备数据架构
|
||||
- `GET /api/v1/getscadadeviceschema/` - 获取SCADA设备架构
|
||||
- `GET /api/v1/getscadaelement/` - 获取单个SCADA元素映射
|
||||
- `GET /api/v1/getscadaelements/` - 获取所有SCADA元素映射
|
||||
- `GET /api/v1/getscadaelementschema/` - 获取SCADA元素架构
|
||||
- `GET /api/v1/getscadainfo/` - 获取SCADA信息
|
||||
- `GET /api/v1/getscadainfoschema/` - 获取SCADA信息架构
|
||||
- `GET /api/v1/getscadaproperties/` - 获取SCADA属性
|
||||
- `POST /api/v1/scada/batch` - 批量插入SCADA监测数据
|
||||
- `DELETE /api/v1/scada/by-id-time-range` - 按设备ID和时间范围删除SCADA数据
|
||||
- `GET /api/v1/scada/by-ids-field-time-range` - 按设备ID、字段和时间范围查询SCADA数据
|
||||
- `GET /api/v1/scada/by-ids-time-range` - 按设备ID和时间范围查询SCADA数据
|
||||
- `PATCH /api/v1/scada/{device_id}/field` - 更新SCADA设备字段
|
||||
- `POST /api/v1/setscadadevice/` - 更新SCADA设备
|
||||
- `POST /api/v1/setscadadevicedata/` - 更新SCADA设备数据
|
||||
- `POST /api/v1/setscadaelement/` - 更新SCADA元素映射
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-scada-operations-scada
|
||||
description: analytics/scada-operations 场景下 scada 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **scada** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`DELETE`, `GET`, `PATCH`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addscadadevice/` - 添加SCADA设备
|
||||
- `POST /api/v1/addscadadevicedata/` - 添加SCADA设备数据
|
||||
- `POST /api/v1/addscadaelement/` - 添加SCADA元素映射
|
||||
- `POST /api/v1/cleanscadadevice/` - 清空SCADA设备表
|
||||
- `POST /api/v1/cleanscadadevicedata/` - 清空SCADA设备数据表
|
||||
- `POST /api/v1/cleanscadaelement/` - 清空SCADA元素映射表
|
||||
- `POST /api/v1/deletescadadevice/` - 删除SCADA设备
|
||||
- `POST /api/v1/deletescadadevicedata/` - 删除SCADA设备数据
|
||||
- `POST /api/v1/deletescadaelement/` - 删除SCADA元素映射
|
||||
- `GET /api/v1/getallscadadeviceids/` - 获取所有SCADA设备ID
|
||||
- `GET /api/v1/getallscadadevices/` - 获取所有SCADA设备
|
||||
- `GET /api/v1/getallscadainfo/` - 获取所有SCADA信息
|
||||
- `GET /api/v1/getallscadaproperties/` - 获取所有SCADA属性
|
||||
- `GET /api/v1/getscadadevice/` - 获取SCADA设备
|
||||
- `GET /api/v1/getscadadevicedata/` - 获取SCADA设备数据
|
||||
- `GET /api/v1/getscadadevicedataschema/` - 获取SCADA设备数据架构
|
||||
- `GET /api/v1/getscadadeviceschema/` - 获取SCADA设备架构
|
||||
- `GET /api/v1/getscadaelement/` - 获取单个SCADA元素映射
|
||||
- `GET /api/v1/getscadaelements/` - 获取所有SCADA元素映射
|
||||
- `GET /api/v1/getscadaelementschema/` - 获取SCADA元素架构
|
||||
- `GET /api/v1/getscadainfo/` - 获取SCADA信息
|
||||
- `GET /api/v1/getscadainfoschema/` - 获取SCADA信息架构
|
||||
- `GET /api/v1/getscadaproperties/` - 获取SCADA属性
|
||||
- `POST /api/v1/scada/batch` - 批量插入SCADA监测数据
|
||||
- `DELETE /api/v1/scada/by-id-time-range` - 按设备ID和时间范围删除SCADA数据
|
||||
- `GET /api/v1/scada/by-ids-field-time-range` - 按设备ID、字段和时间范围查询SCADA数据
|
||||
- `GET /api/v1/scada/by-ids-time-range` - 按设备ID和时间范围查询SCADA数据
|
||||
- `PATCH /api/v1/scada/{device_id}/field` - 更新SCADA设备字段
|
||||
- `POST /api/v1/setscadadevice/` - 更新SCADA设备
|
||||
- `POST /api/v1/setscadadevicedata/` - 更新SCADA设备数据
|
||||
- `POST /api/v1/setscadaelement/` - 更新SCADA元素映射
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
@@ -1,89 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-simulation-analysis
|
||||
description: 仿真、风险、漏损与爆管分析接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **analytics/simulation-analysis** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `burst_detection`: `burst_detection/SKILL.md`
|
||||
- `burst_location`: `burst_location/SKILL.md`
|
||||
- `leakage`: `leakage/SKILL.md`
|
||||
- `risk`: `risk/SKILL.md`
|
||||
- `simulation`: `simulation/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `burst_detection`
|
||||
- 详情技能:`burst_detection/SKILL.md`
|
||||
- `POST /api/v1/burst-detection/detect/` - 执行爆管检测
|
||||
- `GET /api/v1/burst-detection/schemes/` - 查询爆管检测方案列表
|
||||
- `GET /api/v1/burst-detection/schemes/{scheme_name}` - 获取爆管检测方案详情
|
||||
|
||||
## Action: `burst_location`
|
||||
- 详情技能:`burst_location/SKILL.md`
|
||||
- `POST /api/v1/burst-location/locate/` - 执行爆管定位
|
||||
- `GET /api/v1/burst-location/schemes/` - 查询爆管定位方案列表
|
||||
- `GET /api/v1/burst-location/schemes/{scheme_name}` - 获取爆管定位方案详情
|
||||
|
||||
## Action: `leakage`
|
||||
- 详情技能:`leakage/SKILL.md`
|
||||
- `POST /api/v1/leakage/identify/` - 执行漏损识别
|
||||
- `GET /api/v1/leakage/schemes/` - 查询漏损识别方案列表
|
||||
- `GET /api/v1/leakage/schemes/{scheme_name}` - 获取漏损识别方案详情
|
||||
|
||||
## Action: `risk`
|
||||
- 详情技能:`risk/SKILL.md`
|
||||
- `GET /api/v1/getnetworkpiperiskprobabilitynow/` - 获取整个网络的管道风险概率
|
||||
- `GET /api/v1/getpiperiskprobability/` - 获取管道风险概率历史
|
||||
- `GET /api/v1/getpiperiskprobabilitygeometries/` - 获取管道风险几何信息
|
||||
- `GET /api/v1/getpiperiskprobabilitynow/` - 获取管道当前风险概率
|
||||
- `GET /api/v1/getpipesriskprobability/` - 批量获取多条管道风险概率
|
||||
|
||||
## Action: `simulation`
|
||||
- 详情技能:`simulation/SKILL.md`
|
||||
- `GET /api/v1/age_analysis/` - 水龄分析(高级)
|
||||
- `GET /api/v1/ageanalysis/` - 水龄分析(基础)
|
||||
- `GET /api/v1/burst_analysis/` - 爆管分析(高级)
|
||||
- `GET /api/v1/burstanalysis/` - 爆管分析(基础)
|
||||
- `GET /api/v1/contaminant_simulation/` - 污染物模拟
|
||||
- `POST /api/v1/daily_scheduling_analysis/` - 日排程分析
|
||||
- `GET /api/v1/dumpoutput/` - 导出模拟输出
|
||||
- `GET /api/v1/flushing_analysis/` - 冲洗分析(高级)
|
||||
- `GET /api/v1/flushinganalysis/` - 冲洗分析(基础)
|
||||
- `POST /api/v1/network_project/` - 导入网络项目
|
||||
- `POST /api/v1/network_update/` - 管网更新(高级)
|
||||
- `GET /api/v1/networkupdate/` - 管网更新(基础)
|
||||
- `POST /api/v1/pressure_regulation/` - 压力调节(高级)
|
||||
- `POST /api/v1/pressure_sensor_placement_kmeans/` - 压力传感器放置-KMeans聚类分析(高级)
|
||||
- `POST /api/v1/pressure_sensor_placement_sensitivity/` - 压力传感器放置-灵敏度分析(高级)
|
||||
- `GET /api/v1/pressureregulation/` - 压力调节(基础)
|
||||
- `GET /api/v1/pressuresensorplacementkmeans/` - 压力传感器放置-KMeans聚类分析(基础)
|
||||
- `GET /api/v1/pressuresensorplacementsensitivity/` - 压力传感器放置-灵敏度分析(基础)
|
||||
- `POST /api/v1/project_management/` - 项目管理(高级)
|
||||
- `GET /api/v1/projectmanagement/` - 项目管理(基础)
|
||||
- `POST /api/v1/pump_failure/` - 泵故障管理
|
||||
- `GET /api/v1/runinp/` - 运行INP文件
|
||||
- `GET /api/v1/runproject/` - 运行项目模拟
|
||||
- `GET /api/v1/runprojectreturndict/` - 运行项目模拟(返回字典)
|
||||
- `POST /api/v1/runsimulationmanuallybydate/` - 手动运行日期指定模拟
|
||||
- `POST /api/v1/scheduling_analysis/` - 排程分析
|
||||
- `POST /api/v1/sensorplacementscheme/create` - 传感器放置方案创建
|
||||
- `GET /api/v1/valve_close_analysis/` - 阀门关闭分析(高级)
|
||||
- `GET /api/v1/valve_isolation_analysis/` - 阀门隔离分析
|
||||
- `GET /api/v1/valvecloseanalysis/` - 阀门关闭分析(基础)
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联网络资产: `../../business/network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-simulation-analysis-burst-detection
|
||||
description: analytics/simulation-analysis 场景下 burst-detection 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **burst_detection** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/burst-detection/detect/` - 执行爆管检测
|
||||
- `GET /api/v1/burst-detection/schemes/` - 查询爆管检测方案列表
|
||||
- `GET /api/v1/burst-detection/schemes/{scheme_name}` - 获取爆管检测方案详情
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../../business/network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-simulation-analysis-burst-location
|
||||
description: analytics/simulation-analysis 场景下 burst-location 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **burst_location** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/burst-location/locate/` - 执行爆管定位
|
||||
- `GET /api/v1/burst-location/schemes/` - 查询爆管定位方案列表
|
||||
- `GET /api/v1/burst-location/schemes/{scheme_name}` - 获取爆管定位方案详情
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../../business/network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-simulation-analysis-leakage
|
||||
description: analytics/simulation-analysis 场景下 leakage 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **leakage** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/leakage/identify/` - 执行漏损识别
|
||||
- `GET /api/v1/leakage/schemes/` - 查询漏损识别方案列表
|
||||
- `GET /api/v1/leakage/schemes/{scheme_name}` - 获取漏损识别方案详情
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../../business/network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-simulation-analysis-risk
|
||||
description: analytics/simulation-analysis 场景下 risk 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **risk** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getnetworkpiperiskprobabilitynow/` - 获取整个网络的管道风险概率
|
||||
- `GET /api/v1/getpiperiskprobability/` - 获取管道风险概率历史
|
||||
- `GET /api/v1/getpiperiskprobabilitygeometries/` - 获取管道风险几何信息
|
||||
- `GET /api/v1/getpiperiskprobabilitynow/` - 获取管道当前风险概率
|
||||
- `GET /api/v1/getpipesriskprobability/` - 批量获取多条管道风险概率
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../../business/network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
name: api-operations-analytics-simulation-analysis-simulation
|
||||
description: analytics/simulation-analysis 场景下 simulation 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **simulation** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/age_analysis/` - 水龄分析(高级)
|
||||
- `GET /api/v1/ageanalysis/` - 水龄分析(基础)
|
||||
- `GET /api/v1/burst_analysis/` - 爆管分析(高级)
|
||||
- `GET /api/v1/burstanalysis/` - 爆管分析(基础)
|
||||
- `GET /api/v1/contaminant_simulation/` - 污染物模拟
|
||||
- `POST /api/v1/daily_scheduling_analysis/` - 日排程分析
|
||||
- `GET /api/v1/dumpoutput/` - 导出模拟输出
|
||||
- `GET /api/v1/flushing_analysis/` - 冲洗分析(高级)
|
||||
- `GET /api/v1/flushinganalysis/` - 冲洗分析(基础)
|
||||
- `POST /api/v1/network_project/` - 导入网络项目
|
||||
- `POST /api/v1/network_update/` - 管网更新(高级)
|
||||
- `GET /api/v1/networkupdate/` - 管网更新(基础)
|
||||
- `POST /api/v1/pressure_regulation/` - 压力调节(高级)
|
||||
- `POST /api/v1/pressure_sensor_placement_kmeans/` - 压力传感器放置-KMeans聚类分析(高级)
|
||||
- `POST /api/v1/pressure_sensor_placement_sensitivity/` - 压力传感器放置-灵敏度分析(高级)
|
||||
- `GET /api/v1/pressureregulation/` - 压力调节(基础)
|
||||
- `GET /api/v1/pressuresensorplacementkmeans/` - 压力传感器放置-KMeans聚类分析(基础)
|
||||
- `GET /api/v1/pressuresensorplacementsensitivity/` - 压力传感器放置-灵敏度分析(基础)
|
||||
- `POST /api/v1/project_management/` - 项目管理(高级)
|
||||
- `GET /api/v1/projectmanagement/` - 项目管理(基础)
|
||||
- `POST /api/v1/pump_failure/` - 泵故障管理
|
||||
- `GET /api/v1/runinp/` - 运行INP文件
|
||||
- `GET /api/v1/runproject/` - 运行项目模拟
|
||||
- `GET /api/v1/runprojectreturndict/` - 运行项目模拟(返回字典)
|
||||
- `POST /api/v1/runsimulationmanuallybydate/` - 手动运行日期指定模拟
|
||||
- `POST /api/v1/scheduling_analysis/` - 排程分析
|
||||
- `POST /api/v1/sensorplacementscheme/create` - 传感器放置方案创建
|
||||
- `GET /api/v1/valve_close_analysis/` - 阀门关闭分析(高级)
|
||||
- `GET /api/v1/valve_isolation_analysis/` - 阀门隔离分析
|
||||
- `GET /api/v1/valvecloseanalysis/` - 阀门关闭分析(基础)
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../../business/network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,671 +0,0 @@
|
||||
# API Skills 索引(领域 -> 场景 -> 操作)
|
||||
|
||||
说明:操作层 Action 以 endpoint 模块为单位。
|
||||
|
||||
## ai/copilot-assistant
|
||||
|
||||
### Action: `copilot`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/copilot/chat/stream` | Copilot 聊天流式响应 |
|
||||
|
||||
## analytics/scada-operations
|
||||
|
||||
### Action: `scada`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addscadadevice/` | 添加SCADA设备 |
|
||||
| POST | `/api/v1/addscadadevicedata/` | 添加SCADA设备数据 |
|
||||
| POST | `/api/v1/addscadaelement/` | 添加SCADA元素映射 |
|
||||
| POST | `/api/v1/cleanscadadevice/` | 清空SCADA设备表 |
|
||||
| POST | `/api/v1/cleanscadadevicedata/` | 清空SCADA设备数据表 |
|
||||
| POST | `/api/v1/cleanscadaelement/` | 清空SCADA元素映射表 |
|
||||
| POST | `/api/v1/deletescadadevice/` | 删除SCADA设备 |
|
||||
| POST | `/api/v1/deletescadadevicedata/` | 删除SCADA设备数据 |
|
||||
| POST | `/api/v1/deletescadaelement/` | 删除SCADA元素映射 |
|
||||
| GET | `/api/v1/getallscadadeviceids/` | 获取所有SCADA设备ID |
|
||||
| GET | `/api/v1/getallscadadevices/` | 获取所有SCADA设备 |
|
||||
| GET | `/api/v1/getallscadainfo/` | 获取所有SCADA信息 |
|
||||
| GET | `/api/v1/getallscadaproperties/` | 获取所有SCADA属性 |
|
||||
| GET | `/api/v1/getscadadevice/` | 获取SCADA设备 |
|
||||
| GET | `/api/v1/getscadadevicedata/` | 获取SCADA设备数据 |
|
||||
| GET | `/api/v1/getscadadevicedataschema/` | 获取SCADA设备数据架构 |
|
||||
| GET | `/api/v1/getscadadeviceschema/` | 获取SCADA设备架构 |
|
||||
| GET | `/api/v1/getscadaelement/` | 获取单个SCADA元素映射 |
|
||||
| GET | `/api/v1/getscadaelements/` | 获取所有SCADA元素映射 |
|
||||
| GET | `/api/v1/getscadaelementschema/` | 获取SCADA元素架构 |
|
||||
| GET | `/api/v1/getscadainfo/` | 获取SCADA信息 |
|
||||
| GET | `/api/v1/getscadainfoschema/` | 获取SCADA信息架构 |
|
||||
| GET | `/api/v1/getscadaproperties/` | 获取SCADA属性 |
|
||||
| POST | `/api/v1/scada/batch` | 批量插入SCADA监测数据 |
|
||||
| DELETE | `/api/v1/scada/by-id-time-range` | 按设备ID和时间范围删除SCADA数据 |
|
||||
| GET | `/api/v1/scada/by-ids-field-time-range` | 按设备ID、字段和时间范围查询SCADA数据 |
|
||||
| GET | `/api/v1/scada/by-ids-time-range` | 按设备ID和时间范围查询SCADA数据 |
|
||||
| PATCH | `/api/v1/scada/{device_id}/field` | 更新SCADA设备字段 |
|
||||
| POST | `/api/v1/setscadadevice/` | 更新SCADA设备 |
|
||||
| POST | `/api/v1/setscadadevicedata/` | 更新SCADA设备数据 |
|
||||
| POST | `/api/v1/setscadaelement/` | 更新SCADA元素映射 |
|
||||
|
||||
## analytics/simulation-analysis
|
||||
|
||||
### Action: `burst_detection`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/burst-detection/detect/` | 执行爆管检测 |
|
||||
| GET | `/api/v1/burst-detection/schemes/` | 查询爆管检测方案列表 |
|
||||
| GET | `/api/v1/burst-detection/schemes/{scheme_name}` | 获取爆管检测方案详情 |
|
||||
|
||||
### Action: `burst_location`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/burst-location/locate/` | 执行爆管定位 |
|
||||
| GET | `/api/v1/burst-location/schemes/` | 查询爆管定位方案列表 |
|
||||
| GET | `/api/v1/burst-location/schemes/{scheme_name}` | 获取爆管定位方案详情 |
|
||||
|
||||
### Action: `leakage`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/leakage/identify/` | 执行漏损识别 |
|
||||
| GET | `/api/v1/leakage/schemes/` | 查询漏损识别方案列表 |
|
||||
| GET | `/api/v1/leakage/schemes/{scheme_name}` | 获取漏损识别方案详情 |
|
||||
|
||||
### Action: `risk`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getnetworkpiperiskprobabilitynow/` | 获取整个网络的管道风险概率 |
|
||||
| GET | `/api/v1/getpiperiskprobability/` | 获取管道风险概率历史 |
|
||||
| GET | `/api/v1/getpiperiskprobabilitygeometries/` | 获取管道风险几何信息 |
|
||||
| GET | `/api/v1/getpiperiskprobabilitynow/` | 获取管道当前风险概率 |
|
||||
| GET | `/api/v1/getpipesriskprobability/` | 批量获取多条管道风险概率 |
|
||||
|
||||
### Action: `simulation`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/age_analysis/` | 水龄分析(高级) |
|
||||
| GET | `/api/v1/ageanalysis/` | 水龄分析(基础) |
|
||||
| GET | `/api/v1/burst_analysis/` | 爆管分析(高级) |
|
||||
| GET | `/api/v1/burstanalysis/` | 爆管分析(基础) |
|
||||
| GET | `/api/v1/contaminant_simulation/` | 污染物模拟 |
|
||||
| POST | `/api/v1/daily_scheduling_analysis/` | 日排程分析 |
|
||||
| GET | `/api/v1/dumpoutput/` | 导出模拟输出 |
|
||||
| GET | `/api/v1/flushing_analysis/` | 冲洗分析(高级) |
|
||||
| GET | `/api/v1/flushinganalysis/` | 冲洗分析(基础) |
|
||||
| POST | `/api/v1/network_project/` | 导入网络项目 |
|
||||
| POST | `/api/v1/network_update/` | 管网更新(高级) |
|
||||
| GET | `/api/v1/networkupdate/` | 管网更新(基础) |
|
||||
| POST | `/api/v1/pressure_regulation/` | 压力调节(高级) |
|
||||
| POST | `/api/v1/pressure_sensor_placement_kmeans/` | 压力传感器放置-KMeans聚类分析(高级) |
|
||||
| POST | `/api/v1/pressure_sensor_placement_sensitivity/` | 压力传感器放置-灵敏度分析(高级) |
|
||||
| GET | `/api/v1/pressureregulation/` | 压力调节(基础) |
|
||||
| GET | `/api/v1/pressuresensorplacementkmeans/` | 压力传感器放置-KMeans聚类分析(基础) |
|
||||
| GET | `/api/v1/pressuresensorplacementsensitivity/` | 压力传感器放置-灵敏度分析(基础) |
|
||||
| POST | `/api/v1/project_management/` | 项目管理(高级) |
|
||||
| GET | `/api/v1/projectmanagement/` | 项目管理(基础) |
|
||||
| POST | `/api/v1/pump_failure/` | 泵故障管理 |
|
||||
| GET | `/api/v1/runinp/` | 运行INP文件 |
|
||||
| GET | `/api/v1/runproject/` | 运行项目模拟 |
|
||||
| GET | `/api/v1/runprojectreturndict/` | 运行项目模拟(返回字典) |
|
||||
| POST | `/api/v1/runsimulationmanuallybydate/` | 手动运行日期指定模拟 |
|
||||
| POST | `/api/v1/scheduling_analysis/` | 排程分析 |
|
||||
| POST | `/api/v1/sensorplacementscheme/create` | 传感器放置方案创建 |
|
||||
| GET | `/api/v1/valve_close_analysis/` | 阀门关闭分析(高级) |
|
||||
| GET | `/api/v1/valve_isolation_analysis/` | 阀门隔离分析 |
|
||||
| GET | `/api/v1/valvecloseanalysis/` | 阀门关闭分析(基础) |
|
||||
|
||||
## business/component-config
|
||||
|
||||
### Action: `controls`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getcontrolproperties/` | 获取控制属性 |
|
||||
| GET | `/api/v1/getcontrolschema/` | 获取控制架构 |
|
||||
| GET | `/api/v1/getruleproperties/` | 获取规则属性 |
|
||||
| GET | `/api/v1/getruleschema/` | 获取规则架构 |
|
||||
| POST | `/api/v1/setcontrolproperties/` | 设置控制属性 |
|
||||
| POST | `/api/v1/setruleproperties/` | 设置规则属性 |
|
||||
|
||||
### Action: `curves`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addcurve/` | 添加曲线 |
|
||||
| POST | `/api/v1/deletecurve/` | 删除曲线 |
|
||||
| GET | `/api/v1/getcurveproperties/` | 获取曲线属性 |
|
||||
| GET | `/api/v1/getcurves/` | 获取所有曲线 |
|
||||
| GET | `/api/v1/getcurveschema` | 获取曲线架构 |
|
||||
| GET | `/api/v1/iscurve/` | 检查曲线存在性 |
|
||||
| POST | `/api/v1/setcurveproperties/` | 设置曲线属性 |
|
||||
|
||||
### Action: `options`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getenergyproperties/` | 获取能耗选项属性 |
|
||||
| GET | `/api/v1/getenergyschema/` | 获取能耗选项架构 |
|
||||
| GET | `/api/v1/getoptionproperties/` | 获取选项属性 |
|
||||
| GET | `/api/v1/getoptionschema/` | 获取选项架构 |
|
||||
| GET | `/api/v1/getpumpenergyproperties/` | 获取泵能耗属性 |
|
||||
| GET | `/api/v1/getpumpenergyschema/` | 获取泵能耗选项架构 |
|
||||
| GET | `/api/v1/gettimeproperties/` | 获取时间选项属性 |
|
||||
| GET | `/api/v1/gettimeschema` | 获取时间选项架构 |
|
||||
| POST | `/api/v1/setenergyproperties/` | 设置能耗选项属性 |
|
||||
| POST | `/api/v1/setoptionproperties/` | 设置选项属性 |
|
||||
| GET | `/api/v1/setpumpenergyproperties/` | 设置泵能耗属性 |
|
||||
| POST | `/api/v1/settimeproperties/` | 设置时间选项属性 |
|
||||
|
||||
### Action: `patterns`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addpattern/` | 添加模式 |
|
||||
| POST | `/api/v1/deletepattern/` | 删除模式 |
|
||||
| GET | `/api/v1/getpatternproperties/` | 获取模式属性 |
|
||||
| GET | `/api/v1/getpatterns/` | 获取所有模式 |
|
||||
| GET | `/api/v1/getpatternschema` | 获取模式架构 |
|
||||
| GET | `/api/v1/ispattern/` | 检查模式存在性 |
|
||||
| POST | `/api/v1/setpatternproperties/` | 设置模式属性 |
|
||||
|
||||
### Action: `quality`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addmixing/` | 添加混合 |
|
||||
| POST | `/api/v1/addsource/` | 添加水源 |
|
||||
| POST | `/api/v1/deletemixing/` | 删除混合 |
|
||||
| POST | `/api/v1/deletesource/` | 删除水源 |
|
||||
| GET | `/api/v1/getemitterproperties/` | 获取发射器属性 |
|
||||
| GET | `/api/v1/getemitterschema` | 获取发射器架构 |
|
||||
| GET | `/api/v1/getmixing/` | 获取混合属性 |
|
||||
| GET | `/api/v1/getmixingschema/` | 获取混合架构 |
|
||||
| GET | `/api/v1/getpipereaction/` | 获取管道反应属性 |
|
||||
| GET | `/api/v1/getpipereactionschema/` | 获取管道反应架构 |
|
||||
| GET | `/api/v1/getqualityproperties/` | 获取水质属性 |
|
||||
| GET | `/api/v1/getqualityschema/` | 获取水质架构 |
|
||||
| GET | `/api/v1/getreaction/` | 获取反应属性 |
|
||||
| GET | `/api/v1/getreactionschema/` | 获取反应架构 |
|
||||
| GET | `/api/v1/getsource/` | 获取水源属性 |
|
||||
| GET | `/api/v1/getsourcechema/` | 获取水源架构 |
|
||||
| GET | `/api/v1/gettankreaction/` | 获取水池反应属性 |
|
||||
| GET | `/api/v1/gettankreactionschema/` | 获取水池反应架构 |
|
||||
| POST | `/api/v1/setemitterproperties/` | 设置发射器属性 |
|
||||
| POST | `/api/v1/setmixing/` | 设置混合属性 |
|
||||
| POST | `/api/v1/setpipereaction/` | 设置管道反应属性 |
|
||||
| POST | `/api/v1/setqualityproperties/` | 设置水质属性 |
|
||||
| POST | `/api/v1/setreaction/` | 设置反应属性 |
|
||||
| POST | `/api/v1/setsource/` | 设置水源属性 |
|
||||
| POST | `/api/v1/settankreaction/` | 设置水池反应属性 |
|
||||
|
||||
### Action: `visuals`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addlabel/` | 添加标签 |
|
||||
| POST | `/api/v1/addvertex/` | 添加图形元素 |
|
||||
| POST | `/api/v1/deletelabel/` | 删除标签 |
|
||||
| POST | `/api/v1/deletevertex/` | 删除图形元素 |
|
||||
| GET | `/api/v1/getallvertexlinks/` | 获取所有图形元素链接 |
|
||||
| GET | `/api/v1/getallvertices/` | 获取所有图形元素 |
|
||||
| GET | `/api/v1/getbackdropproperties/` | 获取背景属性 |
|
||||
| GET | `/api/v1/getbackdropschema/` | 获取背景架构 |
|
||||
| GET | `/api/v1/getlabelproperties/` | 获取标签属性 |
|
||||
| GET | `/api/v1/getlabelschema/` | 获取标签架构 |
|
||||
| GET | `/api/v1/getvertexproperties/` | 获取图形元素属性 |
|
||||
| GET | `/api/v1/getvertexschema/` | 获取图形元素架构 |
|
||||
| POST | `/api/v1/setbackdropproperties/` | 设置背景属性 |
|
||||
| POST | `/api/v1/setlabelproperties/` | 设置标签属性 |
|
||||
| POST | `/api/v1/setvertexproperties/` | 设置图形元素属性 |
|
||||
|
||||
## business/identity-access
|
||||
|
||||
### Action: `auth`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/auth/login` | login |
|
||||
| POST | `/api/v1/auth/login/simple` | login_simple |
|
||||
| GET | `/api/v1/auth/me` | get_current_user_info |
|
||||
| POST | `/api/v1/auth/refresh` | refresh_token |
|
||||
| POST | `/api/v1/auth/register` | register |
|
||||
|
||||
### Action: `user_management`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/users/` | 列出所有用户 |
|
||||
| DELETE | `/api/v1/users/{user_id}` | 删除用户 |
|
||||
| GET | `/api/v1/users/{user_id}` | 获取用户详情 |
|
||||
| PUT | `/api/v1/users/{user_id}` | 更新用户信息 |
|
||||
| POST | `/api/v1/users/{user_id}/activate` | 激活用户 |
|
||||
| POST | `/api/v1/users/{user_id}/deactivate` | 停用用户 |
|
||||
|
||||
### Action: `users`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getallusers/` | 获取所有用户 |
|
||||
| GET | `/api/v1/getuser/` | 获取单个用户 |
|
||||
| GET | `/api/v1/getuserschema/` | 获取用户模式 |
|
||||
|
||||
## business/network-assets
|
||||
|
||||
### Action: `demands`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/calculatedemandtonetwork/` | 计算需水量到整网分配 |
|
||||
| GET | `/api/v1/calculatedemandtonodes/` | 计算需水量到节点分配 |
|
||||
| GET | `/api/v1/calculatedemandtoregion/` | 计算需水量到区域分配 |
|
||||
| GET | `/api/v1/getdemandproperties/` | 获取需水量属性 |
|
||||
| GET | `/api/v1/getdemandschema` | 获取需水量属性架构 |
|
||||
| POST | `/api/v1/setdemandproperties/` | 设置需水量属性 |
|
||||
|
||||
### Action: `general`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/deletelink/` | 删除管线 |
|
||||
| POST | `/api/v1/deletenode/` | 删除节点 |
|
||||
| GET | `/api/v1/getallscadaproperties/` | 获取所有SCADA点属性 |
|
||||
| GET | `/api/v1/getelementproperties/` | 获取元素属性 |
|
||||
| GET | `/api/v1/getelementpropertieswithtype/` | 获取指定类型元素属性 |
|
||||
| GET | `/api/v1/getelementtype/` | 获取元素类型 |
|
||||
| GET | `/api/v1/getelementtypevalue/` | 获取元素类型值 |
|
||||
| GET | `/api/v1/getlinkproperties/` | 获取管线属性 |
|
||||
| GET | `/api/v1/getlinks/` | 获取所有管线 |
|
||||
| GET | `/api/v1/getlinktype/` | 获取管线类型 |
|
||||
| GET | `/api/v1/getnodelinks/` | 获取节点的关联管线 |
|
||||
| GET | `/api/v1/getnodeproperties/` | 获取节点属性 |
|
||||
| GET | `/api/v1/getnodes/` | 获取所有节点 |
|
||||
| GET | `/api/v1/getnodetype/` | 获取节点类型 |
|
||||
| GET | `/api/v1/getscadaproperties/` | 获取SCADA点属性 |
|
||||
| GET | `/api/v1/getstatus/` | 获取管线状态 |
|
||||
| GET | `/api/v1/getstatusschema` | 获取状态属性架构 |
|
||||
| GET | `/api/v1/gettitle/` | 获取水网标题属性 |
|
||||
| GET | `/api/v1/gettitleschema/` | 获取标题属性架构 |
|
||||
| GET | `/api/v1/isjunction/` | 检查是否为接点 |
|
||||
| GET | `/api/v1/islink/` | 检查管线有效性 |
|
||||
| GET | `/api/v1/isnode/` | 检查节点有效性 |
|
||||
| GET | `/api/v1/ispipe/` | 检查是否为管道 |
|
||||
| GET | `/api/v1/ispump/` | 检查是否为泵 |
|
||||
| GET | `/api/v1/isreservoir/` | 检查是否为水源 |
|
||||
| GET | `/api/v1/istank/` | 检查是否为蓄水池 |
|
||||
| GET | `/api/v1/isvalve/` | 检查是否为阀门 |
|
||||
| POST | `/api/v1/setstatus/` | 设置管线状态 |
|
||||
| GET | `/api/v1/settitle/` | 设置水网标题属性 |
|
||||
|
||||
### Action: `geometry`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getmajornodecoords/` | 获取主要节点坐标 |
|
||||
| GET | `/api/v1/getmajorpipenodes/` | 获取主要管道节点 |
|
||||
| GET | `/api/v1/getnetworkgeometries/` | 获取完整网络几何信息 |
|
||||
| GET | `/api/v1/getnetworkinextent/` | 获取范围内的网络元素 |
|
||||
| GET | `/api/v1/getnetworklinknodes/` | 获取网络管线节点 |
|
||||
| GET | `/api/v1/getnodecoord/` | 获取节点坐标 |
|
||||
|
||||
### Action: `junctions`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addjunction/` | 添加节点 |
|
||||
| POST | `/api/v1/deletejunction/` | 删除节点 |
|
||||
| GET | `/api/v1/getalljunctionproperties/` | 获取所有节点属性 |
|
||||
| GET | `/api/v1/getjunctioncoord/` | 获取节点坐标 |
|
||||
| GET | `/api/v1/getjunctiondemand/` | 获取节点需水量 |
|
||||
| GET | `/api/v1/getjunctionelevation/` | 获取节点标高 |
|
||||
| GET | `/api/v1/getjunctionpattern/` | 获取节点需水模式 |
|
||||
| GET | `/api/v1/getjunctionproperties/` | 获取节点属性 |
|
||||
| GET | `/api/v1/getjunctionschema` | 获取节点架构 |
|
||||
| GET | `/api/v1/getjunctionx/` | 获取节点 X 坐标 |
|
||||
| GET | `/api/v1/getjunctiony/` | 获取节点 Y 坐标 |
|
||||
| POST | `/api/v1/setjunctioncoord/` | 设置节点坐标 |
|
||||
| POST | `/api/v1/setjunctiondemand/` | 设置节点需水量 |
|
||||
| POST | `/api/v1/setjunctionelevation/` | 设置节点标高 |
|
||||
| POST | `/api/v1/setjunctionpattern/` | 设置节点需水模式 |
|
||||
| POST | `/api/v1/setjunctionproperties/` | 批量设置节点属性 |
|
||||
| POST | `/api/v1/setjunctionx/` | 设置节点 X 坐标 |
|
||||
| POST | `/api/v1/setjunctiony/` | 设置节点 Y 坐标 |
|
||||
|
||||
### Action: `pipes`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addpipe/` | 添加管道 |
|
||||
| POST | `/api/v1/deletepipe/` | 删除管道 |
|
||||
| GET | `/api/v1/getallpipeproperties/` | 获取所有管道属性 |
|
||||
| GET | `/api/v1/getpipediameter/` | 获取管道管径 |
|
||||
| GET | `/api/v1/getpipelength/` | 获取管道长度 |
|
||||
| GET | `/api/v1/getpipeminorloss/` | 获取管道局部阻力系数 |
|
||||
| GET | `/api/v1/getpipenode1/` | 获取管道起始节点 |
|
||||
| GET | `/api/v1/getpipenode2/` | 获取管道终止节点 |
|
||||
| GET | `/api/v1/getpipeproperties/` | 获取管道属性 |
|
||||
| GET | `/api/v1/getpiperoughness/` | 获取管道粗糙度 |
|
||||
| GET | `/api/v1/getpipeschema` | 获取管道模式 |
|
||||
| GET | `/api/v1/getpipestatus/` | 获取管道状态 |
|
||||
| POST | `/api/v1/setpipediameter/` | 设置管道管径 |
|
||||
| POST | `/api/v1/setpipelength/` | 设置管道长度 |
|
||||
| POST | `/api/v1/setpipeminorloss/` | 设置管道局部阻力系数 |
|
||||
| POST | `/api/v1/setpipenode1/` | 设置管道起始节点 |
|
||||
| POST | `/api/v1/setpipenode2/` | 设置管道终止节点 |
|
||||
| POST | `/api/v1/setpipeproperties/` | 设置管道属性 |
|
||||
| POST | `/api/v1/setpiperoughness/` | 设置管道粗糙度 |
|
||||
| POST | `/api/v1/setpipestatus/` | 设置管道状态 |
|
||||
|
||||
### Action: `pumps`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addpump/` | 添加水泵 |
|
||||
| POST | `/api/v1/deletepump/` | 删除水泵 |
|
||||
| GET | `/api/v1/getallpumpproperties/` | 获取所有水泵属性 |
|
||||
| GET | `/api/v1/getpumpnode1/` | 获取水泵起始节点 |
|
||||
| GET | `/api/v1/getpumpnode2/` | 获取水泵终止节点 |
|
||||
| GET | `/api/v1/getpumpproperties/` | 获取水泵属性 |
|
||||
| GET | `/api/v1/getpumpschema` | 获取水泵模式 |
|
||||
| POST | `/api/v1/setpumpnode1/` | 设置水泵起始节点 |
|
||||
| POST | `/api/v1/setpumpnode2/` | 设置水泵终止节点 |
|
||||
| POST | `/api/v1/setpumpproperties/` | 设置水泵属性 |
|
||||
|
||||
### Action: `regions`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/adddistrictmeteringarea/` | 添加新DMA |
|
||||
| POST | `/api/v1/addregion/` | 添加新区域 |
|
||||
| POST | `/api/v1/addservicearea/` | 添加新服务区 |
|
||||
| POST | `/api/v1/addvirtualdistrict/` | 添加新虚拟分区 |
|
||||
| GET | `/api/v1/calculatedistrictmeteringarea/` | 计算DMA分区 |
|
||||
| GET | `/api/v1/calculatedistrictmeteringareafornetwork/` | 计算整网DMA分区 |
|
||||
| GET | `/api/v1/calculatedistrictmeteringareafornodes/` | 计算节点DMA分区 |
|
||||
| GET | `/api/v1/calculatedistrictmeteringareaforregion/` | 计算区域内DMA分区 |
|
||||
| GET | `/api/v1/calculateregion/` | 计算区域 |
|
||||
| GET | `/api/v1/calculateservicearea/` | 计算服务区 |
|
||||
| GET | `/api/v1/calculatevirtualdistrict/` | 计算虚拟分区 |
|
||||
| POST | `/api/v1/deletedistrictmeteringarea/` | 删除DMA |
|
||||
| POST | `/api/v1/deleteregion/` | 删除区域 |
|
||||
| POST | `/api/v1/deleteservicearea/` | 删除服务区 |
|
||||
| POST | `/api/v1/deletevirtualdistrict/` | 删除虚拟分区 |
|
||||
| POST | `/api/v1/generatedistrictmeteringarea/` | 生成DMA分区 |
|
||||
| POST | `/api/v1/generateregion/` | 生成区域分区 |
|
||||
| POST | `/api/v1/generateservicearea/` | 生成服务区分区 |
|
||||
| POST | `/api/v1/generatesubdistrictmeteringarea/` | 生成DMA子分区 |
|
||||
| POST | `/api/v1/generatevirtualdistrict/` | 生成虚拟分区 |
|
||||
| GET | `/api/v1/getalldistrictmeteringareaids/` | 获取所有DMA ID |
|
||||
| GET | `/api/v1/getalldistrictmeteringareas/` | 获取所有DMA |
|
||||
| GET | `/api/v1/getallregions/` | 获取所有区域 |
|
||||
| GET | `/api/v1/getallserviceareas/` | 获取所有服务区 |
|
||||
| GET | `/api/v1/getallvirtualdistrict/` | 获取所有虚拟分区 |
|
||||
| GET | `/api/v1/getdistrictmeteringarea/` | 获取DMA信息 |
|
||||
| GET | `/api/v1/getdistrictmeteringareaschema/` | 获取DMA属性架构 |
|
||||
| GET | `/api/v1/getregion/` | 获取区域信息 |
|
||||
| GET | `/api/v1/getregionschema/` | 获取区域属性架构 |
|
||||
| GET | `/api/v1/getservicearea/` | 获取服务区信息 |
|
||||
| GET | `/api/v1/getserviceareaschema/` | 获取服务区属性架构 |
|
||||
| GET | `/api/v1/getvirtualdistrict/` | 获取虚拟分区信息 |
|
||||
| GET | `/api/v1/getvirtualdistrictschema/` | 获取虚拟分区属性架构 |
|
||||
| POST | `/api/v1/setdistrictmeteringarea/` | 设置DMA属性 |
|
||||
| POST | `/api/v1/setregion/` | 设置区域属性 |
|
||||
| POST | `/api/v1/setservicearea/` | 设置服务区属性 |
|
||||
| POST | `/api/v1/setvirtualdistrict/` | 设置虚拟分区属性 |
|
||||
|
||||
### Action: `reservoirs`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addreservoir/` | 添加水库 |
|
||||
| POST | `/api/v1/deletereservoir/` | 删除水库 |
|
||||
| GET | `/api/v1/getallreservoirproperties/` | 获取所有水库属性 |
|
||||
| GET | `/api/v1/getreservoircoord/` | 获取水库坐标 |
|
||||
| GET | `/api/v1/getreservoirhead/` | 获取水库水头 |
|
||||
| GET | `/api/v1/getreservoirpattern/` | 获取水库模式 |
|
||||
| GET | `/api/v1/getreservoirproperties/` | 获取水库属性 |
|
||||
| GET | `/api/v1/getreservoirschema` | 获取水库模式 |
|
||||
| GET | `/api/v1/getreservoirx/` | 获取水库X坐标 |
|
||||
| GET | `/api/v1/getreservoiry/` | 获取水库Y坐标 |
|
||||
| POST | `/api/v1/setreservoircoord/` | 设置水库坐标 |
|
||||
| POST | `/api/v1/setreservoirhead/` | 设置水库水头 |
|
||||
| POST | `/api/v1/setreservoirpattern/` | 设置水库模式 |
|
||||
| POST | `/api/v1/setreservoirproperties/` | 设置水库属性 |
|
||||
| POST | `/api/v1/setreservoirx/` | 设置水库X坐标 |
|
||||
| POST | `/api/v1/setreservoiry/` | 设置水库Y坐标 |
|
||||
|
||||
### Action: `tags`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/gettag/` | 获取标签信息 |
|
||||
| GET | `/api/v1/gettags/` | 获取所有标签 |
|
||||
| GET | `/api/v1/gettagschema/` | 获取标签属性架构 |
|
||||
| POST | `/api/v1/settag/` | 设置标签 |
|
||||
|
||||
### Action: `tanks`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addtank/` | 新增水箱 |
|
||||
| POST | `/api/v1/deletetank/` | 删除水箱 |
|
||||
| GET | `/api/v1/getalltankproperties/` | 获取所有水箱属性 |
|
||||
| GET | `/api/v1/gettankcoord/` | 获取水箱坐标 |
|
||||
| GET | `/api/v1/gettankdiameter/` | 获取水箱直径 |
|
||||
| GET | `/api/v1/gettankelevation/` | 获取水箱标高 |
|
||||
| GET | `/api/v1/gettankinitlevel/` | 获取水箱初始水位 |
|
||||
| GET | `/api/v1/gettankmaxlevel/` | 获取水箱最大水位 |
|
||||
| GET | `/api/v1/gettankminlevel/` | 获取水箱最小水位 |
|
||||
| GET | `/api/v1/gettankminvol/` | 获取水箱最小体积 |
|
||||
| GET | `/api/v1/gettankoverflow/` | 获取水箱溢流口 |
|
||||
| GET | `/api/v1/gettankproperties/` | 获取水箱属性 |
|
||||
| GET | `/api/v1/gettankschema` | 获取水箱模式 |
|
||||
| GET | `/api/v1/gettankvolcurve/` | 获取水箱容积曲线 |
|
||||
| GET | `/api/v1/gettankx/` | 获取水箱X坐标 |
|
||||
| GET | `/api/v1/gettanky/` | 获取水箱Y坐标 |
|
||||
| POST | `/api/v1/settankcoord/` | 设置水箱坐标 |
|
||||
| POST | `/api/v1/settankdiameter/` | 设置水箱直径 |
|
||||
| POST | `/api/v1/settankelevation/` | 设置水箱标高 |
|
||||
| POST | `/api/v1/settankinitlevel/` | 设置水箱初始水位 |
|
||||
| POST | `/api/v1/settankmaxlevel/` | 设置水箱最大水位 |
|
||||
| POST | `/api/v1/settankminlevel/` | 设置水箱最小水位 |
|
||||
| POST | `/api/v1/settankminvol/` | 设置水箱最小体积 |
|
||||
| POST | `/api/v1/settankoverflow/` | 设置水箱溢流口 |
|
||||
| POST | `/api/v1/settankproperties/` | 设置水箱属性 |
|
||||
| POST | `/api/v1/settankvolcurve/` | 设置水箱容积曲线 |
|
||||
| POST | `/api/v1/settankx/` | 设置水箱X坐标 |
|
||||
| POST | `/api/v1/settanky/` | 设置水箱Y坐标 |
|
||||
|
||||
### Action: `valves`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/addvalve/` | 添加阀门 |
|
||||
| POST | `/api/v1/deletevalve/` | 删除阀门 |
|
||||
| GET | `/api/v1/getallvalveproperties/` | 获取所有阀门属性 |
|
||||
| GET | `/api/v1/getvalvediameter/` | 获取阀门直径 |
|
||||
| GET | `/api/v1/getvalveminorloss/` | 获取阀门损失系数 |
|
||||
| GET | `/api/v1/getvalvenode1/` | 获取阀门起点节点 |
|
||||
| GET | `/api/v1/getvalvenode2/` | 获取阀门终点节点 |
|
||||
| GET | `/api/v1/getvalveproperties/` | 获取阀门所有属性 |
|
||||
| GET | `/api/v1/getvalveschema` | 获取阀门架构 |
|
||||
| GET | `/api/v1/getvalvesetting/` | 获取阀门开度 |
|
||||
| GET | `/api/v1/getvalvetype/` | 获取阀门类型 |
|
||||
| POST | `/api/v1/setvalvenode1/` | 设置阀门起点节点 |
|
||||
| POST | `/api/v1/setvalvenode2/` | 设置阀门终点节点 |
|
||||
| POST | `/api/v1/setvalvenodediameter/` | 设置阀门直径 |
|
||||
| POST | `/api/v1/setvalveproperties/` | 批量设置阀门属性 |
|
||||
| POST | `/api/v1/setvalvesetting/` | 设置阀门开度 |
|
||||
| POST | `/api/v1/setvalvetype/` | 设置阀门类型 |
|
||||
|
||||
## business/project-workspace
|
||||
|
||||
### Action: `extension`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getallextensiondata/` | 获取所有扩展数据 |
|
||||
| GET | `/api/v1/getallextensiondatakeys/` | 获取所有扩展数据键 |
|
||||
| GET | `/api/v1/getextensiondata/` | 获取指定扩展数据 |
|
||||
| POST | `/api/v1/setextensiondata/` | 设置扩展数据 |
|
||||
|
||||
### Action: `misc`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getallburstlocateresults/` | 获取所有爆管定位结果 |
|
||||
| GET | `/api/v1/getallsensorplacements/` | 获取所有传感器位置 |
|
||||
| GET | `/api/v1/getjson/` | 获取JSON示例 |
|
||||
| GET | `/api/v1/getrealtimedata/` | 获取实时数据 |
|
||||
| GET | `/api/v1/getsimulationresult/` | 获取模拟结果 |
|
||||
| POST | `/api/v1/test_dict/` | 测试字典处理 |
|
||||
|
||||
### Action: `project`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/closeproject/` | 关闭项目 |
|
||||
| GET | `/api/v1/convertv3tov2/` | 转换 INP V3 为 V2 |
|
||||
| GET | `/api/v1/convertv3tov2/` | 转换 INP V3 为 V2 |
|
||||
| POST | `/api/v1/copyproject/` | 复制项目 |
|
||||
| POST | `/api/v1/createproject/` | 创建新项目 |
|
||||
| POST | `/api/v1/deleteproject/` | 删除项目 |
|
||||
| GET | `/api/v1/downloadinp/` | 下载 INP 文件 |
|
||||
| GET | `/api/v1/downloadinp/` | 下载 INP 文件 |
|
||||
| GET | `/api/v1/dumpinp/` | 导出项目到 INP 文件 |
|
||||
| GET | `/api/v1/dumpinp/` | 导出项目到 INP 文件 |
|
||||
| GET | `/api/v1/exportinp/` | 导出项目为 ChangeSet |
|
||||
| GET | `/api/v1/haveproject/` | 检查项目是否存在 |
|
||||
| POST | `/api/v1/importinp/` | 导入 INP 文件内容 |
|
||||
| GET | `/api/v1/isprojectlocked/` | 检查项目是否被锁定 |
|
||||
| GET | `/api/v1/isprojectlocked/` | 检查项目是否被锁定 |
|
||||
| GET | `/api/v1/isprojectlockedbyme/` | 检查项目是否被当前用户锁定 |
|
||||
| GET | `/api/v1/isprojectlockedbyme/` | 检查项目是否被当前用户锁定 |
|
||||
| GET | `/api/v1/isprojectopen/` | 检查项目是否已打开 |
|
||||
| GET | `/api/v1/listprojects/` | 获取项目列表 |
|
||||
| POST | `/api/v1/lockproject/` | 锁定项目 |
|
||||
| POST | `/api/v1/lockproject/` | 锁定项目 |
|
||||
| POST | `/api/v1/openproject/` | 打开项目 |
|
||||
| GET | `/api/v1/project_info/` | 获取项目信息 |
|
||||
| POST | `/api/v1/readinp/` | 读取 INP 文件到项目 |
|
||||
| POST | `/api/v1/readinp/` | 读取 INP 文件到项目 |
|
||||
| POST | `/api/v1/unlockproject/` | 解锁项目 |
|
||||
| POST | `/api/v1/unlockproject/` | 解锁项目 |
|
||||
| POST | `/api/v1/uploadinp/` | 上传 INP 文件 |
|
||||
| POST | `/api/v1/uploadinp/` | 上传 INP 文件 |
|
||||
|
||||
### Action: `project_data`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/burst-locate-result` | 获取爆管定位结果 |
|
||||
| GET | `/api/v1/burst-locate-result/{burst_incident}` | 按事件查询爆管定位结果 |
|
||||
| GET | `/api/v1/scada-info` | 获取SCADA信息 |
|
||||
| GET | `/api/v1/scheme-list` | 获取方案列表 |
|
||||
|
||||
### Action: `schemes`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/getallschemes/` | 获取所有方案 |
|
||||
| GET | `/api/v1/getscheme/` | 获取单个方案 |
|
||||
| GET | `/api/v1/getschemeschema/` | 获取方案模式 |
|
||||
|
||||
### Action: `snapshots`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/batch/` | 执行批量命令 |
|
||||
| POST | `/api/v1/compressedbatch/` | 执行压缩批量命令 |
|
||||
| GET | `/api/v1/getcurrentoperationid/` | 获取当前操作ID |
|
||||
| GET | `/api/v1/getrestoreoperation/` | 获取恢复操作ID |
|
||||
| GET | `/api/v1/getsnapshots/` | 获取快照列表 |
|
||||
| GET | `/api/v1/havesnapshot/` | 检查快照是否存在 |
|
||||
| GET | `/api/v1/havesnapshotforcurrentoperation/` | 检查当前操作快照是否存在 |
|
||||
| GET | `/api/v1/havesnapshotforoperation/` | 检查操作快照是否存在 |
|
||||
| POST | `/api/v1/pickoperation/` | 选择操作 |
|
||||
| POST | `/api/v1/picksnapshot/` | 选择快照 |
|
||||
| POST | `/api/v1/redo/` | 重做操作 |
|
||||
| POST | `/api/v1/setrestoreoperation/` | 设置恢复操作ID |
|
||||
| GET | `/api/v1/syncwithserver/` | 与服务器同步 |
|
||||
| POST | `/api/v1/takenapshotforcurrentoperation` | 为当前操作创建快照(兼容模式) |
|
||||
| POST | `/api/v1/takesnapshot/` | 创建快照 |
|
||||
| POST | `/api/v1/takesnapshotforcurrentoperation` | 为当前操作创建快照 |
|
||||
| POST | `/api/v1/takesnapshotforoperation/` | 为操作创建快照 |
|
||||
| POST | `/api/v1/undo/` | 撤销操作 |
|
||||
|
||||
## data/timeseries-access
|
||||
|
||||
### Action: `composite`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/composite/clean-scada` | 清洗SCADA监测数据 |
|
||||
| GET | `/api/v1/composite/element-scada` | 获取管网元素关联的SCADA监测数据 |
|
||||
| GET | `/api/v1/composite/element-simulation` | 获取管网元素的模拟数据 |
|
||||
| GET | `/api/v1/composite/pipeline-health-prediction` | 预测管道健康状况 |
|
||||
| GET | `/api/v1/composite/scada-simulation` | 获取SCADA关联的模拟数据 |
|
||||
|
||||
### Action: `realtime`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| DELETE | `/api/v1/realtime/links` | 删除实时管道数据 |
|
||||
| GET | `/api/v1/realtime/links` | 查询实时管道数据 |
|
||||
| POST | `/api/v1/realtime/links/batch` | 批量插入实时管道数据 |
|
||||
| PATCH | `/api/v1/realtime/links/{link_id}/field` | 更新实时管道字段 |
|
||||
| DELETE | `/api/v1/realtime/nodes` | 删除实时节点数据 |
|
||||
| GET | `/api/v1/realtime/nodes` | 查询实时节点数据 |
|
||||
| POST | `/api/v1/realtime/nodes/batch` | 批量插入实时节点数据 |
|
||||
| GET | `/api/v1/realtime/query/by-id-time` | 按ID和时间查询实时模拟数据 |
|
||||
| GET | `/api/v1/realtime/query/by-time-property` | 按时间和属性查询实时数据 |
|
||||
| POST | `/api/v1/realtime/simulation/store` | 存储实时模拟结果 |
|
||||
|
||||
### Action: `scheme`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| DELETE | `/api/v1/scheme/links` | 删除方案管道数据 |
|
||||
| GET | `/api/v1/scheme/links` | 查询方案管道数据 |
|
||||
| POST | `/api/v1/scheme/links/batch` | 批量插入方案管道数据 |
|
||||
| GET | `/api/v1/scheme/links/{link_id}/field` | 查询方案管道字段数据 |
|
||||
| PATCH | `/api/v1/scheme/links/{link_id}/field` | 更新方案管道字段 |
|
||||
| DELETE | `/api/v1/scheme/nodes` | 删除方案节点数据 |
|
||||
| POST | `/api/v1/scheme/nodes/batch` | 批量插入方案节点数据 |
|
||||
| GET | `/api/v1/scheme/nodes/{node_id}/field` | 查询方案节点字段数据 |
|
||||
| PATCH | `/api/v1/scheme/nodes/{node_id}/field` | 更新方案节点字段 |
|
||||
| GET | `/api/v1/scheme/query/by-id-time` | 按ID和时间查询方案模拟数据 |
|
||||
| GET | `/api/v1/scheme/query/by-scheme-time-property` | 按方案、时间和属性查询数据 |
|
||||
| POST | `/api/v1/scheme/simulation/store` | 存储方案模拟结果 |
|
||||
|
||||
## platform/governance-observability
|
||||
|
||||
### Action: `audit`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/audit/logs` | 查询审计日志 |
|
||||
| GET | `/api/v1/audit/logs/count` | 获取审计日志总数 |
|
||||
| GET | `/api/v1/audit/logs/my` | 查询我的审计日志 |
|
||||
|
||||
### Action: `cache`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| POST | `/api/v1/clearallredis/` | 清除所有缓存 |
|
||||
| POST | `/api/v1/clearrediskey/` | 清除单个缓存键 |
|
||||
| POST | `/api/v1/clearrediskeys/` | 清除匹配的缓存键 |
|
||||
| GET | `/api/v1/queryredis/` | 查询缓存键列表 |
|
||||
|
||||
### Action: `meta`
|
||||
|
||||
| Method | Path | Summary |
|
||||
|---|---|---|
|
||||
| GET | `/api/v1/meta/db/health` | 检查数据库健康状态 |
|
||||
| GET | `/api/v1/meta/project` | 获取项目元数据 |
|
||||
| GET | `/api/v1/meta/projects` | 列出用户项目 |
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config
|
||||
description: 组件参数、控制规则、水质和可视化接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **business/component-config** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `controls`: `controls/SKILL.md`
|
||||
- `curves`: `curves/SKILL.md`
|
||||
- `options`: `options/SKILL.md`
|
||||
- `patterns`: `patterns/SKILL.md`
|
||||
- `quality`: `quality/SKILL.md`
|
||||
- `visuals`: `visuals/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `controls`
|
||||
- 详情技能:`controls/SKILL.md`
|
||||
- `GET /api/v1/getcontrolproperties/` - 获取控制属性
|
||||
- `GET /api/v1/getcontrolschema/` - 获取控制架构
|
||||
- `GET /api/v1/getruleproperties/` - 获取规则属性
|
||||
- `GET /api/v1/getruleschema/` - 获取规则架构
|
||||
- `POST /api/v1/setcontrolproperties/` - 设置控制属性
|
||||
- `POST /api/v1/setruleproperties/` - 设置规则属性
|
||||
|
||||
## Action: `curves`
|
||||
- 详情技能:`curves/SKILL.md`
|
||||
- `POST /api/v1/addcurve/` - 添加曲线
|
||||
- `POST /api/v1/deletecurve/` - 删除曲线
|
||||
- `GET /api/v1/getcurveproperties/` - 获取曲线属性
|
||||
- `GET /api/v1/getcurves/` - 获取所有曲线
|
||||
- `GET /api/v1/getcurveschema` - 获取曲线架构
|
||||
- `GET /api/v1/iscurve/` - 检查曲线存在性
|
||||
- `POST /api/v1/setcurveproperties/` - 设置曲线属性
|
||||
|
||||
## Action: `options`
|
||||
- 详情技能:`options/SKILL.md`
|
||||
- `GET /api/v1/getenergyproperties/` - 获取能耗选项属性
|
||||
- `GET /api/v1/getenergyschema/` - 获取能耗选项架构
|
||||
- `GET /api/v1/getoptionproperties/` - 获取选项属性
|
||||
- `GET /api/v1/getoptionschema/` - 获取选项架构
|
||||
- `GET /api/v1/getpumpenergyproperties/` - 获取泵能耗属性
|
||||
- `GET /api/v1/getpumpenergyschema/` - 获取泵能耗选项架构
|
||||
- `GET /api/v1/gettimeproperties/` - 获取时间选项属性
|
||||
- `GET /api/v1/gettimeschema` - 获取时间选项架构
|
||||
- `POST /api/v1/setenergyproperties/` - 设置能耗选项属性
|
||||
- `POST /api/v1/setoptionproperties/` - 设置选项属性
|
||||
- `GET /api/v1/setpumpenergyproperties/` - 设置泵能耗属性
|
||||
- `POST /api/v1/settimeproperties/` - 设置时间选项属性
|
||||
|
||||
## Action: `patterns`
|
||||
- 详情技能:`patterns/SKILL.md`
|
||||
- `POST /api/v1/addpattern/` - 添加模式
|
||||
- `POST /api/v1/deletepattern/` - 删除模式
|
||||
- `GET /api/v1/getpatternproperties/` - 获取模式属性
|
||||
- `GET /api/v1/getpatterns/` - 获取所有模式
|
||||
- `GET /api/v1/getpatternschema` - 获取模式架构
|
||||
- `GET /api/v1/ispattern/` - 检查模式存在性
|
||||
- `POST /api/v1/setpatternproperties/` - 设置模式属性
|
||||
|
||||
## Action: `quality`
|
||||
- 详情技能:`quality/SKILL.md`
|
||||
- `POST /api/v1/addmixing/` - 添加混合
|
||||
- `POST /api/v1/addsource/` - 添加水源
|
||||
- `POST /api/v1/deletemixing/` - 删除混合
|
||||
- `POST /api/v1/deletesource/` - 删除水源
|
||||
- `GET /api/v1/getemitterproperties/` - 获取发射器属性
|
||||
- `GET /api/v1/getemitterschema` - 获取发射器架构
|
||||
- `GET /api/v1/getmixing/` - 获取混合属性
|
||||
- `GET /api/v1/getmixingschema/` - 获取混合架构
|
||||
- `GET /api/v1/getpipereaction/` - 获取管道反应属性
|
||||
- `GET /api/v1/getpipereactionschema/` - 获取管道反应架构
|
||||
- `GET /api/v1/getqualityproperties/` - 获取水质属性
|
||||
- `GET /api/v1/getqualityschema/` - 获取水质架构
|
||||
- `GET /api/v1/getreaction/` - 获取反应属性
|
||||
- `GET /api/v1/getreactionschema/` - 获取反应架构
|
||||
- `GET /api/v1/getsource/` - 获取水源属性
|
||||
- `GET /api/v1/getsourcechema/` - 获取水源架构
|
||||
- `GET /api/v1/gettankreaction/` - 获取水池反应属性
|
||||
- `GET /api/v1/gettankreactionschema/` - 获取水池反应架构
|
||||
- `POST /api/v1/setemitterproperties/` - 设置发射器属性
|
||||
- `POST /api/v1/setmixing/` - 设置混合属性
|
||||
- `POST /api/v1/setpipereaction/` - 设置管道反应属性
|
||||
- `POST /api/v1/setqualityproperties/` - 设置水质属性
|
||||
- `POST /api/v1/setreaction/` - 设置反应属性
|
||||
- `POST /api/v1/setsource/` - 设置水源属性
|
||||
- `POST /api/v1/settankreaction/` - 设置水池反应属性
|
||||
|
||||
## Action: `visuals`
|
||||
- 详情技能:`visuals/SKILL.md`
|
||||
- `POST /api/v1/addlabel/` - 添加标签
|
||||
- `POST /api/v1/addvertex/` - 添加图形元素
|
||||
- `POST /api/v1/deletelabel/` - 删除标签
|
||||
- `POST /api/v1/deletevertex/` - 删除图形元素
|
||||
- `GET /api/v1/getallvertexlinks/` - 获取所有图形元素链接
|
||||
- `GET /api/v1/getallvertices/` - 获取所有图形元素
|
||||
- `GET /api/v1/getbackdropproperties/` - 获取背景属性
|
||||
- `GET /api/v1/getbackdropschema/` - 获取背景架构
|
||||
- `GET /api/v1/getlabelproperties/` - 获取标签属性
|
||||
- `GET /api/v1/getlabelschema/` - 获取标签架构
|
||||
- `GET /api/v1/getvertexproperties/` - 获取图形元素属性
|
||||
- `GET /api/v1/getvertexschema/` - 获取图形元素架构
|
||||
- `POST /api/v1/setbackdropproperties/` - 设置背景属性
|
||||
- `POST /api/v1/setlabelproperties/` - 设置标签属性
|
||||
- `POST /api/v1/setvertexproperties/` - 设置图形元素属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config-controls
|
||||
description: business/component-config 场景下 controls 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **controls** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getcontrolproperties/` - 获取控制属性
|
||||
- `GET /api/v1/getcontrolschema/` - 获取控制架构
|
||||
- `GET /api/v1/getruleproperties/` - 获取规则属性
|
||||
- `GET /api/v1/getruleschema/` - 获取规则架构
|
||||
- `POST /api/v1/setcontrolproperties/` - 设置控制属性
|
||||
- `POST /api/v1/setruleproperties/` - 设置规则属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config-curves
|
||||
description: business/component-config 场景下 curves 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **curves** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addcurve/` - 添加曲线
|
||||
- `POST /api/v1/deletecurve/` - 删除曲线
|
||||
- `GET /api/v1/getcurveproperties/` - 获取曲线属性
|
||||
- `GET /api/v1/getcurves/` - 获取所有曲线
|
||||
- `GET /api/v1/getcurveschema` - 获取曲线架构
|
||||
- `GET /api/v1/iscurve/` - 检查曲线存在性
|
||||
- `POST /api/v1/setcurveproperties/` - 设置曲线属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config-options
|
||||
description: business/component-config 场景下 options 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **options** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getenergyproperties/` - 获取能耗选项属性
|
||||
- `GET /api/v1/getenergyschema/` - 获取能耗选项架构
|
||||
- `GET /api/v1/getoptionproperties/` - 获取选项属性
|
||||
- `GET /api/v1/getoptionschema/` - 获取选项架构
|
||||
- `GET /api/v1/getpumpenergyproperties/` - 获取泵能耗属性
|
||||
- `GET /api/v1/getpumpenergyschema/` - 获取泵能耗选项架构
|
||||
- `GET /api/v1/gettimeproperties/` - 获取时间选项属性
|
||||
- `GET /api/v1/gettimeschema` - 获取时间选项架构
|
||||
- `POST /api/v1/setenergyproperties/` - 设置能耗选项属性
|
||||
- `POST /api/v1/setoptionproperties/` - 设置选项属性
|
||||
- `GET /api/v1/setpumpenergyproperties/` - 设置泵能耗属性
|
||||
- `POST /api/v1/settimeproperties/` - 设置时间选项属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config-patterns
|
||||
description: business/component-config 场景下 patterns 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **patterns** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addpattern/` - 添加模式
|
||||
- `POST /api/v1/deletepattern/` - 删除模式
|
||||
- `GET /api/v1/getpatternproperties/` - 获取模式属性
|
||||
- `GET /api/v1/getpatterns/` - 获取所有模式
|
||||
- `GET /api/v1/getpatternschema` - 获取模式架构
|
||||
- `GET /api/v1/ispattern/` - 检查模式存在性
|
||||
- `POST /api/v1/setpatternproperties/` - 设置模式属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config-quality
|
||||
description: business/component-config 场景下 quality 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **quality** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addmixing/` - 添加混合
|
||||
- `POST /api/v1/addsource/` - 添加水源
|
||||
- `POST /api/v1/deletemixing/` - 删除混合
|
||||
- `POST /api/v1/deletesource/` - 删除水源
|
||||
- `GET /api/v1/getemitterproperties/` - 获取发射器属性
|
||||
- `GET /api/v1/getemitterschema` - 获取发射器架构
|
||||
- `GET /api/v1/getmixing/` - 获取混合属性
|
||||
- `GET /api/v1/getmixingschema/` - 获取混合架构
|
||||
- `GET /api/v1/getpipereaction/` - 获取管道反应属性
|
||||
- `GET /api/v1/getpipereactionschema/` - 获取管道反应架构
|
||||
- `GET /api/v1/getqualityproperties/` - 获取水质属性
|
||||
- `GET /api/v1/getqualityschema/` - 获取水质架构
|
||||
- `GET /api/v1/getreaction/` - 获取反应属性
|
||||
- `GET /api/v1/getreactionschema/` - 获取反应架构
|
||||
- `GET /api/v1/getsource/` - 获取水源属性
|
||||
- `GET /api/v1/getsourcechema/` - 获取水源架构
|
||||
- `GET /api/v1/gettankreaction/` - 获取水池反应属性
|
||||
- `GET /api/v1/gettankreactionschema/` - 获取水池反应架构
|
||||
- `POST /api/v1/setemitterproperties/` - 设置发射器属性
|
||||
- `POST /api/v1/setmixing/` - 设置混合属性
|
||||
- `POST /api/v1/setpipereaction/` - 设置管道反应属性
|
||||
- `POST /api/v1/setqualityproperties/` - 设置水质属性
|
||||
- `POST /api/v1/setreaction/` - 设置反应属性
|
||||
- `POST /api/v1/setsource/` - 设置水源属性
|
||||
- `POST /api/v1/settankreaction/` - 设置水池反应属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-component-config-visuals
|
||||
description: business/component-config 场景下 visuals 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **visuals** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addlabel/` - 添加标签
|
||||
- `POST /api/v1/addvertex/` - 添加图形元素
|
||||
- `POST /api/v1/deletelabel/` - 删除标签
|
||||
- `POST /api/v1/deletevertex/` - 删除图形元素
|
||||
- `GET /api/v1/getallvertexlinks/` - 获取所有图形元素链接
|
||||
- `GET /api/v1/getallvertices/` - 获取所有图形元素
|
||||
- `GET /api/v1/getbackdropproperties/` - 获取背景属性
|
||||
- `GET /api/v1/getbackdropschema/` - 获取背景架构
|
||||
- `GET /api/v1/getlabelproperties/` - 获取标签属性
|
||||
- `GET /api/v1/getlabelschema/` - 获取标签架构
|
||||
- `GET /api/v1/getvertexproperties/` - 获取图形元素属性
|
||||
- `GET /api/v1/getvertexschema/` - 获取图形元素架构
|
||||
- `POST /api/v1/setbackdropproperties/` - 设置背景属性
|
||||
- `POST /api/v1/setlabelproperties/` - 设置标签属性
|
||||
- `POST /api/v1/setvertexproperties/` - 设置图形元素属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-identity-access
|
||||
description: 认证、授权与用户管理接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **business/identity-access** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`DELETE`, `GET`, `POST`, `PUT`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `auth`: `auth/SKILL.md`
|
||||
- `user_management`: `user_management/SKILL.md`
|
||||
- `users`: `users/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `auth`
|
||||
- 详情技能:`auth/SKILL.md`
|
||||
- `POST /api/v1/auth/login` - login
|
||||
- `POST /api/v1/auth/login/simple` - login_simple
|
||||
- `GET /api/v1/auth/me` - get_current_user_info
|
||||
- `POST /api/v1/auth/refresh` - refresh_token
|
||||
- `POST /api/v1/auth/register` - register
|
||||
|
||||
## Action: `user_management`
|
||||
- 详情技能:`user_management/SKILL.md`
|
||||
- `GET /api/v1/users/` - 列出所有用户
|
||||
- `DELETE /api/v1/users/{user_id}` - 删除用户
|
||||
- `GET /api/v1/users/{user_id}` - 获取用户详情
|
||||
- `PUT /api/v1/users/{user_id}` - 更新用户信息
|
||||
- `POST /api/v1/users/{user_id}/activate` - 激活用户
|
||||
- `POST /api/v1/users/{user_id}/deactivate` - 停用用户
|
||||
|
||||
## Action: `users`
|
||||
- 详情技能:`users/SKILL.md`
|
||||
- `GET /api/v1/getallusers/` - 获取所有用户
|
||||
- `GET /api/v1/getuser/` - 获取单个用户
|
||||
- `GET /api/v1/getuserschema/` - 获取用户模式
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
- 关联项目空间: `../project-workspace`
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-identity-access-auth
|
||||
description: business/identity-access 场景下 auth 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **auth** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/auth/login` - login
|
||||
- `POST /api/v1/auth/login/simple` - login_simple
|
||||
- `GET /api/v1/auth/me` - get_current_user_info
|
||||
- `POST /api/v1/auth/refresh` - refresh_token
|
||||
- `POST /api/v1/auth/register` - register
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
- 关联项目空间: `../project-workspace`
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-identity-access-user_management
|
||||
description: business/identity-access 场景下 user_management 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **user_management** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`DELETE`, `GET`, `POST`, `PUT`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/users/` - 列出所有用户
|
||||
- `DELETE /api/v1/users/{user_id}` - 删除用户
|
||||
- `GET /api/v1/users/{user_id}` - 获取用户详情
|
||||
- `PUT /api/v1/users/{user_id}` - 更新用户信息
|
||||
- `POST /api/v1/users/{user_id}/activate` - 激活用户
|
||||
- `POST /api/v1/users/{user_id}/deactivate` - 停用用户
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
- 关联项目空间: `../project-workspace`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-identity-access-users
|
||||
description: business/identity-access 场景下 users 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **users** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getallusers/` - 获取所有用户
|
||||
- `GET /api/v1/getuser/` - 获取单个用户
|
||||
- `GET /api/v1/getuserschema/` - 获取用户模式
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联平台治理: `../../platform/governance-observability`
|
||||
- 关联项目空间: `../project-workspace`
|
||||
@@ -1,260 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets
|
||||
description: 网络资产(节点/管段/设备)与空间拓扑接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **business/network-assets** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `demands`: `demands/SKILL.md`
|
||||
- `general`: `general/SKILL.md`
|
||||
- `geometry`: `geometry/SKILL.md`
|
||||
- `junctions`: `junctions/SKILL.md`
|
||||
- `pipes`: `pipes/SKILL.md`
|
||||
- `pumps`: `pumps/SKILL.md`
|
||||
- `regions`: `regions/SKILL.md`
|
||||
- `reservoirs`: `reservoirs/SKILL.md`
|
||||
- `tags`: `tags/SKILL.md`
|
||||
- `tanks`: `tanks/SKILL.md`
|
||||
- `valves`: `valves/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `demands`
|
||||
- 详情技能:`demands/SKILL.md`
|
||||
- `GET /api/v1/calculatedemandtonetwork/` - 计算需水量到整网分配
|
||||
- `GET /api/v1/calculatedemandtonodes/` - 计算需水量到节点分配
|
||||
- `GET /api/v1/calculatedemandtoregion/` - 计算需水量到区域分配
|
||||
- `GET /api/v1/getdemandproperties/` - 获取需水量属性
|
||||
- `GET /api/v1/getdemandschema` - 获取需水量属性架构
|
||||
- `POST /api/v1/setdemandproperties/` - 设置需水量属性
|
||||
|
||||
## Action: `general`
|
||||
- 详情技能:`general/SKILL.md`
|
||||
- `POST /api/v1/deletelink/` - 删除管线
|
||||
- `POST /api/v1/deletenode/` - 删除节点
|
||||
- `GET /api/v1/getallscadaproperties/` - 获取所有SCADA点属性
|
||||
- `GET /api/v1/getelementproperties/` - 获取元素属性
|
||||
- `GET /api/v1/getelementpropertieswithtype/` - 获取指定类型元素属性
|
||||
- `GET /api/v1/getelementtype/` - 获取元素类型
|
||||
- `GET /api/v1/getelementtypevalue/` - 获取元素类型值
|
||||
- `GET /api/v1/getlinkproperties/` - 获取管线属性
|
||||
- `GET /api/v1/getlinks/` - 获取所有管线
|
||||
- `GET /api/v1/getlinktype/` - 获取管线类型
|
||||
- `GET /api/v1/getnodelinks/` - 获取节点的关联管线
|
||||
- `GET /api/v1/getnodeproperties/` - 获取节点属性
|
||||
- `GET /api/v1/getnodes/` - 获取所有节点
|
||||
- `GET /api/v1/getnodetype/` - 获取节点类型
|
||||
- `GET /api/v1/getscadaproperties/` - 获取SCADA点属性
|
||||
- `GET /api/v1/getstatus/` - 获取管线状态
|
||||
- `GET /api/v1/getstatusschema` - 获取状态属性架构
|
||||
- `GET /api/v1/gettitle/` - 获取水网标题属性
|
||||
- `GET /api/v1/gettitleschema/` - 获取标题属性架构
|
||||
- `GET /api/v1/isjunction/` - 检查是否为接点
|
||||
- `GET /api/v1/islink/` - 检查管线有效性
|
||||
- `GET /api/v1/isnode/` - 检查节点有效性
|
||||
- `GET /api/v1/ispipe/` - 检查是否为管道
|
||||
- `GET /api/v1/ispump/` - 检查是否为泵
|
||||
- `GET /api/v1/isreservoir/` - 检查是否为水源
|
||||
- `GET /api/v1/istank/` - 检查是否为蓄水池
|
||||
- `GET /api/v1/isvalve/` - 检查是否为阀门
|
||||
- `POST /api/v1/setstatus/` - 设置管线状态
|
||||
- `GET /api/v1/settitle/` - 设置水网标题属性
|
||||
|
||||
## Action: `geometry`
|
||||
- 详情技能:`geometry/SKILL.md`
|
||||
- `GET /api/v1/getmajornodecoords/` - 获取主要节点坐标
|
||||
- `GET /api/v1/getmajorpipenodes/` - 获取主要管道节点
|
||||
- `GET /api/v1/getnetworkgeometries/` - 获取完整网络几何信息
|
||||
- `GET /api/v1/getnetworkinextent/` - 获取范围内的网络元素
|
||||
- `GET /api/v1/getnetworklinknodes/` - 获取网络管线节点
|
||||
- `GET /api/v1/getnodecoord/` - 获取节点坐标
|
||||
|
||||
## Action: `junctions`
|
||||
- 详情技能:`junctions/SKILL.md`
|
||||
- `POST /api/v1/addjunction/` - 添加节点
|
||||
- `POST /api/v1/deletejunction/` - 删除节点
|
||||
- `GET /api/v1/getalljunctionproperties/` - 获取所有节点属性
|
||||
- `GET /api/v1/getjunctioncoord/` - 获取节点坐标
|
||||
- `GET /api/v1/getjunctiondemand/` - 获取节点需水量
|
||||
- `GET /api/v1/getjunctionelevation/` - 获取节点标高
|
||||
- `GET /api/v1/getjunctionpattern/` - 获取节点需水模式
|
||||
- `GET /api/v1/getjunctionproperties/` - 获取节点属性
|
||||
- `GET /api/v1/getjunctionschema` - 获取节点架构
|
||||
- `GET /api/v1/getjunctionx/` - 获取节点 X 坐标
|
||||
- `GET /api/v1/getjunctiony/` - 获取节点 Y 坐标
|
||||
- `POST /api/v1/setjunctioncoord/` - 设置节点坐标
|
||||
- `POST /api/v1/setjunctiondemand/` - 设置节点需水量
|
||||
- `POST /api/v1/setjunctionelevation/` - 设置节点标高
|
||||
- `POST /api/v1/setjunctionpattern/` - 设置节点需水模式
|
||||
- `POST /api/v1/setjunctionproperties/` - 批量设置节点属性
|
||||
- `POST /api/v1/setjunctionx/` - 设置节点 X 坐标
|
||||
- `POST /api/v1/setjunctiony/` - 设置节点 Y 坐标
|
||||
|
||||
## Action: `pipes`
|
||||
- 详情技能:`pipes/SKILL.md`
|
||||
- `POST /api/v1/addpipe/` - 添加管道
|
||||
- `POST /api/v1/deletepipe/` - 删除管道
|
||||
- `GET /api/v1/getallpipeproperties/` - 获取所有管道属性
|
||||
- `GET /api/v1/getpipediameter/` - 获取管道管径
|
||||
- `GET /api/v1/getpipelength/` - 获取管道长度
|
||||
- `GET /api/v1/getpipeminorloss/` - 获取管道局部阻力系数
|
||||
- `GET /api/v1/getpipenode1/` - 获取管道起始节点
|
||||
- `GET /api/v1/getpipenode2/` - 获取管道终止节点
|
||||
- `GET /api/v1/getpipeproperties/` - 获取管道属性
|
||||
- `GET /api/v1/getpiperoughness/` - 获取管道粗糙度
|
||||
- `GET /api/v1/getpipeschema` - 获取管道模式
|
||||
- `GET /api/v1/getpipestatus/` - 获取管道状态
|
||||
- `POST /api/v1/setpipediameter/` - 设置管道管径
|
||||
- `POST /api/v1/setpipelength/` - 设置管道长度
|
||||
- `POST /api/v1/setpipeminorloss/` - 设置管道局部阻力系数
|
||||
- `POST /api/v1/setpipenode1/` - 设置管道起始节点
|
||||
- `POST /api/v1/setpipenode2/` - 设置管道终止节点
|
||||
- `POST /api/v1/setpipeproperties/` - 设置管道属性
|
||||
- `POST /api/v1/setpiperoughness/` - 设置管道粗糙度
|
||||
- `POST /api/v1/setpipestatus/` - 设置管道状态
|
||||
|
||||
## Action: `pumps`
|
||||
- 详情技能:`pumps/SKILL.md`
|
||||
- `POST /api/v1/addpump/` - 添加水泵
|
||||
- `POST /api/v1/deletepump/` - 删除水泵
|
||||
- `GET /api/v1/getallpumpproperties/` - 获取所有水泵属性
|
||||
- `GET /api/v1/getpumpnode1/` - 获取水泵起始节点
|
||||
- `GET /api/v1/getpumpnode2/` - 获取水泵终止节点
|
||||
- `GET /api/v1/getpumpproperties/` - 获取水泵属性
|
||||
- `GET /api/v1/getpumpschema` - 获取水泵模式
|
||||
- `POST /api/v1/setpumpnode1/` - 设置水泵起始节点
|
||||
- `POST /api/v1/setpumpnode2/` - 设置水泵终止节点
|
||||
- `POST /api/v1/setpumpproperties/` - 设置水泵属性
|
||||
|
||||
## Action: `regions`
|
||||
- 详情技能:`regions/SKILL.md`
|
||||
- `POST /api/v1/adddistrictmeteringarea/` - 添加新DMA
|
||||
- `POST /api/v1/addregion/` - 添加新区域
|
||||
- `POST /api/v1/addservicearea/` - 添加新服务区
|
||||
- `POST /api/v1/addvirtualdistrict/` - 添加新虚拟分区
|
||||
- `GET /api/v1/calculatedistrictmeteringarea/` - 计算DMA分区
|
||||
- `GET /api/v1/calculatedistrictmeteringareafornetwork/` - 计算整网DMA分区
|
||||
- `GET /api/v1/calculatedistrictmeteringareafornodes/` - 计算节点DMA分区
|
||||
- `GET /api/v1/calculatedistrictmeteringareaforregion/` - 计算区域内DMA分区
|
||||
- `GET /api/v1/calculateregion/` - 计算区域
|
||||
- `GET /api/v1/calculateservicearea/` - 计算服务区
|
||||
- `GET /api/v1/calculatevirtualdistrict/` - 计算虚拟分区
|
||||
- `POST /api/v1/deletedistrictmeteringarea/` - 删除DMA
|
||||
- `POST /api/v1/deleteregion/` - 删除区域
|
||||
- `POST /api/v1/deleteservicearea/` - 删除服务区
|
||||
- `POST /api/v1/deletevirtualdistrict/` - 删除虚拟分区
|
||||
- `POST /api/v1/generatedistrictmeteringarea/` - 生成DMA分区
|
||||
- `POST /api/v1/generateregion/` - 生成区域分区
|
||||
- `POST /api/v1/generateservicearea/` - 生成服务区分区
|
||||
- `POST /api/v1/generatesubdistrictmeteringarea/` - 生成DMA子分区
|
||||
- `POST /api/v1/generatevirtualdistrict/` - 生成虚拟分区
|
||||
- `GET /api/v1/getalldistrictmeteringareaids/` - 获取所有DMA ID
|
||||
- `GET /api/v1/getalldistrictmeteringareas/` - 获取所有DMA
|
||||
- `GET /api/v1/getallregions/` - 获取所有区域
|
||||
- `GET /api/v1/getallserviceareas/` - 获取所有服务区
|
||||
- `GET /api/v1/getallvirtualdistrict/` - 获取所有虚拟分区
|
||||
- `GET /api/v1/getdistrictmeteringarea/` - 获取DMA信息
|
||||
- `GET /api/v1/getdistrictmeteringareaschema/` - 获取DMA属性架构
|
||||
- `GET /api/v1/getregion/` - 获取区域信息
|
||||
- `GET /api/v1/getregionschema/` - 获取区域属性架构
|
||||
- `GET /api/v1/getservicearea/` - 获取服务区信息
|
||||
- `GET /api/v1/getserviceareaschema/` - 获取服务区属性架构
|
||||
- `GET /api/v1/getvirtualdistrict/` - 获取虚拟分区信息
|
||||
- `GET /api/v1/getvirtualdistrictschema/` - 获取虚拟分区属性架构
|
||||
- `POST /api/v1/setdistrictmeteringarea/` - 设置DMA属性
|
||||
- `POST /api/v1/setregion/` - 设置区域属性
|
||||
- `POST /api/v1/setservicearea/` - 设置服务区属性
|
||||
- `POST /api/v1/setvirtualdistrict/` - 设置虚拟分区属性
|
||||
|
||||
## Action: `reservoirs`
|
||||
- 详情技能:`reservoirs/SKILL.md`
|
||||
- `POST /api/v1/addreservoir/` - 添加水库
|
||||
- `POST /api/v1/deletereservoir/` - 删除水库
|
||||
- `GET /api/v1/getallreservoirproperties/` - 获取所有水库属性
|
||||
- `GET /api/v1/getreservoircoord/` - 获取水库坐标
|
||||
- `GET /api/v1/getreservoirhead/` - 获取水库水头
|
||||
- `GET /api/v1/getreservoirpattern/` - 获取水库模式
|
||||
- `GET /api/v1/getreservoirproperties/` - 获取水库属性
|
||||
- `GET /api/v1/getreservoirschema` - 获取水库模式
|
||||
- `GET /api/v1/getreservoirx/` - 获取水库X坐标
|
||||
- `GET /api/v1/getreservoiry/` - 获取水库Y坐标
|
||||
- `POST /api/v1/setreservoircoord/` - 设置水库坐标
|
||||
- `POST /api/v1/setreservoirhead/` - 设置水库水头
|
||||
- `POST /api/v1/setreservoirpattern/` - 设置水库模式
|
||||
- `POST /api/v1/setreservoirproperties/` - 设置水库属性
|
||||
- `POST /api/v1/setreservoirx/` - 设置水库X坐标
|
||||
- `POST /api/v1/setreservoiry/` - 设置水库Y坐标
|
||||
|
||||
## Action: `tags`
|
||||
- 详情技能:`tags/SKILL.md`
|
||||
- `GET /api/v1/gettag/` - 获取标签信息
|
||||
- `GET /api/v1/gettags/` - 获取所有标签
|
||||
- `GET /api/v1/gettagschema/` - 获取标签属性架构
|
||||
- `POST /api/v1/settag/` - 设置标签
|
||||
|
||||
## Action: `tanks`
|
||||
- 详情技能:`tanks/SKILL.md`
|
||||
- `POST /api/v1/addtank/` - 新增水箱
|
||||
- `POST /api/v1/deletetank/` - 删除水箱
|
||||
- `GET /api/v1/getalltankproperties/` - 获取所有水箱属性
|
||||
- `GET /api/v1/gettankcoord/` - 获取水箱坐标
|
||||
- `GET /api/v1/gettankdiameter/` - 获取水箱直径
|
||||
- `GET /api/v1/gettankelevation/` - 获取水箱标高
|
||||
- `GET /api/v1/gettankinitlevel/` - 获取水箱初始水位
|
||||
- `GET /api/v1/gettankmaxlevel/` - 获取水箱最大水位
|
||||
- `GET /api/v1/gettankminlevel/` - 获取水箱最小水位
|
||||
- `GET /api/v1/gettankminvol/` - 获取水箱最小体积
|
||||
- `GET /api/v1/gettankoverflow/` - 获取水箱溢流口
|
||||
- `GET /api/v1/gettankproperties/` - 获取水箱属性
|
||||
- `GET /api/v1/gettankschema` - 获取水箱模式
|
||||
- `GET /api/v1/gettankvolcurve/` - 获取水箱容积曲线
|
||||
- `GET /api/v1/gettankx/` - 获取水箱X坐标
|
||||
- `GET /api/v1/gettanky/` - 获取水箱Y坐标
|
||||
- `POST /api/v1/settankcoord/` - 设置水箱坐标
|
||||
- `POST /api/v1/settankdiameter/` - 设置水箱直径
|
||||
- `POST /api/v1/settankelevation/` - 设置水箱标高
|
||||
- `POST /api/v1/settankinitlevel/` - 设置水箱初始水位
|
||||
- `POST /api/v1/settankmaxlevel/` - 设置水箱最大水位
|
||||
- `POST /api/v1/settankminlevel/` - 设置水箱最小水位
|
||||
- `POST /api/v1/settankminvol/` - 设置水箱最小体积
|
||||
- `POST /api/v1/settankoverflow/` - 设置水箱溢流口
|
||||
- `POST /api/v1/settankproperties/` - 设置水箱属性
|
||||
- `POST /api/v1/settankvolcurve/` - 设置水箱容积曲线
|
||||
- `POST /api/v1/settankx/` - 设置水箱X坐标
|
||||
- `POST /api/v1/settanky/` - 设置水箱Y坐标
|
||||
|
||||
## Action: `valves`
|
||||
- 详情技能:`valves/SKILL.md`
|
||||
- `POST /api/v1/addvalve/` - 添加阀门
|
||||
- `POST /api/v1/deletevalve/` - 删除阀门
|
||||
- `GET /api/v1/getallvalveproperties/` - 获取所有阀门属性
|
||||
- `GET /api/v1/getvalvediameter/` - 获取阀门直径
|
||||
- `GET /api/v1/getvalveminorloss/` - 获取阀门损失系数
|
||||
- `GET /api/v1/getvalvenode1/` - 获取阀门起点节点
|
||||
- `GET /api/v1/getvalvenode2/` - 获取阀门终点节点
|
||||
- `GET /api/v1/getvalveproperties/` - 获取阀门所有属性
|
||||
- `GET /api/v1/getvalveschema` - 获取阀门架构
|
||||
- `GET /api/v1/getvalvesetting/` - 获取阀门开度
|
||||
- `GET /api/v1/getvalvetype/` - 获取阀门类型
|
||||
- `POST /api/v1/setvalvenode1/` - 设置阀门起点节点
|
||||
- `POST /api/v1/setvalvenode2/` - 设置阀门终点节点
|
||||
- `POST /api/v1/setvalvenodediameter/` - 设置阀门直径
|
||||
- `POST /api/v1/setvalveproperties/` - 批量设置阀门属性
|
||||
- `POST /api/v1/setvalvesetting/` - 设置阀门开度
|
||||
- `POST /api/v1/setvalvetype/` - 设置阀门类型
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-demands
|
||||
description: business/network-assets 场景下 demands 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **demands** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/calculatedemandtonetwork/` - 计算需水量到整网分配
|
||||
- `GET /api/v1/calculatedemandtonodes/` - 计算需水量到节点分配
|
||||
- `GET /api/v1/calculatedemandtoregion/` - 计算需水量到区域分配
|
||||
- `GET /api/v1/getdemandproperties/` - 获取需水量属性
|
||||
- `GET /api/v1/getdemandschema` - 获取需水量属性架构
|
||||
- `POST /api/v1/setdemandproperties/` - 设置需水量属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-general
|
||||
description: business/network-assets 场景下 general 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **general** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/deletelink/` - 删除管线
|
||||
- `POST /api/v1/deletenode/` - 删除节点
|
||||
- `GET /api/v1/getallscadaproperties/` - 获取所有SCADA点属性
|
||||
- `GET /api/v1/getelementproperties/` - 获取元素属性
|
||||
- `GET /api/v1/getelementpropertieswithtype/` - 获取指定类型元素属性
|
||||
- `GET /api/v1/getelementtype/` - 获取元素类型
|
||||
- `GET /api/v1/getelementtypevalue/` - 获取元素类型值
|
||||
- `GET /api/v1/getlinkproperties/` - 获取管线属性
|
||||
- `GET /api/v1/getlinks/` - 获取所有管线
|
||||
- `GET /api/v1/getlinktype/` - 获取管线类型
|
||||
- `GET /api/v1/getnodelinks/` - 获取节点的关联管线
|
||||
- `GET /api/v1/getnodeproperties/` - 获取节点属性
|
||||
- `GET /api/v1/getnodes/` - 获取所有节点
|
||||
- `GET /api/v1/getnodetype/` - 获取节点类型
|
||||
- `GET /api/v1/getscadaproperties/` - 获取SCADA点属性
|
||||
- `GET /api/v1/getstatus/` - 获取管线状态
|
||||
- `GET /api/v1/getstatusschema` - 获取状态属性架构
|
||||
- `GET /api/v1/gettitle/` - 获取水网标题属性
|
||||
- `GET /api/v1/gettitleschema/` - 获取标题属性架构
|
||||
- `GET /api/v1/isjunction/` - 检查是否为接点
|
||||
- `GET /api/v1/islink/` - 检查管线有效性
|
||||
- `GET /api/v1/isnode/` - 检查节点有效性
|
||||
- `GET /api/v1/ispipe/` - 检查是否为管道
|
||||
- `GET /api/v1/ispump/` - 检查是否为泵
|
||||
- `GET /api/v1/isreservoir/` - 检查是否为水源
|
||||
- `GET /api/v1/istank/` - 检查是否为蓄水池
|
||||
- `GET /api/v1/isvalve/` - 检查是否为阀门
|
||||
- `POST /api/v1/setstatus/` - 设置管线状态
|
||||
- `GET /api/v1/settitle/` - 设置水网标题属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-geometry
|
||||
description: business/network-assets 场景下 geometry 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **geometry** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getmajornodecoords/` - 获取主要节点坐标
|
||||
- `GET /api/v1/getmajorpipenodes/` - 获取主要管道节点
|
||||
- `GET /api/v1/getnetworkgeometries/` - 获取完整网络几何信息
|
||||
- `GET /api/v1/getnetworkinextent/` - 获取范围内的网络元素
|
||||
- `GET /api/v1/getnetworklinknodes/` - 获取网络管线节点
|
||||
- `GET /api/v1/getnodecoord/` - 获取节点坐标
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-junctions
|
||||
description: business/network-assets 场景下 junctions 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **junctions** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addjunction/` - 添加节点
|
||||
- `POST /api/v1/deletejunction/` - 删除节点
|
||||
- `GET /api/v1/getalljunctionproperties/` - 获取所有节点属性
|
||||
- `GET /api/v1/getjunctioncoord/` - 获取节点坐标
|
||||
- `GET /api/v1/getjunctiondemand/` - 获取节点需水量
|
||||
- `GET /api/v1/getjunctionelevation/` - 获取节点标高
|
||||
- `GET /api/v1/getjunctionpattern/` - 获取节点需水模式
|
||||
- `GET /api/v1/getjunctionproperties/` - 获取节点属性
|
||||
- `GET /api/v1/getjunctionschema` - 获取节点架构
|
||||
- `GET /api/v1/getjunctionx/` - 获取节点 X 坐标
|
||||
- `GET /api/v1/getjunctiony/` - 获取节点 Y 坐标
|
||||
- `POST /api/v1/setjunctioncoord/` - 设置节点坐标
|
||||
- `POST /api/v1/setjunctiondemand/` - 设置节点需水量
|
||||
- `POST /api/v1/setjunctionelevation/` - 设置节点标高
|
||||
- `POST /api/v1/setjunctionpattern/` - 设置节点需水模式
|
||||
- `POST /api/v1/setjunctionproperties/` - 批量设置节点属性
|
||||
- `POST /api/v1/setjunctionx/` - 设置节点 X 坐标
|
||||
- `POST /api/v1/setjunctiony/` - 设置节点 Y 坐标
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-pipes
|
||||
description: business/network-assets 场景下 pipes 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **pipes** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addpipe/` - 添加管道
|
||||
- `POST /api/v1/deletepipe/` - 删除管道
|
||||
- `GET /api/v1/getallpipeproperties/` - 获取所有管道属性
|
||||
- `GET /api/v1/getpipediameter/` - 获取管道管径
|
||||
- `GET /api/v1/getpipelength/` - 获取管道长度
|
||||
- `GET /api/v1/getpipeminorloss/` - 获取管道局部阻力系数
|
||||
- `GET /api/v1/getpipenode1/` - 获取管道起始节点
|
||||
- `GET /api/v1/getpipenode2/` - 获取管道终止节点
|
||||
- `GET /api/v1/getpipeproperties/` - 获取管道属性
|
||||
- `GET /api/v1/getpiperoughness/` - 获取管道粗糙度
|
||||
- `GET /api/v1/getpipeschema` - 获取管道模式
|
||||
- `GET /api/v1/getpipestatus/` - 获取管道状态
|
||||
- `POST /api/v1/setpipediameter/` - 设置管道管径
|
||||
- `POST /api/v1/setpipelength/` - 设置管道长度
|
||||
- `POST /api/v1/setpipeminorloss/` - 设置管道局部阻力系数
|
||||
- `POST /api/v1/setpipenode1/` - 设置管道起始节点
|
||||
- `POST /api/v1/setpipenode2/` - 设置管道终止节点
|
||||
- `POST /api/v1/setpipeproperties/` - 设置管道属性
|
||||
- `POST /api/v1/setpiperoughness/` - 设置管道粗糙度
|
||||
- `POST /api/v1/setpipestatus/` - 设置管道状态
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,35 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-pumps
|
||||
description: business/network-assets 场景下 pumps 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **pumps** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addpump/` - 添加水泵
|
||||
- `POST /api/v1/deletepump/` - 删除水泵
|
||||
- `GET /api/v1/getallpumpproperties/` - 获取所有水泵属性
|
||||
- `GET /api/v1/getpumpnode1/` - 获取水泵起始节点
|
||||
- `GET /api/v1/getpumpnode2/` - 获取水泵终止节点
|
||||
- `GET /api/v1/getpumpproperties/` - 获取水泵属性
|
||||
- `GET /api/v1/getpumpschema` - 获取水泵模式
|
||||
- `POST /api/v1/setpumpnode1/` - 设置水泵起始节点
|
||||
- `POST /api/v1/setpumpnode2/` - 设置水泵终止节点
|
||||
- `POST /api/v1/setpumpproperties/` - 设置水泵属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-regions
|
||||
description: business/network-assets 场景下 regions 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **regions** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/adddistrictmeteringarea/` - 添加新DMA
|
||||
- `POST /api/v1/addregion/` - 添加新区域
|
||||
- `POST /api/v1/addservicearea/` - 添加新服务区
|
||||
- `POST /api/v1/addvirtualdistrict/` - 添加新虚拟分区
|
||||
- `GET /api/v1/calculatedistrictmeteringarea/` - 计算DMA分区
|
||||
- `GET /api/v1/calculatedistrictmeteringareafornetwork/` - 计算整网DMA分区
|
||||
- `GET /api/v1/calculatedistrictmeteringareafornodes/` - 计算节点DMA分区
|
||||
- `GET /api/v1/calculatedistrictmeteringareaforregion/` - 计算区域内DMA分区
|
||||
- `GET /api/v1/calculateregion/` - 计算区域
|
||||
- `GET /api/v1/calculateservicearea/` - 计算服务区
|
||||
- `GET /api/v1/calculatevirtualdistrict/` - 计算虚拟分区
|
||||
- `POST /api/v1/deletedistrictmeteringarea/` - 删除DMA
|
||||
- `POST /api/v1/deleteregion/` - 删除区域
|
||||
- `POST /api/v1/deleteservicearea/` - 删除服务区
|
||||
- `POST /api/v1/deletevirtualdistrict/` - 删除虚拟分区
|
||||
- `POST /api/v1/generatedistrictmeteringarea/` - 生成DMA分区
|
||||
- `POST /api/v1/generateregion/` - 生成区域分区
|
||||
- `POST /api/v1/generateservicearea/` - 生成服务区分区
|
||||
- `POST /api/v1/generatesubdistrictmeteringarea/` - 生成DMA子分区
|
||||
- `POST /api/v1/generatevirtualdistrict/` - 生成虚拟分区
|
||||
- `GET /api/v1/getalldistrictmeteringareaids/` - 获取所有DMA ID
|
||||
- `GET /api/v1/getalldistrictmeteringareas/` - 获取所有DMA
|
||||
- `GET /api/v1/getallregions/` - 获取所有区域
|
||||
- `GET /api/v1/getallserviceareas/` - 获取所有服务区
|
||||
- `GET /api/v1/getallvirtualdistrict/` - 获取所有虚拟分区
|
||||
- `GET /api/v1/getdistrictmeteringarea/` - 获取DMA信息
|
||||
- `GET /api/v1/getdistrictmeteringareaschema/` - 获取DMA属性架构
|
||||
- `GET /api/v1/getregion/` - 获取区域信息
|
||||
- `GET /api/v1/getregionschema/` - 获取区域属性架构
|
||||
- `GET /api/v1/getservicearea/` - 获取服务区信息
|
||||
- `GET /api/v1/getserviceareaschema/` - 获取服务区属性架构
|
||||
- `GET /api/v1/getvirtualdistrict/` - 获取虚拟分区信息
|
||||
- `GET /api/v1/getvirtualdistrictschema/` - 获取虚拟分区属性架构
|
||||
- `POST /api/v1/setdistrictmeteringarea/` - 设置DMA属性
|
||||
- `POST /api/v1/setregion/` - 设置区域属性
|
||||
- `POST /api/v1/setservicearea/` - 设置服务区属性
|
||||
- `POST /api/v1/setvirtualdistrict/` - 设置虚拟分区属性
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-reservoirs
|
||||
description: business/network-assets 场景下 reservoirs 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **reservoirs** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addreservoir/` - 添加水库
|
||||
- `POST /api/v1/deletereservoir/` - 删除水库
|
||||
- `GET /api/v1/getallreservoirproperties/` - 获取所有水库属性
|
||||
- `GET /api/v1/getreservoircoord/` - 获取水库坐标
|
||||
- `GET /api/v1/getreservoirhead/` - 获取水库水头
|
||||
- `GET /api/v1/getreservoirpattern/` - 获取水库模式
|
||||
- `GET /api/v1/getreservoirproperties/` - 获取水库属性
|
||||
- `GET /api/v1/getreservoirschema` - 获取水库模式
|
||||
- `GET /api/v1/getreservoirx/` - 获取水库X坐标
|
||||
- `GET /api/v1/getreservoiry/` - 获取水库Y坐标
|
||||
- `POST /api/v1/setreservoircoord/` - 设置水库坐标
|
||||
- `POST /api/v1/setreservoirhead/` - 设置水库水头
|
||||
- `POST /api/v1/setreservoirpattern/` - 设置水库模式
|
||||
- `POST /api/v1/setreservoirproperties/` - 设置水库属性
|
||||
- `POST /api/v1/setreservoirx/` - 设置水库X坐标
|
||||
- `POST /api/v1/setreservoiry/` - 设置水库Y坐标
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-tags
|
||||
description: business/network-assets 场景下 tags 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **tags** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/gettag/` - 获取标签信息
|
||||
- `GET /api/v1/gettags/` - 获取所有标签
|
||||
- `GET /api/v1/gettagschema/` - 获取标签属性架构
|
||||
- `POST /api/v1/settag/` - 设置标签
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-tanks
|
||||
description: business/network-assets 场景下 tanks 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **tanks** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addtank/` - 新增水箱
|
||||
- `POST /api/v1/deletetank/` - 删除水箱
|
||||
- `GET /api/v1/getalltankproperties/` - 获取所有水箱属性
|
||||
- `GET /api/v1/gettankcoord/` - 获取水箱坐标
|
||||
- `GET /api/v1/gettankdiameter/` - 获取水箱直径
|
||||
- `GET /api/v1/gettankelevation/` - 获取水箱标高
|
||||
- `GET /api/v1/gettankinitlevel/` - 获取水箱初始水位
|
||||
- `GET /api/v1/gettankmaxlevel/` - 获取水箱最大水位
|
||||
- `GET /api/v1/gettankminlevel/` - 获取水箱最小水位
|
||||
- `GET /api/v1/gettankminvol/` - 获取水箱最小体积
|
||||
- `GET /api/v1/gettankoverflow/` - 获取水箱溢流口
|
||||
- `GET /api/v1/gettankproperties/` - 获取水箱属性
|
||||
- `GET /api/v1/gettankschema` - 获取水箱模式
|
||||
- `GET /api/v1/gettankvolcurve/` - 获取水箱容积曲线
|
||||
- `GET /api/v1/gettankx/` - 获取水箱X坐标
|
||||
- `GET /api/v1/gettanky/` - 获取水箱Y坐标
|
||||
- `POST /api/v1/settankcoord/` - 设置水箱坐标
|
||||
- `POST /api/v1/settankdiameter/` - 设置水箱直径
|
||||
- `POST /api/v1/settankelevation/` - 设置水箱标高
|
||||
- `POST /api/v1/settankinitlevel/` - 设置水箱初始水位
|
||||
- `POST /api/v1/settankmaxlevel/` - 设置水箱最大水位
|
||||
- `POST /api/v1/settankminlevel/` - 设置水箱最小水位
|
||||
- `POST /api/v1/settankminvol/` - 设置水箱最小体积
|
||||
- `POST /api/v1/settankoverflow/` - 设置水箱溢流口
|
||||
- `POST /api/v1/settankproperties/` - 设置水箱属性
|
||||
- `POST /api/v1/settankvolcurve/` - 设置水箱容积曲线
|
||||
- `POST /api/v1/settankx/` - 设置水箱X坐标
|
||||
- `POST /api/v1/settanky/` - 设置水箱Y坐标
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-network-assets-valves
|
||||
description: business/network-assets 场景下 valves 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **valves** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/addvalve/` - 添加阀门
|
||||
- `POST /api/v1/deletevalve/` - 删除阀门
|
||||
- `GET /api/v1/getallvalveproperties/` - 获取所有阀门属性
|
||||
- `GET /api/v1/getvalvediameter/` - 获取阀门直径
|
||||
- `GET /api/v1/getvalveminorloss/` - 获取阀门损失系数
|
||||
- `GET /api/v1/getvalvenode1/` - 获取阀门起点节点
|
||||
- `GET /api/v1/getvalvenode2/` - 获取阀门终点节点
|
||||
- `GET /api/v1/getvalveproperties/` - 获取阀门所有属性
|
||||
- `GET /api/v1/getvalveschema` - 获取阀门架构
|
||||
- `GET /api/v1/getvalvesetting/` - 获取阀门开度
|
||||
- `GET /api/v1/getvalvetype/` - 获取阀门类型
|
||||
- `POST /api/v1/setvalvenode1/` - 设置阀门起点节点
|
||||
- `POST /api/v1/setvalvenode2/` - 设置阀门终点节点
|
||||
- `POST /api/v1/setvalvenodediameter/` - 设置阀门直径
|
||||
- `POST /api/v1/setvalveproperties/` - 批量设置阀门属性
|
||||
- `POST /api/v1/setvalvesetting/` - 设置阀门开度
|
||||
- `POST /api/v1/setvalvetype/` - 设置阀门类型
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联组件配置: `../component-config`
|
||||
- 关联仿真分析: `../../analytics/simulation-analysis`
|
||||
@@ -1,113 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace
|
||||
description: 项目、方案、快照和项目数据接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **business/project-workspace** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `extension`: `extension/SKILL.md`
|
||||
- `misc`: `misc/SKILL.md`
|
||||
- `project`: `project/SKILL.md`
|
||||
- `project_data`: `project_data/SKILL.md`
|
||||
- `schemes`: `schemes/SKILL.md`
|
||||
- `snapshots`: `snapshots/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `extension`
|
||||
- 详情技能:`extension/SKILL.md`
|
||||
- `GET /api/v1/getallextensiondata/` - 获取所有扩展数据
|
||||
- `GET /api/v1/getallextensiondatakeys/` - 获取所有扩展数据键
|
||||
- `GET /api/v1/getextensiondata/` - 获取指定扩展数据
|
||||
- `POST /api/v1/setextensiondata/` - 设置扩展数据
|
||||
|
||||
## Action: `misc`
|
||||
- 详情技能:`misc/SKILL.md`
|
||||
- `GET /api/v1/getallburstlocateresults/` - 获取所有爆管定位结果
|
||||
- `GET /api/v1/getallsensorplacements/` - 获取所有传感器位置
|
||||
- `GET /api/v1/getjson/` - 获取JSON示例
|
||||
- `GET /api/v1/getrealtimedata/` - 获取实时数据
|
||||
- `GET /api/v1/getsimulationresult/` - 获取模拟结果
|
||||
- `POST /api/v1/test_dict/` - 测试字典处理
|
||||
|
||||
## Action: `project`
|
||||
- 详情技能:`project/SKILL.md`
|
||||
- `POST /api/v1/closeproject/` - 关闭项目
|
||||
- `GET /api/v1/convertv3tov2/` - 转换 INP V3 为 V2
|
||||
- `GET /api/v1/convertv3tov2/` - 转换 INP V3 为 V2
|
||||
- `POST /api/v1/copyproject/` - 复制项目
|
||||
- `POST /api/v1/createproject/` - 创建新项目
|
||||
- `POST /api/v1/deleteproject/` - 删除项目
|
||||
- `GET /api/v1/downloadinp/` - 下载 INP 文件
|
||||
- `GET /api/v1/downloadinp/` - 下载 INP 文件
|
||||
- `GET /api/v1/dumpinp/` - 导出项目到 INP 文件
|
||||
- `GET /api/v1/dumpinp/` - 导出项目到 INP 文件
|
||||
- `GET /api/v1/exportinp/` - 导出项目为 ChangeSet
|
||||
- `GET /api/v1/haveproject/` - 检查项目是否存在
|
||||
- `POST /api/v1/importinp/` - 导入 INP 文件内容
|
||||
- `GET /api/v1/isprojectlocked/` - 检查项目是否被锁定
|
||||
- `GET /api/v1/isprojectlocked/` - 检查项目是否被锁定
|
||||
- `GET /api/v1/isprojectlockedbyme/` - 检查项目是否被当前用户锁定
|
||||
- `GET /api/v1/isprojectlockedbyme/` - 检查项目是否被当前用户锁定
|
||||
- `GET /api/v1/isprojectopen/` - 检查项目是否已打开
|
||||
- `GET /api/v1/listprojects/` - 获取项目列表
|
||||
- `POST /api/v1/lockproject/` - 锁定项目
|
||||
- `POST /api/v1/lockproject/` - 锁定项目
|
||||
- `POST /api/v1/openproject/` - 打开项目
|
||||
- `GET /api/v1/project_info/` - 获取项目信息
|
||||
- `POST /api/v1/readinp/` - 读取 INP 文件到项目
|
||||
- `POST /api/v1/readinp/` - 读取 INP 文件到项目
|
||||
- `POST /api/v1/unlockproject/` - 解锁项目
|
||||
- `POST /api/v1/unlockproject/` - 解锁项目
|
||||
- `POST /api/v1/uploadinp/` - 上传 INP 文件
|
||||
- `POST /api/v1/uploadinp/` - 上传 INP 文件
|
||||
|
||||
## Action: `project_data`
|
||||
- 详情技能:`project_data/SKILL.md`
|
||||
- `GET /api/v1/burst-locate-result` - 获取爆管定位结果
|
||||
- `GET /api/v1/burst-locate-result/{burst_incident}` - 按事件查询爆管定位结果
|
||||
- `GET /api/v1/scada-info` - 获取SCADA信息
|
||||
- `GET /api/v1/scheme-list` - 获取方案列表
|
||||
|
||||
## Action: `schemes`
|
||||
- 详情技能:`schemes/SKILL.md`
|
||||
- `GET /api/v1/getallschemes/` - 获取所有方案
|
||||
- `GET /api/v1/getscheme/` - 获取单个方案
|
||||
- `GET /api/v1/getschemeschema/` - 获取方案模式
|
||||
|
||||
## Action: `snapshots`
|
||||
- 详情技能:`snapshots/SKILL.md`
|
||||
- `POST /api/v1/batch/` - 执行批量命令
|
||||
- `POST /api/v1/compressedbatch/` - 执行压缩批量命令
|
||||
- `GET /api/v1/getcurrentoperationid/` - 获取当前操作ID
|
||||
- `GET /api/v1/getrestoreoperation/` - 获取恢复操作ID
|
||||
- `GET /api/v1/getsnapshots/` - 获取快照列表
|
||||
- `GET /api/v1/havesnapshot/` - 检查快照是否存在
|
||||
- `GET /api/v1/havesnapshotforcurrentoperation/` - 检查当前操作快照是否存在
|
||||
- `GET /api/v1/havesnapshotforoperation/` - 检查操作快照是否存在
|
||||
- `POST /api/v1/pickoperation/` - 选择操作
|
||||
- `POST /api/v1/picksnapshot/` - 选择快照
|
||||
- `POST /api/v1/redo/` - 重做操作
|
||||
- `POST /api/v1/setrestoreoperation/` - 设置恢复操作ID
|
||||
- `GET /api/v1/syncwithserver/` - 与服务器同步
|
||||
- `POST /api/v1/takenapshotforcurrentoperation` - 为当前操作创建快照(兼容模式)
|
||||
- `POST /api/v1/takesnapshot/` - 创建快照
|
||||
- `POST /api/v1/takesnapshotforcurrentoperation` - 为当前操作创建快照
|
||||
- `POST /api/v1/takesnapshotforoperation/` - 为操作创建快照
|
||||
- `POST /api/v1/undo/` - 撤销操作
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace-extension
|
||||
description: business/project-workspace 场景下 extension 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **extension** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getallextensiondata/` - 获取所有扩展数据
|
||||
- `GET /api/v1/getallextensiondatakeys/` - 获取所有扩展数据键
|
||||
- `GET /api/v1/getextensiondata/` - 获取指定扩展数据
|
||||
- `POST /api/v1/setextensiondata/` - 设置扩展数据
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace-misc
|
||||
description: business/project-workspace 场景下 misc 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **misc** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getallburstlocateresults/` - 获取所有爆管定位结果
|
||||
- `GET /api/v1/getallsensorplacements/` - 获取所有传感器位置
|
||||
- `GET /api/v1/getjson/` - 获取JSON示例
|
||||
- `GET /api/v1/getrealtimedata/` - 获取实时数据
|
||||
- `GET /api/v1/getsimulationresult/` - 获取模拟结果
|
||||
- `POST /api/v1/test_dict/` - 测试字典处理
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace-project
|
||||
description: business/project-workspace 场景下 project 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **project** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/closeproject/` - 关闭项目
|
||||
- `GET /api/v1/convertv3tov2/` - 转换 INP V3 为 V2
|
||||
- `GET /api/v1/convertv3tov2/` - 转换 INP V3 为 V2
|
||||
- `POST /api/v1/copyproject/` - 复制项目
|
||||
- `POST /api/v1/createproject/` - 创建新项目
|
||||
- `POST /api/v1/deleteproject/` - 删除项目
|
||||
- `GET /api/v1/downloadinp/` - 下载 INP 文件
|
||||
- `GET /api/v1/downloadinp/` - 下载 INP 文件
|
||||
- `GET /api/v1/dumpinp/` - 导出项目到 INP 文件
|
||||
- `GET /api/v1/dumpinp/` - 导出项目到 INP 文件
|
||||
- `GET /api/v1/exportinp/` - 导出项目为 ChangeSet
|
||||
- `GET /api/v1/haveproject/` - 检查项目是否存在
|
||||
- `POST /api/v1/importinp/` - 导入 INP 文件内容
|
||||
- `GET /api/v1/isprojectlocked/` - 检查项目是否被锁定
|
||||
- `GET /api/v1/isprojectlocked/` - 检查项目是否被锁定
|
||||
- `GET /api/v1/isprojectlockedbyme/` - 检查项目是否被当前用户锁定
|
||||
- `GET /api/v1/isprojectlockedbyme/` - 检查项目是否被当前用户锁定
|
||||
- `GET /api/v1/isprojectopen/` - 检查项目是否已打开
|
||||
- `GET /api/v1/listprojects/` - 获取项目列表
|
||||
- `POST /api/v1/lockproject/` - 锁定项目
|
||||
- `POST /api/v1/lockproject/` - 锁定项目
|
||||
- `POST /api/v1/openproject/` - 打开项目
|
||||
- `GET /api/v1/project_info/` - 获取项目信息
|
||||
- `POST /api/v1/readinp/` - 读取 INP 文件到项目
|
||||
- `POST /api/v1/readinp/` - 读取 INP 文件到项目
|
||||
- `POST /api/v1/unlockproject/` - 解锁项目
|
||||
- `POST /api/v1/unlockproject/` - 解锁项目
|
||||
- `POST /api/v1/uploadinp/` - 上传 INP 文件
|
||||
- `POST /api/v1/uploadinp/` - 上传 INP 文件
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace-project_data
|
||||
description: business/project-workspace 场景下 project_data 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **project_data** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/burst-locate-result` - 获取爆管定位结果
|
||||
- `GET /api/v1/burst-locate-result/{burst_incident}` - 按事件查询爆管定位结果
|
||||
- `GET /api/v1/scada-info` - 获取SCADA信息
|
||||
- `GET /api/v1/scheme-list` - 获取方案列表
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace-schemes
|
||||
description: business/project-workspace 场景下 schemes 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **schemes** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/getallschemes/` - 获取所有方案
|
||||
- `GET /api/v1/getscheme/` - 获取单个方案
|
||||
- `GET /api/v1/getschemeschema/` - 获取方案模式
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
name: api-operations-business-project-workspace-snapshots
|
||||
description: business/project-workspace 场景下 snapshots 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **snapshots** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/batch/` - 执行批量命令
|
||||
- `POST /api/v1/compressedbatch/` - 执行压缩批量命令
|
||||
- `GET /api/v1/getcurrentoperationid/` - 获取当前操作ID
|
||||
- `GET /api/v1/getrestoreoperation/` - 获取恢复操作ID
|
||||
- `GET /api/v1/getsnapshots/` - 获取快照列表
|
||||
- `GET /api/v1/havesnapshot/` - 检查快照是否存在
|
||||
- `GET /api/v1/havesnapshotforcurrentoperation/` - 检查当前操作快照是否存在
|
||||
- `GET /api/v1/havesnapshotforoperation/` - 检查操作快照是否存在
|
||||
- `POST /api/v1/pickoperation/` - 选择操作
|
||||
- `POST /api/v1/picksnapshot/` - 选择快照
|
||||
- `POST /api/v1/redo/` - 重做操作
|
||||
- `POST /api/v1/setrestoreoperation/` - 设置恢复操作ID
|
||||
- `GET /api/v1/syncwithserver/` - 与服务器同步
|
||||
- `POST /api/v1/takenapshotforcurrentoperation` - 为当前操作创建快照(兼容模式)
|
||||
- `POST /api/v1/takesnapshot/` - 创建快照
|
||||
- `POST /api/v1/takesnapshotforcurrentoperation` - 为当前操作创建快照
|
||||
- `POST /api/v1/takesnapshotforoperation/` - 为操作创建快照
|
||||
- `POST /api/v1/undo/` - 撤销操作
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联网络资产: `../network-assets`
|
||||
- 关联时序数据: `../../data/timeseries-access`
|
||||
@@ -1,21 +0,0 @@
|
||||
# 示例
|
||||
|
||||
## 示例 1:按目录查找操作
|
||||
|
||||
用户目标:"我要改一个泵的属性,去哪个 skill?"
|
||||
|
||||
建议路径:
|
||||
|
||||
1. 打开 `SKILL.md` 查看目录导航。
|
||||
2. 进入 `business/network-assets/SKILL.md`。
|
||||
3. 在 `Action: pumps` 下选择对应接口(如 `setpumpproperties`)。
|
||||
|
||||
## 示例 2:按场景联调
|
||||
|
||||
用户目标:"排查 SCADA 历史数据接口异常。"
|
||||
|
||||
建议路径:
|
||||
|
||||
1. 进入 `analytics/scada-operations/SKILL.md`。
|
||||
2. 按 `Action` 定位 `scada` 或 `data_query`。
|
||||
3. 结合 `runbook.md` 做状态码与参数排查。
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
name: api-operations-platform-governance-observability
|
||||
description: 审计、健康检查和缓存运维接口集合。
|
||||
version: 2.1.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当需求落在 **platform/governance-observability** 的接口范围时使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# Action Skills
|
||||
|
||||
- `audit`: `audit/SKILL.md`
|
||||
- `cache`: `cache/SKILL.md`
|
||||
- `meta`: `meta/SKILL.md`
|
||||
|
||||
# 操作目录(Domain -> Scenario -> Action)
|
||||
|
||||
## Action: `audit`
|
||||
- 详情技能:`audit/SKILL.md`
|
||||
- `GET /api/v1/audit/logs` - 查询审计日志
|
||||
- `GET /api/v1/audit/logs/count` - 获取审计日志总数
|
||||
- `GET /api/v1/audit/logs/my` - 查询我的审计日志
|
||||
|
||||
## Action: `cache`
|
||||
- 详情技能:`cache/SKILL.md`
|
||||
- `POST /api/v1/clearallredis/` - 清除所有缓存
|
||||
- `POST /api/v1/clearrediskey/` - 清除单个缓存键
|
||||
- `POST /api/v1/clearrediskeys/` - 清除匹配的缓存键
|
||||
- `GET /api/v1/queryredis/` - 查询缓存键列表
|
||||
|
||||
## Action: `meta`
|
||||
- 详情技能:`meta/SKILL.md`
|
||||
- `GET /api/v1/meta/db/health` - 检查数据库健康状态
|
||||
- `GET /api/v1/meta/project` - 获取项目元数据
|
||||
- `GET /api/v1/meta/projects` - 列出用户项目
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联身份权限: `../../business/identity-access`
|
||||
- 关联SCADA操作: `../../analytics/scada-operations`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-platform-governance-observability-audit
|
||||
description: platform/governance-observability 场景下 audit 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **audit** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/audit/logs` - 查询审计日志
|
||||
- `GET /api/v1/audit/logs/count` - 获取审计日志总数
|
||||
- `GET /api/v1/audit/logs/my` - 查询我的审计日志
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联身份权限: `../../business/identity-access`
|
||||
- 关联SCADA操作: `../../analytics/scada-operations`
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
name: api-operations-platform-governance-observability-cache
|
||||
description: platform/governance-observability 场景下 cache 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **cache** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`, `POST`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `POST /api/v1/clearallredis/` - 清除所有缓存
|
||||
- `POST /api/v1/clearrediskey/` - 清除单个缓存键
|
||||
- `POST /api/v1/clearrediskeys/` - 清除匹配的缓存键
|
||||
- `GET /api/v1/queryredis/` - 查询缓存键列表
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联身份权限: `../../business/identity-access`
|
||||
- 关联SCADA操作: `../../analytics/scada-operations`
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: api-operations-platform-governance-observability-meta
|
||||
description: platform/governance-observability 场景下 meta 操作接口。
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
# 何时使用
|
||||
|
||||
当你只需要处理 **meta** 相关接口时,使用本技能。
|
||||
|
||||
# 输入要求
|
||||
|
||||
- 可选:`BASE_URL`(默认 `http://127.0.0.1:8000`)
|
||||
- 可选:`AUTH_TOKEN`(按环境鉴权策略)
|
||||
- 覆盖方法:`GET`
|
||||
|
||||
# 操作列表
|
||||
|
||||
- `GET /api/v1/meta/db/health` - 检查数据库健康状态
|
||||
- `GET /api/v1/meta/project` - 获取项目元数据
|
||||
- `GET /api/v1/meta/projects` - 列出用户项目
|
||||
|
||||
# See Also
|
||||
|
||||
- 关联场景: `../`
|
||||
- 关联总览: `../../../SKILL.md`
|
||||
- 关联身份权限: `../../business/identity-access`
|
||||
- 关联SCADA操作: `../../analytics/scada-operations`
|
||||
@@ -1,20 +0,0 @@
|
||||
# API Skills 使用 Runbook
|
||||
|
||||
## 标准流程
|
||||
|
||||
1. 先在 `SKILL.md` 选择领域与场景。
|
||||
2. 进入对应 `*/<scenario>/SKILL.md`,按 `Action` 找到接口。
|
||||
3. 组装请求:`$BASE_URL` + `path`,并按需带 `AUTH_TOKEN`。
|
||||
4. 记录请求参数、状态码、响应体。
|
||||
|
||||
## 异常处理
|
||||
|
||||
- `401/403`:检查 token 与角色权限。
|
||||
- `404`:检查路径前缀与路由配置是否一致。
|
||||
- `422`:检查 query/body 参数与字段类型。
|
||||
- `5xx`:记录响应体并关联后端日志排查。
|
||||
|
||||
## 重试建议
|
||||
|
||||
- 网络超时、`5xx` 可有限重试 1~2 次。
|
||||
- `4xx` 先修正参数与权限,不建议直接重试。
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${BASE_URL:-http://127.0.0.1:8000}"
|
||||
NETWORK="${NETWORK:-tjwater}"
|
||||
URL="${BASE_URL%/}/api/v1/burst-detection/schemes/?network=${NETWORK}"
|
||||
|
||||
headers=(-H "Accept: application/json")
|
||||
if [[ -n "${AUTH_TOKEN:-}" ]]; then
|
||||
headers+=(-H "Authorization: Bearer ${AUTH_TOKEN}")
|
||||
fi
|
||||
|
||||
echo "[api-operations] GET ${URL}" >&2
|
||||
curl --silent --show-error --fail-with-body "${headers[@]}" "$URL"
|
||||
echo
|
||||
@@ -1,120 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from typing import AsyncGenerator, Optional
|
||||
|
||||
import httpx
|
||||
from fastapi import APIRouter, Depends, Request, status
|
||||
from fastapi.responses import StreamingResponse
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.auth.keycloak_dependencies import get_current_keycloak_username
|
||||
from app.core.config import settings
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
class CopilotChatStreamRequest(BaseModel):
|
||||
message: str = Field(..., min_length=1, max_length=10000)
|
||||
conversation_id: Optional[str] = Field(default=None, max_length=128)
|
||||
|
||||
|
||||
def _sse_event(event: str, data: dict) -> str:
|
||||
return f"event: {event}\ndata: {json.dumps(data, ensure_ascii=False)}\n\n"
|
||||
|
||||
|
||||
@router.post(
|
||||
"/chat/stream",
|
||||
summary="Copilot 聊天流式响应",
|
||||
description="向 Python Copilot sidecar 转发请求并通过 SSE 返回增量内容",
|
||||
)
|
||||
async def copilot_chat_stream(
|
||||
payload: CopilotChatStreamRequest,
|
||||
request: Request,
|
||||
username: str = Depends(get_current_keycloak_username),
|
||||
):
|
||||
timeout = httpx.Timeout(
|
||||
connect=10.0,
|
||||
read=float(settings.COPILOT_STREAM_TIMEOUT_SECONDS),
|
||||
write=10.0,
|
||||
pool=10.0,
|
||||
)
|
||||
sidecar_url = settings.COPILOT_SIDECAR_URL.rstrip("/")
|
||||
upstream_url = f"{sidecar_url}/chat/stream"
|
||||
|
||||
async def event_generator() -> AsyncGenerator[str, None]:
|
||||
headers: dict[str, str] = {}
|
||||
auth_header = request.headers.get("authorization")
|
||||
project_id = request.headers.get("x-project-id")
|
||||
if auth_header:
|
||||
headers["authorization"] = auth_header
|
||||
if project_id:
|
||||
headers["x-project-id"] = project_id
|
||||
|
||||
body = {
|
||||
"message": payload.message,
|
||||
"conversationId": payload.conversation_id,
|
||||
"userId": username,
|
||||
}
|
||||
|
||||
try:
|
||||
async with httpx.AsyncClient(timeout=timeout) as client:
|
||||
async with client.stream(
|
||||
"POST",
|
||||
upstream_url,
|
||||
json=body,
|
||||
headers=headers,
|
||||
) as response:
|
||||
if response.status_code >= 400:
|
||||
detail_text = await response.aread()
|
||||
detail = detail_text.decode("utf-8", errors="replace")
|
||||
yield _sse_event(
|
||||
"error",
|
||||
{
|
||||
"message": "Copilot sidecar request failed",
|
||||
"status": response.status_code,
|
||||
"detail": detail,
|
||||
},
|
||||
)
|
||||
return
|
||||
|
||||
async for line in response.aiter_lines():
|
||||
if await request.is_disconnected():
|
||||
return
|
||||
yield f"{line}\n"
|
||||
except httpx.ReadTimeout:
|
||||
yield _sse_event(
|
||||
"error",
|
||||
{
|
||||
"message": "Copilot stream timeout",
|
||||
"status": status.HTTP_504_GATEWAY_TIMEOUT,
|
||||
},
|
||||
)
|
||||
except httpx.ConnectError as exc:
|
||||
yield _sse_event(
|
||||
"error",
|
||||
{
|
||||
"message": "Copilot sidecar unavailable",
|
||||
"status": status.HTTP_503_SERVICE_UNAVAILABLE,
|
||||
"detail": str(exc),
|
||||
},
|
||||
)
|
||||
except Exception as exc:
|
||||
yield _sse_event(
|
||||
"error",
|
||||
{
|
||||
"message": "Unexpected stream proxy error",
|
||||
"status": status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
"detail": str(exc),
|
||||
},
|
||||
)
|
||||
|
||||
return StreamingResponse(
|
||||
event_generator(),
|
||||
media_type="text/event-stream",
|
||||
headers={
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"X-Accel-Buffering": "no",
|
||||
},
|
||||
)
|
||||
@@ -1,13 +1,12 @@
|
||||
from fastapi import APIRouter
|
||||
from app.api.v1.endpoints import (
|
||||
auth,
|
||||
copilot,
|
||||
project,
|
||||
simulation,
|
||||
scada,
|
||||
extension,
|
||||
snapshots,
|
||||
data_query,
|
||||
# data_query,
|
||||
users,
|
||||
schemes,
|
||||
misc,
|
||||
@@ -113,6 +112,3 @@ api_router.include_router(project_data.router, tags=["Project Data"])
|
||||
|
||||
# Extension
|
||||
api_router.include_router(extension.router, tags=["Extension"])
|
||||
|
||||
# Copilot Chat
|
||||
api_router.include_router(copilot.router, prefix="/copilot", tags=["Copilot"])
|
||||
|
||||
@@ -62,10 +62,6 @@ class Settings(BaseSettings):
|
||||
KEYCLOAK_ALGORITHM: str = "RS256"
|
||||
KEYCLOAK_AUDIENCE: str = ""
|
||||
|
||||
# Copilot Sidecar
|
||||
COPILOT_SIDECAR_URL: str = "http://127.0.0.1:8787"
|
||||
COPILOT_STREAM_TIMEOUT_SECONDS: int = 120
|
||||
|
||||
@property
|
||||
def SQLALCHEMY_DATABASE_URI(self) -> str:
|
||||
db_password = quote_plus(self.DB_PASSWORD)
|
||||
|
||||
@@ -60,12 +60,8 @@ class AuditMiddleware(BaseHTTPMiddleware):
|
||||
"/meta/projects",
|
||||
"/api/v1/openproject/",
|
||||
"/openproject/",
|
||||
"/api/v1/copilot/chat/",
|
||||
"/api/v1/copilot/chat/stream",
|
||||
}
|
||||
EXCLUDED_PATH_PREFIXES = (
|
||||
"/api/v1/copilot/chat/",
|
||||
"/copilot/chat/",
|
||||
)
|
||||
|
||||
async def dispatch(self, request: Request, call_next: Callable) -> Response:
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import uuid
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Optional
|
||||
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.responses import StreamingResponse
|
||||
from pydantic import BaseModel, Field, ConfigDict
|
||||
from copilot import CopilotClient, PermissionHandler
|
||||
|
||||
|
||||
def _sse(event: str, data: dict[str, Any]) -> str:
|
||||
return f"event: {event}\ndata: {json.dumps(data, ensure_ascii=False)}\n\n"
|
||||
|
||||
|
||||
@dataclass
|
||||
class SessionHolder:
|
||||
session: Any
|
||||
last_used_at: float
|
||||
|
||||
|
||||
app = FastAPI(title="TJWater Copilot Sidecar")
|
||||
client: Optional[CopilotClient] = None
|
||||
sessions: dict[str, SessionHolder] = {}
|
||||
session_ttl_seconds = int(os.getenv("COPILOT_SESSION_TTL_SECONDS", "1800"))
|
||||
model = os.getenv("COPILOT_MODEL", "gpt-5.4")
|
||||
logger = logging.getLogger("copilot_sidecar")
|
||||
|
||||
|
||||
class ChatStreamRequest(BaseModel):
|
||||
message: str = Field(..., min_length=1, max_length=10000)
|
||||
conversation_id: Optional[str] = Field(
|
||||
default=None, alias="conversationId", max_length=128
|
||||
)
|
||||
user_id: Optional[str] = Field(default=None, alias="userId", max_length=128)
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
async def startup_event() -> None:
|
||||
global client
|
||||
client = CopilotClient()
|
||||
await client.start()
|
||||
|
||||
|
||||
@app.on_event("shutdown")
|
||||
async def shutdown_event() -> None:
|
||||
if client is not None:
|
||||
for holder in sessions.values():
|
||||
try:
|
||||
await holder.session.disconnect()
|
||||
except Exception as exc:
|
||||
logger.warning("Failed to disconnect session during shutdown: %s", exc)
|
||||
sessions.clear()
|
||||
await client.stop()
|
||||
|
||||
|
||||
async def _cleanup_sessions() -> None:
|
||||
now = time.time()
|
||||
expired = [
|
||||
sid
|
||||
for sid, holder in sessions.items()
|
||||
if now - holder.last_used_at > session_ttl_seconds
|
||||
]
|
||||
for sid in expired:
|
||||
holder = sessions.pop(sid, None)
|
||||
if holder is None:
|
||||
continue
|
||||
try:
|
||||
await holder.session.disconnect()
|
||||
except Exception as exc:
|
||||
logger.warning("Failed to disconnect expired session %s: %s", sid, exc)
|
||||
|
||||
|
||||
async def _get_or_create_session(conversation_id: str):
|
||||
await _cleanup_sessions()
|
||||
if conversation_id in sessions:
|
||||
sessions[conversation_id].last_used_at = time.time()
|
||||
return sessions[conversation_id].session
|
||||
|
||||
if client is None:
|
||||
raise RuntimeError("Copilot client is not initialized")
|
||||
|
||||
session = await client.create_session(
|
||||
model=model,
|
||||
streaming=True,
|
||||
on_permission_request=PermissionHandler.approve_all,
|
||||
)
|
||||
sessions[conversation_id] = SessionHolder(session=session, last_used_at=time.time())
|
||||
return session
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
async def health() -> dict[str, Any]:
|
||||
return {"ok": True, "model": model, "sessions": len(sessions)}
|
||||
|
||||
|
||||
@app.post("/chat/stream")
|
||||
async def chat_stream(payload: ChatStreamRequest, request: Request):
|
||||
conv_id = (
|
||||
payload.conversation_id.strip()
|
||||
if isinstance(payload.conversation_id, str) and payload.conversation_id.strip()
|
||||
else f"conv-{uuid.uuid4().hex[:10]}"
|
||||
)
|
||||
message = payload.message.strip()
|
||||
|
||||
async def event_generator():
|
||||
queue: asyncio.Queue[tuple[str, dict[str, Any]]] = asyncio.Queue()
|
||||
done = asyncio.Event()
|
||||
saw_message_delta = False
|
||||
|
||||
def on_event(event):
|
||||
nonlocal saw_message_delta
|
||||
event_type = getattr(event.type, "value", str(event.type))
|
||||
data = getattr(event, "data", None)
|
||||
if event_type == "assistant.message_delta":
|
||||
content = getattr(data, "delta_content", "") or ""
|
||||
if content:
|
||||
saw_message_delta = True
|
||||
queue.put_nowait(
|
||||
("token", {"conversationId": conv_id, "content": content})
|
||||
)
|
||||
elif event_type == "assistant.message" and not saw_message_delta:
|
||||
content = getattr(data, "content", "") or ""
|
||||
if content:
|
||||
queue.put_nowait(
|
||||
("token", {"conversationId": conv_id, "content": content})
|
||||
)
|
||||
elif event_type == "session.idle":
|
||||
queue.put_nowait(("done", {"conversationId": conv_id}))
|
||||
done.set()
|
||||
elif event_type == "error":
|
||||
queue.put_nowait(
|
||||
(
|
||||
"error",
|
||||
{
|
||||
"conversationId": conv_id,
|
||||
"message": "copilot session error",
|
||||
"detail": str(data),
|
||||
},
|
||||
)
|
||||
)
|
||||
done.set()
|
||||
|
||||
try:
|
||||
session = await _get_or_create_session(conv_id)
|
||||
unsubscribe = session.on(on_event)
|
||||
try:
|
||||
await session.send(message)
|
||||
while not done.is_set() or not queue.empty():
|
||||
if await request.is_disconnected():
|
||||
logger.info(
|
||||
"Client disconnected during stream: conversation=%s",
|
||||
conv_id,
|
||||
)
|
||||
return
|
||||
try:
|
||||
event_name, event_data = await asyncio.wait_for(
|
||||
queue.get(), timeout=0.2
|
||||
)
|
||||
yield _sse(event_name, event_data)
|
||||
except asyncio.TimeoutError:
|
||||
continue
|
||||
finally:
|
||||
unsubscribe()
|
||||
if conv_id in sessions:
|
||||
sessions[conv_id].last_used_at = time.time()
|
||||
except Exception as exc:
|
||||
logger.exception("Copilot generation failed for %s: %s", conv_id, exc)
|
||||
yield _sse(
|
||||
"error",
|
||||
{
|
||||
"conversationId": conv_id,
|
||||
"message": "copilot generation failed",
|
||||
"detail": str(exc),
|
||||
},
|
||||
)
|
||||
|
||||
return StreamingResponse(
|
||||
event_generator(),
|
||||
media_type="text/event-stream",
|
||||
headers={
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"X-Accel-Buffering": "no",
|
||||
},
|
||||
)
|
||||
@@ -168,4 +168,3 @@ zmq==0.0.0
|
||||
pymoo==0.6.1.6
|
||||
scikit-learn==1.6.1
|
||||
scipy==1.15.2
|
||||
github-copilot-sdk==0.2.0
|
||||
+8
-69
@@ -1,83 +1,22 @@
|
||||
import asyncio
|
||||
import atexit
|
||||
import os
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
from urllib.parse import urlparse
|
||||
import uvicorn
|
||||
|
||||
# 将项目根目录添加到 python 路径
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
|
||||
_SIDECAR_PROCESS: subprocess.Popen | None = None
|
||||
|
||||
|
||||
def _parse_sidecar_target() -> tuple[str, int]:
|
||||
sidecar_url = os.getenv("COPILOT_SIDECAR_URL", "http://127.0.0.1:8787").strip()
|
||||
parsed = urlparse(sidecar_url)
|
||||
host = parsed.hostname or "127.0.0.1"
|
||||
port = parsed.port or 8787
|
||||
return host, port
|
||||
|
||||
|
||||
def _stop_sidecar() -> None:
|
||||
global _SIDECAR_PROCESS
|
||||
proc = _SIDECAR_PROCESS
|
||||
if proc is None:
|
||||
return
|
||||
if proc.poll() is None:
|
||||
proc.terminate()
|
||||
try:
|
||||
proc.wait(timeout=5)
|
||||
except subprocess.TimeoutExpired:
|
||||
proc.kill()
|
||||
proc.wait(timeout=3)
|
||||
_SIDECAR_PROCESS = None
|
||||
|
||||
|
||||
def _start_sidecar_if_needed() -> None:
|
||||
global _SIDECAR_PROCESS
|
||||
sidecar_dir = os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), "..", "copilot-sidecar")
|
||||
)
|
||||
|
||||
host, port = _parse_sidecar_target()
|
||||
cmd = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
"uvicorn",
|
||||
"server:app",
|
||||
"--host",
|
||||
host,
|
||||
"--port",
|
||||
str(port),
|
||||
"--log-level",
|
||||
os.getenv("COPILOT_SIDECAR_LOG_LEVEL", "warning"),
|
||||
]
|
||||
_SIDECAR_PROCESS = subprocess.Popen(cmd, cwd=sidecar_dir)
|
||||
print(f"[run_server] sidecar started at {host}:{port}.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Windows 设置事件循环策略
|
||||
if sys.platform == "win32":
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
|
||||
atexit.register(_stop_sidecar)
|
||||
signal.signal(signal.SIGTERM, lambda *_: _stop_sidecar())
|
||||
signal.signal(signal.SIGINT, lambda *_: _stop_sidecar())
|
||||
|
||||
_start_sidecar_if_needed()
|
||||
try:
|
||||
# 用 uvicorn.run 支持 workers 参数
|
||||
uvicorn.run(
|
||||
"app.main:app",
|
||||
host="0.0.0.0",
|
||||
port=8000,
|
||||
# workers=2, # 这里可以设置多进程
|
||||
loop="asyncio",
|
||||
)
|
||||
finally:
|
||||
_stop_sidecar()
|
||||
# 用 uvicorn.run 支持 workers 参数
|
||||
uvicorn.run(
|
||||
"app.main:app",
|
||||
host="0.0.0.0",
|
||||
port=8000,
|
||||
# workers=2, # 这里可以设置多进程
|
||||
loop="asyncio",
|
||||
)
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.api.v1.endpoints import copilot as copilot_endpoint
|
||||
|
||||
|
||||
class _FakeStreamResponse:
|
||||
def __init__(self, status_code: int, lines: list[str] | None = None, body: bytes = b""):
|
||||
self.status_code = status_code
|
||||
self._lines = lines or []
|
||||
self._body = body
|
||||
|
||||
async def __aenter__(self):
|
||||
return self
|
||||
|
||||
async def __aexit__(self, exc_type, exc, tb):
|
||||
return None
|
||||
|
||||
async def aread(self) -> bytes:
|
||||
return self._body
|
||||
|
||||
async def aiter_lines(self):
|
||||
for line in self._lines:
|
||||
yield line
|
||||
|
||||
|
||||
class _FakeAsyncClient:
|
||||
response: _FakeStreamResponse
|
||||
captured: dict
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self._kwargs = kwargs
|
||||
|
||||
async def __aenter__(self):
|
||||
return self
|
||||
|
||||
async def __aexit__(self, exc_type, exc, tb):
|
||||
return None
|
||||
|
||||
def stream(self, method: str, url: str, json: dict, headers: dict):
|
||||
_FakeAsyncClient.captured = {
|
||||
"method": method,
|
||||
"url": url,
|
||||
"json": json,
|
||||
"headers": headers,
|
||||
"client_kwargs": self._kwargs,
|
||||
}
|
||||
return _FakeAsyncClient.response
|
||||
|
||||
|
||||
def _build_client(monkeypatch) -> TestClient:
|
||||
app = FastAPI()
|
||||
app.include_router(copilot_endpoint.router, prefix="/api/v1/copilot")
|
||||
app.dependency_overrides[copilot_endpoint.get_current_keycloak_username] = (
|
||||
lambda: "tester"
|
||||
)
|
||||
monkeypatch.setattr(copilot_endpoint.httpx, "AsyncClient", _FakeAsyncClient)
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
def test_chat_stream_forwards_auth_and_payload(monkeypatch):
|
||||
_FakeAsyncClient.response = _FakeStreamResponse(
|
||||
status_code=200,
|
||||
lines=[
|
||||
'event: token',
|
||||
'data: {"conversationId":"c1","content":"hello"}',
|
||||
"",
|
||||
'event: done',
|
||||
'data: {"conversationId":"c1"}',
|
||||
"",
|
||||
],
|
||||
)
|
||||
client = _build_client(monkeypatch)
|
||||
|
||||
response = client.post(
|
||||
"/api/v1/copilot/chat/stream",
|
||||
json={"message": "hi", "conversation_id": "conv-1"},
|
||||
headers={
|
||||
"Authorization": "Bearer keycloak-token",
|
||||
"X-Project-Id": "project-a",
|
||||
},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "text/event-stream" in response.headers["content-type"]
|
||||
assert "event: token" in response.text
|
||||
assert "event: done" in response.text
|
||||
|
||||
captured = _FakeAsyncClient.captured
|
||||
assert captured["method"] == "POST"
|
||||
assert captured["url"].endswith("/chat/stream")
|
||||
assert captured["headers"]["authorization"] == "Bearer keycloak-token"
|
||||
assert captured["headers"]["x-project-id"] == "project-a"
|
||||
assert captured["json"] == {
|
||||
"message": "hi",
|
||||
"conversationId": "conv-1",
|
||||
"userId": "tester",
|
||||
}
|
||||
|
||||
|
||||
def test_chat_stream_emits_error_event_when_upstream_fails(monkeypatch):
|
||||
_FakeAsyncClient.response = _FakeStreamResponse(
|
||||
status_code=401,
|
||||
body=b"upstream unauthorized",
|
||||
)
|
||||
client = _build_client(monkeypatch)
|
||||
|
||||
response = client.post(
|
||||
"/api/v1/copilot/chat/stream",
|
||||
json={"message": "hi"},
|
||||
headers={"Authorization": "Bearer keycloak-token"},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "event: error" in response.text
|
||||
assert "Copilot sidecar request failed" in response.text
|
||||
assert '"status": 401' in response.text
|
||||
Reference in New Issue
Block a user