feat(scada): serve project devices through pooled API
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"contracts": {
|
||||
"server": {
|
||||
"file": "server-v1.openapi.json",
|
||||
"sha256": "b6640fa87909c9a8a8747e9003ace35ea6a209f99f6e1dc15cb0bd5c313dc7c3"
|
||||
"sha256": "f07ecfa4843955bd63a4cdf0d7d336d593f41725a8abc1b0da6cce7ff4fff982"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+153
-106
@@ -1502,6 +1502,37 @@
|
||||
"title": "Page[ProjectSummaryResponse]",
|
||||
"type": "object"
|
||||
},
|
||||
"Page_ScadaDeviceResponse_": {
|
||||
"properties": {
|
||||
"items": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ScadaDeviceResponse"
|
||||
},
|
||||
"title": "Items",
|
||||
"type": "array"
|
||||
},
|
||||
"limit": {
|
||||
"title": "Limit",
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"title": "Offset",
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"title": "Total",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"items",
|
||||
"total",
|
||||
"limit",
|
||||
"offset"
|
||||
],
|
||||
"title": "Page[ScadaDeviceResponse]",
|
||||
"type": "object"
|
||||
},
|
||||
"Page_SensorPlacementSchemeResponse_": {
|
||||
"properties": {
|
||||
"items": {
|
||||
@@ -2224,6 +2255,123 @@
|
||||
"title": "RunSimulationManuallyByDateRest",
|
||||
"type": "object"
|
||||
},
|
||||
"ScadaDeviceResponse": {
|
||||
"description": "Project SCADA metadata keyed by the canonical device identifier.",
|
||||
"properties": {
|
||||
"api_query_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Api Query Id"
|
||||
},
|
||||
"device_id": {
|
||||
"title": "Device Id",
|
||||
"type": "string"
|
||||
},
|
||||
"device_type": {
|
||||
"title": "Device Type",
|
||||
"type": "string"
|
||||
},
|
||||
"latitude": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Latitude"
|
||||
},
|
||||
"link_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Link Id"
|
||||
},
|
||||
"longitude": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Longitude"
|
||||
},
|
||||
"node_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Node Id"
|
||||
},
|
||||
"reliability": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Reliability"
|
||||
},
|
||||
"transmission_frequency": {
|
||||
"title": "Transmission Frequency",
|
||||
"type": "string"
|
||||
},
|
||||
"transmission_mode": {
|
||||
"title": "Transmission Mode",
|
||||
"type": "string"
|
||||
},
|
||||
"x": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X"
|
||||
},
|
||||
"y": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Y"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"device_id",
|
||||
"device_type",
|
||||
"transmission_mode",
|
||||
"transmission_frequency"
|
||||
],
|
||||
"title": "ScadaDeviceResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ScadaReadingBatchItem": {
|
||||
"properties": {
|
||||
"cleaned_value": {
|
||||
@@ -26515,7 +26663,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Page_dict_str__Any__"
|
||||
"$ref": "#/components/schemas/Page_ScadaDeviceResponse_"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -26593,17 +26741,15 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/scada-devices/detail": {
|
||||
"/api/v1/scada-devices/{device_id}": {
|
||||
"get": {
|
||||
"operationId": "get_scada_devices_detail",
|
||||
"operationId": "get_scada_devices_device_id",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "SCADA 设备 ID",
|
||||
"in": "query",
|
||||
"in": "path",
|
||||
"name": "device_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"description": "SCADA 设备 ID",
|
||||
"title": "Device Id",
|
||||
"type": "string"
|
||||
}
|
||||
@@ -26623,8 +26769,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Response Get Scada Devices Detail",
|
||||
"type": "object"
|
||||
"$ref": "#/components/schemas/ScadaDeviceResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -26702,104 +26847,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/scada-info/database-view": {
|
||||
"get": {
|
||||
"description": "使用连接池查询所有SCADA信息",
|
||||
"operationId": "get_scada_info_database_view",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Project-Id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "X-Project-Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/JsonValue"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetails"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Authentication required"
|
||||
},
|
||||
"403": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetails"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Insufficient permission"
|
||||
},
|
||||
"404": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetails"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Resource not found"
|
||||
},
|
||||
"409": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetails"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Resource conflict"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetails"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation error"
|
||||
},
|
||||
"503": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetails"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Dependency unavailable"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"OAuth2PasswordBearer": []
|
||||
}
|
||||
],
|
||||
"summary": "获取SCADA信息",
|
||||
"tags": [
|
||||
"Project Data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/scada-properties": {
|
||||
"get": {
|
||||
"description": "获取指定SCADA点的属性信息",
|
||||
|
||||
Reference in New Issue
Block a user