2025-10-20 15:06:23 +08:00
|
|
|
basePath: /api/v1
|
2024-12-06 16:13:11 +08:00
|
|
|
definitions:
|
2025-10-20 15:06:23 +08:00
|
|
|
network.FailureResponse:
|
|
|
|
|
properties:
|
|
|
|
|
code:
|
|
|
|
|
example: 500
|
|
|
|
|
type: integer
|
|
|
|
|
msg:
|
|
|
|
|
example: failed to get recommend data from redis
|
|
|
|
|
type: string
|
|
|
|
|
payload:
|
|
|
|
|
type: object
|
|
|
|
|
type: object
|
|
|
|
|
network.MeasurementRecommendPayload:
|
2024-12-06 16:13:11 +08:00
|
|
|
properties:
|
2025-10-20 15:06:23 +08:00
|
|
|
input:
|
|
|
|
|
example: transformfeeder1_220.
|
2024-12-06 16:13:11 +08:00
|
|
|
type: string
|
2025-10-20 15:06:23 +08:00
|
|
|
offset:
|
2025-10-20 17:30:55 +08:00
|
|
|
example: 21
|
2024-12-06 16:13:11 +08:00
|
|
|
type: integer
|
2025-10-20 15:06:23 +08:00
|
|
|
recommended_list:
|
|
|
|
|
example:
|
|
|
|
|
- '["I_A_rms"'
|
2025-10-20 17:30:55 +08:00
|
|
|
- ' "I_B_rms"'
|
|
|
|
|
- '"I_C_rms"]'
|
2025-10-20 15:06:23 +08:00
|
|
|
items:
|
|
|
|
|
type: string
|
|
|
|
|
type: array
|
2024-12-06 16:13:11 +08:00
|
|
|
type: object
|
2025-10-20 15:06:23 +08:00
|
|
|
network.MeasurementRecommendRequest:
|
2024-12-06 16:13:11 +08:00
|
|
|
properties:
|
2025-10-20 15:06:23 +08:00
|
|
|
input:
|
|
|
|
|
example: trans
|
|
|
|
|
type: string
|
2024-12-06 16:13:11 +08:00
|
|
|
type: object
|
2025-10-27 16:47:04 +08:00
|
|
|
network.RealTimeDataPayload:
|
|
|
|
|
properties:
|
|
|
|
|
sub_pos:
|
|
|
|
|
description: TODO 增加example tag
|
|
|
|
|
type: object
|
|
|
|
|
type: object
|
2024-12-06 16:13:11 +08:00
|
|
|
network.SuccessResponse:
|
|
|
|
|
properties:
|
2025-10-20 15:06:23 +08:00
|
|
|
code:
|
|
|
|
|
example: 200
|
|
|
|
|
type: integer
|
|
|
|
|
msg:
|
|
|
|
|
example: success
|
|
|
|
|
type: string
|
2024-12-06 16:13:11 +08:00
|
|
|
payload:
|
|
|
|
|
type: object
|
|
|
|
|
type: object
|
2025-10-20 15:06:23 +08:00
|
|
|
host: localhost:8080
|
2024-12-06 16:13:11 +08:00
|
|
|
info:
|
2025-10-20 15:06:23 +08:00
|
|
|
contact:
|
|
|
|
|
email: douxu@clea.com.cn
|
|
|
|
|
name: douxu
|
|
|
|
|
url: http://www.swagger.io/support
|
|
|
|
|
description: 实时数据计算和模型运行服务的 API 服务
|
|
|
|
|
license:
|
|
|
|
|
name: Apache 2.0
|
|
|
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
|
|
|
title: ModelRT 实时模型服务 API 文档
|
|
|
|
|
version: "1.0"
|
2024-12-06 16:13:11 +08:00
|
|
|
paths:
|
2025-10-27 16:47:04 +08:00
|
|
|
/data/realtime:
|
|
|
|
|
get:
|
|
|
|
|
consumes:
|
|
|
|
|
- application/json
|
|
|
|
|
description: 根据用户输入的组件token,从 dataRT 服务中持续获取测点实时数据
|
|
|
|
|
parameters:
|
|
|
|
|
- description: 测量点唯一标识符 (e.g.grid_1:zone_1:station_1:transformfeeder1_220.I_A_rms)
|
|
|
|
|
in: query
|
|
|
|
|
name: token
|
|
|
|
|
required: true
|
|
|
|
|
type: string
|
|
|
|
|
- description: 查询起始时间 (Unix时间戳, e.g., 1761008266)
|
|
|
|
|
in: query
|
|
|
|
|
name: begin
|
|
|
|
|
required: true
|
|
|
|
|
type: integer
|
|
|
|
|
- description: 查询结束时间 (Unix时间戳, e.g., 1761526675)
|
|
|
|
|
in: query
|
|
|
|
|
name: end
|
|
|
|
|
required: true
|
|
|
|
|
type: integer
|
|
|
|
|
produces:
|
|
|
|
|
- application/json
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: 返回实时数据成功
|
|
|
|
|
schema:
|
|
|
|
|
allOf:
|
|
|
|
|
- $ref: '#/definitions/network.SuccessResponse'
|
|
|
|
|
- properties:
|
|
|
|
|
payload:
|
|
|
|
|
$ref: '#/definitions/network.RealTimeDataPayload'
|
|
|
|
|
type: object
|
|
|
|
|
"400":
|
|
|
|
|
description: 返回实时数据失败
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/network.FailureResponse'
|
|
|
|
|
summary: 获取实时测点数据
|
|
|
|
|
tags:
|
|
|
|
|
- RealTime Component
|
2025-10-20 17:30:55 +08:00
|
|
|
/measurement/recommend:
|
|
|
|
|
get:
|
2025-10-20 15:06:23 +08:00
|
|
|
consumes:
|
|
|
|
|
- application/json
|
|
|
|
|
description: 根据用户输入的字符串,从 Redis 中查询可能的测量点或结构路径,并提供推荐列表。
|
|
|
|
|
parameters:
|
2025-10-20 17:30:55 +08:00
|
|
|
- description: 查询输入参数,例如 'trans' 或 'transformfeeder1_220.'
|
2025-10-20 15:06:23 +08:00
|
|
|
in: body
|
|
|
|
|
name: request
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/network.MeasurementRecommendRequest'
|
|
|
|
|
produces:
|
|
|
|
|
- application/json
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
2025-10-20 17:30:55 +08:00
|
|
|
description: 返回推荐列表成功
|
|
|
|
|
schema:
|
|
|
|
|
allOf:
|
|
|
|
|
- $ref: '#/definitions/network.SuccessResponse'
|
|
|
|
|
- properties:
|
|
|
|
|
payload:
|
|
|
|
|
$ref: '#/definitions/network.MeasurementRecommendPayload'
|
|
|
|
|
type: object
|
|
|
|
|
"400":
|
|
|
|
|
description: 返回推荐列表失败
|
2025-10-20 15:06:23 +08:00
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/network.FailureResponse'
|
|
|
|
|
summary: 测量点推荐(搜索框自动补全)
|
|
|
|
|
tags:
|
2025-10-20 17:30:55 +08:00
|
|
|
- Measurement Recommend
|
2024-12-06 16:13:11 +08:00
|
|
|
/model/diagram_load/{page_id}:
|
|
|
|
|
get:
|
|
|
|
|
consumes:
|
|
|
|
|
- application/json
|
|
|
|
|
description: load circuit diagram info by page id
|
|
|
|
|
parameters:
|
|
|
|
|
- description: page ID
|
|
|
|
|
in: path
|
|
|
|
|
name: page_id
|
|
|
|
|
required: true
|
|
|
|
|
type: integer
|
|
|
|
|
produces:
|
|
|
|
|
- application/json
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: request process success
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/network.SuccessResponse'
|
|
|
|
|
"400":
|
|
|
|
|
description: request process failed
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/network.FailureResponse'
|
|
|
|
|
summary: load circuit diagram info
|
|
|
|
|
tags:
|
|
|
|
|
- load circuit_diagram
|
|
|
|
|
swagger: "2.0"
|