Add api to query scada
This commit is contained in:
7
main.py
7
main.py
@@ -2103,6 +2103,13 @@ async def query_node_latest_record_by_id(id: str):
|
||||
async def query_link_latest_record_by_id(id: str):
|
||||
return influxdb_api.query_latest_record_by_ID(id, type='link', client=influx_client)
|
||||
|
||||
# query scada
|
||||
@app.get("/queryscadalatestrecordbyid/")
|
||||
async def query_scada_latest_record_by_id(id: str):
|
||||
return influxdb_api.query_latest_record_by_ID(id, type='scada', client=influx_client)
|
||||
|
||||
|
||||
|
||||
# def query_all_record_by_time(query_time: str, bucket: str="realtime_data", client: InfluxDBClient=client) -> tuple:
|
||||
@app.get("/queryallrecordbytime/")
|
||||
async def query_all_record_by_time(querytime: str) -> dict[str, list]:
|
||||
|
||||
Reference in New Issue
Block a user