From 6de556c459fb048f7de927500583af1e3dcaa982 Mon Sep 17 00:00:00 2001 From: YuyueBalabala <3116233097@qq.com> Date: Fri, 3 Nov 2023 18:10:00 +0800 Subject: [PATCH] doc: Adjust neuron/ekuiper/neuronex API zh_CN. --- neuronex/zh_CN/api/api.md | 14 +- neuronex/zh_CN/api/configuration.md | 2286 ---- neuronex/zh_CN/api/error-code.md | 2 +- neuronex/zh_CN/api/jwt.md | 13 +- neuronex/zh_CN/api/metrics.md | 88 - neuronex/zh_CN/api/neuronex-swagger.json | 12694 +++++++++++++++++++++ neuronex/zh_CN/api/rw.md | 142 - 7 files changed, 12710 insertions(+), 2529 deletions(-) delete mode 100644 neuronex/zh_CN/api/configuration.md delete mode 100644 neuronex/zh_CN/api/metrics.md create mode 100644 neuronex/zh_CN/api/neuronex-swagger.json delete mode 100644 neuronex/zh_CN/api/rw.md diff --git a/neuronex/zh_CN/api/api.md b/neuronex/zh_CN/api/api.md index eb16e0d..0259c7c 100644 --- a/neuronex/zh_CN/api/api.md +++ b/neuronex/zh_CN/api/api.md @@ -1,18 +1,12 @@ # HTTP API -IIoT平台或其他监控应用可以通过使用提供的HTTP-API来监视和控制Neuron设备。这些API的关键功能如下: - -[获取数据:](./rw.md) HTTP-API允许平台监视与IIoT平台连接的设备所获取的数据。这使得能够实时监控传感器读数、操作参数和设备状态。 - -[控制命令:](./rw.md) API还支持向Neuron设备发送控制命令,使平台能够远程控制和管理设备。这实现了对设备功能的无缝管理。 - -[远程设置和配置:](./configuration.md) 平台可以通过HTTP-API远程设置和配置设备连接。这确保了在无需物理访问的情况下方便高效地管理设备。[插件设置](./plugin-setting.md) 也可用。 +IIoT平台或其他监控应用可以通过使用提供的HTTP-API来监视和控制NeuronEX设备。这些API的关键功能如下: [JWT身份验证:](./jwt.md) API采用JWT身份验证,确保IIoT平台或监控应用与Neuron设备之间的安全通信和身份验证。这增强了系统的整体安全性。 -[Prometheus兼容指标:](./metrics.md) API提供与Prometheus兼容的指标数据。这使得可以轻松与Prometheus监控工具集成,便于对设备指标进行有效监控和分析。 +[数据类型描述:](./data-type.md) 为了确保数据的表示和解释清晰一致,API描述了使用的数据类型。这促进了IIoT平台或监控应用中数据的无缝集成和分析。 -[错误代码描述:](./data-type.md) API包括全面的错误代码描述,提供有关遇到的错误的性质和原因的信息。这有助于有效的故障排除和问题解决。 +[数据采集功能错误代码描述:](./error-code.md) API包括全面的错误代码描述,提供有关遇到的错误的性质和原因的信息。这有助于有效的故障排除和问题解决。 -[数据类型描述:](./error-code.md) 为了确保数据的表示和解释清晰一致,API描述了使用的数据类型。这促进了IIoT平台或监控应用中数据的无缝集成和分析。 +[API文档:](./neuronex-swagger.json)包括系统,数据采集及数据统计功能的相关API。 diff --git a/neuronex/zh_CN/api/configuration.md b/neuronex/zh_CN/api/configuration.md deleted file mode 100644 index e68a5fa..0000000 --- a/neuronex/zh_CN/api/configuration.md +++ /dev/null @@ -1,2286 +0,0 @@ -# 配置 - -Neuron 将为 IIoT 平台提供一系列 API 服务,用于查询基本信息、控制网关行为或设置轮询配置。 IIoT 平台必须通过向 Neuron 发送请求消息来启动通信。 通过返回,Neuron 将返回所需的信息或执行相应的操作。 如果有错误,将返回一个错误代码来说明失败的原因。 - -## Ping - -*POST* **/api/v2/ping** - -### 响应状态 - -* 200 OK - -## 登录 - -*POST* **/api/v2/login** - -### 请求头部 - -**Content-Type** application/json - -### 响应状态 - -* 200 OK -* 401 - * 1004, 缺少令牌 - * 1005, 解码令牌错误 -* 403 - * 1006, 令牌过期 - * 1007, 验证令牌错误 - * 1008, 无效令牌 - -### 请求体 - -```json -{ - "name": "admin", - "pass": "0000" -} -``` - -### 响应 - -```json -{ - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzcyODcxNjMsImlhdCI6MTYzNzIwMDc2MywiaXNzIjoiRU1RIFRlY2hub2xvZ2llcyBDby4sIEx0ZCBBbGwgcmlnaHRzIHJlc2VydmVkLiIsInBhc3MiOiIwMDAwIiwidXNlciI6ImFkbWluIn0.2EZzPC9djErrCeYNrK2av0smh-eKxDYeyu7cW4MyknI" -} -``` - -## 更改密码 - -*POST* **/api/v2/password** - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 401 - * 1004, 缺少令牌 - * 1005, 解码令牌错误 - * 1012, 密码长度太短或太长 - * 1013, 密码重复 -* 403 - * 1006, 令牌过期 - * 1007, 验证令牌错误 - * 1008, 无效令牌 - -### 请求体 - -```json -{ - "name": "admin", - "old_pass": "01234", - "new_pass": "56789" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 添加 Node - -*POST* **/api/v2/node** - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2001 node 类型无效 -* 404 - * 2301 未找到插件库 -* 409 - * 2002 node 不存在 - -### 请求体 - -```json -{ - //node name - "name": "modbus-tcp-node", - //plugin name - "plugin": "Modbus TCP" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 删除 Node - -*Delete* /api/v2/node - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2003 node not exist - -### 请求体 - -```json -{ - //node name - "name": "modbus-tcp-node" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 更新 Node - -*PUT* **/api/v2/node** - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2013 node 不允许更新 - * 2015 node 名称不允许为空 -* 404 - * 2003 node 不存在 -* 409 - * 2002 node 已存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "name": "modbus-node" - "new_name": "modbus-tcp-node" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Node - -*GET* /api/v2/node - -### 请求参数 - -**type** 必需 - -**plugin** 可选 - -**node** 可选 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -### 响应 - -```json -{ - "nodes": [ - { - //node name - "name": "sample-driver-adapter", - //plugin name - "plugin": "Modbus TCP" - }, - { - "name": "modbus-tcp-adapter", - "plugin": "Modbus TCP" - } - ] -} -``` - -## 配置 Node - -*POST* /api/v2/node/setting - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2003 node 不存在 - * 2004 node 配置无效 - -### 请求体 - -```json -//The parameter fields in json fill in different fields according to different plugins -{ - //node name - "node": "modbus-node", - "params": { - "param1": 1, - "param2": "1.1.1.1", - "param3": true, - "param4": 11.22 - } -} -``` - -:::tip -每个插件的配置参数具体可参考 [插件设置](./plugin-setting.md)。 -::: - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Node 配置 - -*GET* /api/v2/node/setting - -### 请求参数 - -**node** 必需 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - * 2005 node 配置未发现 -* 404 - * 2003 node 不存在 - -### 响应 - -```json -//The parameter fields in json fill in different fields according to different plugins -{ - "node": "modbus-node", - "params": { - "param1": "1.1.1.1", - "param2": 502 - } -} -``` - -## 控制 Node - -*POST* /api/v2/node/ctl - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 请求状态 - -* 200 OK -* 409 - * 2006 node not ready - * 2007 node is running - * 2008 node not running - * 2009 node is stopped - -### 请求体 - -```json -{ - //node name - "node": "modbus-node", - //0 start, 1 stop - "cmd": 0 -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Node 状态 - -*GET* /api/v2/node/state - -### 请求参数 - -**node** optional - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -### 响应 - -```json -{ - "states": [ - { - // node name - "node": "modbus-node1", - //running state - "running": 2, - //link state - "link": 1, - //average round trip time communicating with devices - "rtt": 100 - }, - { - "node": "modbus-node2", - "running": 1, - "link": 0, - "rtt": 9999 - } - ] -} -``` - -## 添加 Group - -*POST* /api/v2/group - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2003 node not exist -* 409 - * 2103 group not allow - -### 请求体 - -```json -{ - //group name - "group": "gconfig1", - //node name - "node": "modbus-node", - //read/upload interval(ms) - "interval": 10000 -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 删除 Group - -*DELETE* /api/v2/group - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 412 - * 2101 group already subscribed -* 404 - * 2003 node not exist - * 2101 group not exist - -### 请求体 - -```json -{ - //node name - "node": "modbus-node", - //group name - "group": "gconfig1" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 更新 Group - -*PUT* /api/v2/group - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2003 node not exist - * 2106 group not exist -* 409 - * 2104 group exist - -### 请求体 - -```json -{ - //node name - "node": "node1", - //group name - "group": "group", - //read/upload interval(ms) - "interval": 20000 -} -``` - -更新 group name: -```json -{ - //node name - "node": "modbus-node", - //group name - "group": "gconfig1", - //group new name - "new_name": "group1" -} -``` - -更新 group interval: -```json -{ - //node name - "node": "modbus-node", - //group name - "group": "gconfig1", - //read/upload interval(ms) - "interval": 10000 -} -``` - -同时更新 group name 和 interval: -```json -{ - //node name - "node": "modbus-node", - //group name - "group": "gconfig1", - //group new name - "new_name": "group1", - //read/upload interval(ms) - "interval": 10000 -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Group - -*GET* /api/v2/group - -### 请求参数 - -**node** 可选 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -### 响应 - -````json -{ - "groups": [ - { - //group name - "name": "config_modbus_tcp_sample_2", - //read/upload interval(ms) - "interval": 2000, - //tag count - "tag_count": 0 - }, - { - "name": "gconfig1", - "interval": 10000, - "tag_count": 0 - } - ] -} -```` - -## 添加 Tag - -*POST* /api/v2/tags - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 206 - * 2202 tag name conflict - * 2203 tag attribute not support - * 2204 tag type not support - * 2205 tag address format invalid -* 404 - * 2003 node not exist - -### 请求体 - -```json -{ - //node name - "node": "modbus-node", - //group name - "group": "config_modbus_tcp_sample_2", - "tags": [ - { - //tag name - "name": "tag1", - //tag address - "address": "1!400001", - //tag attribute - "attribute": 8, - //tag type - "type": 4, - //optional, float/double precision, optional(0-17) - "precision": 0, - //optional, decimal - "decimal": 0, - //optional, description - "description": "", - //optional, when the attribute is static,the value field needs to be added. - "value": 12 - }, - { - "name": "tag2", - "address": "1!00001", - "attribute": 3, - "type": 3, - "decimal": 0.01 - }, - { - "name": "tag3", - "address": "1!400009", - "attribute": 3, - "type": 9, - "precision": 3 - }, - { - "name": "static_tag", - "address": "", - "attribute": 10, - "type": 1, - "description": "It is a static tag", - "value": 42 - } - ] -} -``` - -### 响应 - -```json -{ - "index": 1, - "error": 0 -} -``` - -## 获取 Tag - -*GET* /api/v2/tags - -### 请求参数 - -**node** 必需 - -**group** 必需 - -**name** 可选 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2003 node 不存在 - -### 响应 - -```json -{ - "tags": [ - { - //tag name - "name": "tag1", - //tag type - "type": 4, - //tag address - "address": "1!400001", - //tag attribute - "attribute": 8, - //description - "description": "", - //float/double precision - "precison": 0, - //decimal - "decimal": 0, - //optional, when the attribute is static - "value": 12 - }, - { - "name": "tag2", - "type": 14, - "address": "1!00001", - "attribute": 3, - "description": "", - "precison": 0, - "decimal": 0, - }, - { - "name": "tag3", - "type": 11, - "address": "1!400009", - "attribute": 3, - "description": "", - "precison": 0, - "decimal": 0, - } - ] -} -``` - -## 更新 Tag - -*PUT* /api/v2/tags - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 206 - * 2201 tag 不存在 - * 2202 tag 名字冲突 - * 2203 tag 属性不支持 - * 2204 tag 类型不支持 - * 2205 tag 地址格式无效 -* 404 - * 2003 node 不存在 - * 2106 group 不存在 - -### 请求体 - -```json -{ - //node name - "node": "modbus-tcp-test", - //group name - "group": "group1", - "tags": [ - { - //tag name - "name": "tag1", - //tag type - "type": 8, - //tag attribute - "attribute": 0, - //tag address - "address": "1!400001", - //description - "description":"", - //float/double precision - "precison": 0, - //decimal - "decimal": 0, - //when the attribute is static,the value field needs to be added. - "value": 12 - }, - { - "name": "tag2", - "type": 6, - "attribute": 0, - "address": "1!400002", - "description":"", - "precison": 0, - "decimal": 0, - }, - { - "name": "static_tag", - "address": "", - "attribute": 10, - "type": 1, - "description":"", - "precison": 0, - "decimal": 0, - "value": 42 - } - ] -} -``` - -### 响应 - -```json -{ - "error": 0, - "index": 1 -} -``` - -## 删除 Tag - -*DELETE* /api/v2/tags - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2003 node 不存在 - -### 请求体 - -```json -{ - //group name - "group": "config_modbus_tcp_sample_2", - //node name - "node": "modbus-node", - //tag names - "tags": [ - "tag1", - "tag2" - ] -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 添加插件 - -*POST* /api/v2/plugin - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -* 400 - - * 2302 库信息无效 - -### 请求体 - -```json -{ - //plugin library name - "library": "plugin_name.so" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 删除插件 - -*DELETE* /api/v2/plugin - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -### 请求体 - -```json -{ - //plugin name - "plugin": "modbus-tcp" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取插件 - -*GET* /api/v2/plugin - -### 请求参数 - -**plugin** optional - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -### 响应 - -```json -{ - "plugins": [ - { - //plugin kind - "kind": 1, - //node type - "node_type": 1, - //plugin name - "name": "Modbus TCP", - //plugin library name - "library": "libplugin-modbus-tcp.so", - "description": "description", - "description_zh": "描述", - "schema": "modbus-tcp" - }, - { - "kind": 1, - "node_type": 2, - "name": "MQTT", - "library": "libplugin-mqtt.so", - "description": "Neuron northbound MQTT plugin bases on NanoSDK.", - "description_zh": "基于 NanoSDK 的 Neuron 北向应用 MQTT 插件", - "schema": "mqtt" - } - ] -} -``` - -## 获取插件 Schema - -*GET* /api/v2/schema - -### 请求参数 - -**schema_name** 必需 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK - -### 响应 - -```json -{ - "tag_regex": [ - { - "type": 3, - "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" - }, - { - "type": 4, - "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" - }, - { - "type": 5, - "regex": "^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$" - }, - { - "type": 6, - "regex": "^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$" - }, - { - "type": 7, - "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" - }, - { - "type": 8, - "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" - }, - { - "type": 9, - "regex": "^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$" - }, - { - "type": 10, - "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" - }, - { - "type": 11, - "regex": "^[0-9]+!([0-1][0-9]+|[3-4][0-9]+\\.([0-9]|[0-1][0-5]))$" - }, - { - "type": 13, - "regex": "^[0-9]+![3-4][0-9]+\\.[0-9]+(H|L|)$" - } - ], - "group_interval": 1000, - "connection_mode": { - "name": "Connection Mode", - "name_zh": "连接模式", - "description": "Neuron as the client, or as the server", - "description_zh": "Neuron 作为客户端或服务端", - "attribute": "required", - "type": "map", - "default": 0, - "valid": { - "map": [ - { - "key": "Client", - "value": 0 - }, - { - "key": "Server", - "value": 1 - } - ] - } - }, - "interval": { - "name": "Send Interval", - "name_zh": "指令发送间隔", - "description": "Send reading instruction interval(ms)", - "description_zh": "发送读指令时间间隔,单位为毫秒", - "attribute": "required", - "type": "int", - "default": 20, - "valid": { - "min": 0, - "max": 3000 - } - }, - "host": { - "name": "IP Address", - "name_zh": "IP地址", - "description": "Local IP in server mode, remote device IP in client mode", - "description_zh": "服务端模式中填写本地 IP,客户端模式中填写目标设备 IP", - "attribute": "required", - "type": "string", - "valid": { - "regex": "/^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$/", - "length": 30 - } - }, - "port": { - "name": "Port", - "name_zh": "端口号", - "description": "Local port in server mode, remote device port in client mode", - "description_zh": "服务端模式中填写本地端口号,客户端模式中填写远程设备端口号", - "attribute": "required", - "type": "int", - "default": 502, - "valid": { - "min": 1, - "max": 65535 - } - }, - "timeout": { - "name": "Connection Timeout", - "name_zh": "连接超时时间", - "description": "Connection timeout(ms)", - "description_zh": "连接超时时间,单位为毫秒", - "attribute": "required", - "type": "int", - "default": 3000, - "valid": { - "min": 1000, - "max": 65535 - } - } -} -``` - -## 订阅 - -*POST* /api/v2/subscribe - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2106 group 不存在 - -### 请求体 - -```json -{ - //app name - "app": "mqtt", - //driver name - "driver": "modbus-tcp", - //driver node group name - "group": "group-1", - //when using the MQTT plugin, the topic field needs to be added - "params": { - "topic": "/neuron/mqtt/group-1" - } -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 订阅多个组 - -*POST* /api/v2/subscribes - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2106 group 不存在 - -### 请求体 - -```json -{ - //app name - "app": "mqtt", - "groups": [ - { - //driver name - "driver": "modbus1", - //group name - "group": "group1", - //optional, depends on plugins - "params": { - //when using the MQTT plugin, the topic key is the upload topoic - "topic": "/neuron/mqtt/modbus1/group1" - } - }, - { - "driver": "modbus2", - "group": "group2", - "params": { - "topic": "/neuron/mqtt/modbus2/group2" - } - } - ] -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 更新订阅参数 - -*PUT* /api/v2/subscribe - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2106 group 不存在 - -### 请求体 - -```json -{ - //app name - "app": "mqtt", - //driver name - "driver": "modbus-tcp", - //driver node group name - "group": "group-1", - "params": { - //when using the MQTT plugin, the topic key is the upload topic - "topic": "/neuron/mqtt/group-1" - } -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 取消订阅 - -*DELETE* /api/v2/subscribe - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2106 group 不存在 - -### 请求体 - -```json -{ - //app name - "app": "mqtt", - //driver name - "driver": "modbus-tcp", - //driver node group name - "group": "group-1", - //optional, when using the MQTT plugin, the topic field needs to be added - "params": { - "topic": "/neuron/mqtt/group-1" - } -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取订阅的 Group - -*GET* /api/v2/subscribe - -### 请求参数 - -**app** 必需 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 -* 400 - -### 响应 - -```json -{ - "groups": [ - { - //driver name - "driver": "modbus-tcp", - //group name - "group": "group-1", - //optional, when using the MQTT plugin, the topic field needs to be added - "params": { - "topic": "/neuron/mqtt/group-1" - } - }, - { - //driver name - "driver": "modbus-tcp", - //group name - "group": "group-2", - //when using the MQTT plugin, the topic field needs to be added - "params": { - "topic": "/neuron/mqtt/group-2" - } - } - ] -} -``` - -## 获取版本信息 - -*GET* /api/v2/version - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 -* 500 - * 1001 服务器内部错误 - -### 响应 - -```json -{ - "build_date": "2022-06-01", - "revision": "99e2184+dirty", // dirty 表示有未提交的更改 - "version": "2.4.0" -} -``` - -## 上传 License - -*POST* /api/v2/license - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 - * 0 OK - * 2402 license 过期 -* 400 - * 2401 license 无效 -* 500 - * 1001 服务器内部错误 - -### 请求体 - -```json -{ - "license": "-----BEGIN CERTIFICATE-----\nMIID2TCCAsGgAwIBAgIEATSJqjA....." -} -``` - -### 响应 - -```json -{ - "error": 2401 -} -``` - -## 获取 License 信息 - -*GET* /api/v2/license - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2400 license 未找到 -* 500 - * 1001 服务器内部错误 - -### 响应 - -```json -{ - "valid_until": "2023-03-15 08:11:19", - "valid_since": "2022-03-15 08:11:19", - "valid": false, - "max_nodes": 1, - "max_node_tags": 1, - "used_nodes": 12, - "used_tags": 846, - "license_type": "retail", - "error": 0, - "enabled_plugins": [ - "MODBUS TCP Advance", - "OPC UA" - ], - "hardware_token": "I+kZidSifiyVSbz0/EgcM6AcefnlfR4IU19ZZUnTS18=", - "object": "emq", - "email_address": "emq@emqx.io" -} -``` - -## 下载日志文件 - -*GET* /api/v2/logs - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 1011 文件不存在 - * 1014 执行指令失败 -* 500 - * 1001 内部错误 - -### 响应 - -如果有错误返回时响应: - -```json -{ - "error": 1014 -} -``` - -## 修改节点日志等级 - -*PUT* /api/v2/log/level - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 404 - * 2003 node 不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - // node name - "node": "modbus-tcp" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -:::tip -调用接口修改节点的日志等级为 debug,十分钟左右自动切回默认等级。 -::: - -## 下载文件 - -*GET* /api/v2/file - -### 请求头部 - -**Authorization** Bearer \ - -### 请求参数 - -**file_path** 必需,文件的绝对路径 - -### 响应状态 - -* 404 - * 1011 文件不存在 - * 4101 文件打开失败 - * 4102 文件读失败 - -### 响应 - -当正常响应时,返回文件内容并下载文件。 - -当错误响应时,返回对应的错误码。 - -```json -{ - "error": 1011 -} -``` - -## 获取文件列表 - -*GET* /api/v2/file/info - -### 请求头部 - -**Authorization** Bearer \ - -### 请求参数 - -**dir_path** 必需,目录的绝对路径 - -### 响应状态 - -* 404 - * 1011 文件不存在 - * 4101 文件打开失败 - -### 响应 - -当正确响应时,响应文件名称、文件大小、文件创建时间和文件更新时间。 - -```json -{ - "files": [ - { - "name": "neuron", - "size": 4096, - "ctime": "Wed Jan 4 02:38:12 2023", - "mtime": "Mon Dec 26 09:48:42 2022" - }, - { - "name": "test.txt", - "size": 13, - "ctime": "Wed Jan 4 02:38:12 2023", - "mtime": "Mon Dec 26 09:48:42 2022" - } - ] -} -``` - -当错误响应时,响应对应的错误码。 - -```json -{ - "error": 1011 -} -``` - -## 添加 Template - -*POST* /api/v2/template - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 206 - * 2203 tag 属性不支持 - * 2204 tag 类型不支持 - * 2205 tag 地址格式无效 - * 2206 tag 名字太长 - * 2207 tag 地址太长 - * 2208 tag 描述太长 - * 2209 tag 精度无效 -* 400 - * 2105 group 参数无效 - * 2107 group 名称太长 - * 2502 模板名字太长 - * 3013 插件名字太长 - * 3016 插件不支持模板 -* 404 - * 3014 插件不存在 -* 409 - * 2104 group 已存在 - * 2202 tag 名称冲突 - * 2500 模板已存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "name": "rtu template", - "plugin": "Modbus RTU", - "groups": [ - { - "name": "group1", - "interval": 2000, - "tags": [ - { - "name": "tag1", - "type": 4, - "address": "1!400001", - "attribute": 1, - "precison": 1, - "decimal": 0 - }, - { - "name": "tag2", - "type": 11, - "address": "1!400009", - "attribute": 3 - } - ] - } - ] -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 删除 Template - -*DELETE* /api/v2/template - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 请求参数 - -**name** 可选,要删除的模板的名字。若未提供该参数,则删除所有模板。 - -### 响应状态 - -* 200 OK -* 404 - * 2501 模板不存在 -* 500 - * 1010 程序繁忙 - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Template - -*GET* /api/v2/template - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 请求参数 - -**name** 可选,要获取的 template 的名字。 - -### 响应状态 - -* 200 OK -* 400 - * 1003 请求 param 无效 -* 404 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 响应 - -未指定 **name** 参数时,则返回所有模板的列表。 - -```json -{ - "templates": [ - { - "name": "template1", - "plugin": "modbus tcp" - }, - { - "name": "template2", - "plugin": "opc ua" - } - ] -} -``` - -如果请求指定了 **name** 参数,则返回相应模板的详细信息。 - -```json -{ - "name": "rtu template", - "plugin": "Modbus RTU", - "groups": [ - { - "name": "group1", - "interval": 2000, - "tags": [ - { - "name": "tag1", - "type": 4, - "address": "1!400001", - "attribute": 1, - "precison": 1, - "decimal": 0 - }, - { - "name": "tag2", - "type": 11, - "address": "1!400009", - "attribute": 3 - } - ] - } - ] -} -``` - -## 实例化 Template - -*POST* /api/v2/template/inst - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2304 库打开失败 - * 2502 模板名字太长 -* 404 - * 2301 库未找到 - * 2501 模板不存在 -* 409 - * 2002 node 已存在 - * 2307 插件不允许实例化 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "name": "rtu template", - "node": "modbus-rtu", -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 多节点实例化 Template - -*POST* /api/v2/template/instances - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2304 库打开失败 - * 2502 模板名字太长 -* 404 - * 2301 库未找到 - * 2501 模板不存在 -* 409 - * 2002 node 已存在 - * 2307 插件不允许实例化 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "nodes": [ - { - "name": "rtu template", - "node": "node1" - }, - { - "name": "tcp template", - "node" "node2" - } - ] -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 添加 Template Group - -*POST* /api/v2/template/group - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2105 group 参数无效 - * 2107 group 名称太长 - * 2502 模板名字太长 -* 404 - * 2501 模板不存在 -* 409 - * 2104 group 已存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "template": "modbus-template", - "group": "group1", - "interval": 10000 -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 删除 Template Group - -*DELETE* /api/v2/template/group - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 2107 group 名称太长 - * 2502 模板名字太长 -* 404 - * 2106 group 不存在 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "template": "modbus-template", - "group": "group1" -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 更新 Template Group - -*PUT* /api/v2/template/group - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - - -* 200 OK -* 400 - * 2105 group 参数无效 - * 2107 group 名称太长 - * 2502 模板名字太长 -* 404 - * 2106 group 不存在 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -更新 group name: -```json -{ - //template name - "template": "modbus-template", - //group name - "group": "gconfig1", - //group new name - "new_name": "group1" -} -``` - -更新 group interval: -```json -{ - //template name - "template": "modbus-template", - //group name - "group": "gconfig1", - //interval(ms) - "interval": 10000 -} -``` - -同时更新 group name 和 interval: -```json -{ - //template name - "template": "modbus-template", - //group name - "group": "gconfig1", - //group new name - "new_name": "group1", - //interval(ms) - "interval": 10000 -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Template Group - -*GET* /api/v2/template/group - -### 请求参数 - -**name** 必需,template 的名字。 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 1003 请求 param 无效 -* 404 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 响应 - -````json -{ - "groups": [ - { - "name": "group1", - "interval": 2000, - "tag_count": 2 - } - ] -} -```` - -## 添加 Template Tag - -*POST* /api/v2/template/tag - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 206 - * 2203 tag 属性不支持 - * 2204 tag 类型不支持 - * 2205 tag 地址格式无效 - * 2206 tag 名字太长 - * 2207 tag 地址太长 - * 2208 tag 描述太长 - * 2209 tag 精度无效 -* 400 - * 2107 group 名称太长 - * 2502 模板名字太长 -* 404 - * 2106 group 不存在 - * 2501 模板不存在 -* 409 - * 2202 tag 名称冲突 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "template": "modbus-template", - "group": "group1", - "tags": [ - { - "name": "tag1", - "address": "1!400001", - "attribute": 8, - "type": 4, - "precision": 0, - "decimal": 0, - "description": "", - "value": 12 - }, - { - "name": "tag2", - "address": "1!00001", - "attribute": 3, - "type": 3, - "decimal": 0.01 - } - ] -} -``` - -### 响应 - -```json -{ - "index": 2, - "error": 0 -} -``` - -## 更新 Template Tag - -*PUT* /api/v2/template/tag - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 206 - * 2201 tag 不存在 - * 2203 tag 属性不支持 - * 2204 tag 类型不支持 - * 2205 tag 地址格式无效 - * 2206 tag 名字太长 - * 2207 tag 地址太长 - * 2208 tag 描述太长 - * 2209 tag 精度无效 -* 400 - * 2107 group 名称太长 - * 2502 模板名字太长 -* 404 - * 2106 group 不存在 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "template": "modbus-template", - "group": "group1", - "tags": [ - { - "name": "tag1", - "address": "1!400001", - "attribute": 8, - "type": 4, - "precision": 0, - "decimal": 0, - "description": "", - "value": 12 - }, - { - "name": "tag2", - "address": "1!00001", - "attribute": 3, - "type": 3, - "decimal": 0.01 - } - ] -} -``` - -### 响应 - -```json -{ - "index": 2, - "error": 0 -} -``` - -## 删除 Template Tag - -*DELETE* /api/v2/template/tag - -### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 206 - * 2206 tag 名字太长 -* 400 - * 2107 group 名称太长 - * 2502 模板名字太长 -* 404 - * 2106 group 不存在 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - -### 请求体 - -```json -{ - "template": "modbus-template", - "group": "group1", - "tags": [ - "tag1", - "tag2" - ] -} -``` - -### 响应 - -```json -{ - "error": 0 -} -``` - -## 获取 Template Tag - -*GET* /api/v2/template/tag - -### 请求参数 - -**template** 必需,template 的名字。 - -**group** 必需,group 的名字。 - -**name** 可选,用于过滤 tag 名字。 - -### 请求头部 - -**Authorization** Bearer \ - -### 响应状态 - -* 200 OK -* 400 - * 1003 请求 param 无效 -* 404 - * 2106 group 不存在 - * 2501 模板不存在 -* 500 - * 1001 内部错误 - * 1010 程序繁忙 - - -### 响应 - -```json -{ - "tags": [ - { - "name": "tag1", - "type": 4, - "address": "1!400001", - "attribute": 8, - "description": "", - "precision": 0, - "decimal": 0, - "value": 12 - }, - { - "name": "tag2", - "type": 14, - "address": "1!00001", - "attribute": 3, - "description": "", - "precison": 0, - "decimal": 0, - } - ] -} -``` diff --git a/neuronex/zh_CN/api/error-code.md b/neuronex/zh_CN/api/error-code.md index e805055..b77e74c 100644 --- a/neuronex/zh_CN/api/error-code.md +++ b/neuronex/zh_CN/api/error-code.md @@ -1,6 +1,6 @@ # 错误代码 -本文档描述了 Neuron 在调用 http api 和 mqtt api 时会响应的错误码。 +本文档描述了数据采集功能在调用 http api 和 mqtt api 时会响应的错误码。 ## api 请求错误代码 diff --git a/neuronex/zh_CN/api/jwt.md b/neuronex/zh_CN/api/jwt.md index c4e5581..fdc6152 100644 --- a/neuronex/zh_CN/api/jwt.md +++ b/neuronex/zh_CN/api/jwt.md @@ -1,6 +1,15 @@ # 自定义 JWT -在 Neuron 中调用 API 时,需先调用登录接口生成 JWT,再调用其他接口进行 JWT 验证。默认生成的 JWT 过期时间为一小时,可以自己生成 JWT,自定义过期时间。 +在 NeuronEX 中调用 API 时,需先调用登录接口生成 JWT,再调用其他接口进行 JWT 验证。默认生成的 JWT 过期时间为一小时,可以自己生成 JWT,自定义过期时间。 + +当用户请求 RESTful apis 时,请在 http 请求头中按以下格式输入 **Token**: + +```go +Authorization: Bearer + XXXXXXXXXXXXXXX +``` + +If the token is correct,NeuronEX will respond the result; otherwise, it will return http `401`code. ## 什么是 JWT? @@ -39,7 +48,7 @@ payload ## 生成公私钥 -签发 JWT 前需要生成一对公私钥,并把生成的公钥 public.pem 放在 Neuron 安装目录下的子目录 **certs** 中。Neuron 自动加载 **certs** 中的文件,根据公钥解码。 +签发 JWT 前需要生成一对公私钥,并把生成的公钥 public.pem 放在 NeuronEX 安装目录下的子目录 **etc** 中。NeuronEX 自动加载 **certs** 中的文件,根据公钥解码。 :::tip Docker 以及 deb/rpm 安装包的默认安装路径为 `/opt/neuron`。 diff --git a/neuronex/zh_CN/api/metrics.md b/neuronex/zh_CN/api/metrics.md deleted file mode 100644 index b90b739..0000000 --- a/neuronex/zh_CN/api/metrics.md +++ /dev/null @@ -1,88 +0,0 @@ -# 统计信息 - -这个 API 由 [Monitor 插件]实现,提供兼容 [Prometheus] 的统计数据。 - -[Prometheus]: https://prometheus.io/ -[Monitor 插件]: ../configuration/north-apps/monitor/overview.md - -## 获取统计信息 - -*GET* /api/v2/metrics - -### 请求头部 - -**Authorization** Bearer \ - -### 请求参数 - -**category** 可选, 取值为 `global`, `driver` 或 `app` 之一 - -**node** 可选, 用节点名过滤, 且必须指定 `category=driver` 或 `category=app` - -### 响应状态 - -* 200 OK -* 400 请求错误 -* 500 服务器内部错误 - -### 响应 - -```text -# HELP core_dumped Whether there is any core dump -# TYPE core_dumped gauge -core_dumped 0 -# HELP uptime_seconds Uptime in seconds -# TYPE uptime_seconds counter -uptime_seconds 314 -# HELP north_nodes_total Number of north nodes -# TYPE north_nodes_total gauge -north_nodes_total 1 -# HELP north_running_nodes_total Number of north nodes in running state -# TYPE north_running_nodes_total gauge -north_running_nodes_total 1 -# HELP north_disconnected_nodes_total Number of north nodes disconnected -# TYPE north_disconnected_nodes_total gauge -north_disconnected_nodes_total 1 -# HELP south_nodes_total Number of south nodes -# TYPE south_nodes_total gauge -south_nodes_total 1 -# HELP south_running_nodes_total Number of south nodes in running state -# TYPE south_running_nodes_total gauge -south_running_nodes_total 0 -# HELP south_disconnected_nodes_total Number of south nodes disconnected -# TYPE south_disconnected_nodes_total gauge -south_disconnected_nodes_total 1 -# HELP send_msgs_total Total number of messages sent -# TYPE send_msgs_total counter -send_msgs_total{node="data-stream-processing"} 0 -# HELP send_msg_errors_total Total number of errors sending messages -# TYPE send_msg_errors_total counter -send_msg_errors_total{node="data-stream-processing"} 0 -# HELP recv_msgs_total Total number of messages received -# TYPE recv_msgs_total counter -recv_msgs_total{node="data-stream-processing"} 0 -# HELP last_rtt_ms Last request round trip time in milliseconds -# TYPE last_rtt_ms gauge -last_rtt_ms{node="modbus"} 9999 -# HELP send_bytes Total number of bytes sent -# TYPE send_bytes gauge -send_bytes{node="modbus"} 0 -# HELP recv_bytes Total number of bytes received -# TYPE recv_bytes gauge -recv_bytes{node="modbus"} 0 -# HELP tag_reads_total Total number of tag reads including errors -# TYPE tag_reads_total counter -tag_reads_total{node="modbus"} 0 -# HELP tag_read_errors_total Total number of tag read errors -# TYPE tag_read_errors_total counter -tag_read_errors_total{node="modbus"} 0 -# HELP group_tags_total Total number of tags in the group -# TYPE group_tags_total gauge -group_tags_total{node="modbus",group="grp"} 1 -# HELP group_last_send_msgs Number of messages sent on last group timer invocation -# TYPE group_last_send_msgs gauge -group_last_send_msgs{node="modbus",group="grp"} 0 -# HELP group_last_timer_ms Time in milliseconds consumed on last group timer invocation -# TYPE group_last_timer_ms gauge -group_last_timer_ms{node="modbus",group="grp"} 0 -``` diff --git a/neuronex/zh_CN/api/neuronex-swagger.json b/neuronex/zh_CN/api/neuronex-swagger.json new file mode 100644 index 0000000..63f879b --- /dev/null +++ b/neuronex/zh_CN/api/neuronex-swagger.json @@ -0,0 +1,12694 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "NeuronEX API", + "description": "", + "version": "1.0.0" + }, + "tags": [ + { + "name": "NeuronEX-API" + }, + { + "name": "System" + }, + { + "name": "template" + }, + { + "name": "server" + }, + { + "name": "license" + }, + { + "name": "Data Collection" + }, + { + "name": "metrics" + }, + { + "name": "rw" + }, + { + "name": "configuration" + }, + { + "name": "Data processing" + }, + { + "name": "configKey" + }, + { + "name": "configs" + }, + { + "name": "data" + }, + { + "name": "overview" + }, + { + "name": "plugins" + }, + { + "name": "rules" + }, + { + "name": "ruleset" + }, + { + "name": "schemas" + }, + { + "name": "services" + }, + { + "name": "streams" + }, + { + "name": "tables" + }, + { + "name": "uploads" + } + ], + "paths": { + "/api/license": { + "get": { + "summary": "Get License Information", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "GetLicenseInfo", + "tags": [ + "license" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLicenseResponse" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719059-run" + }, + "post": { + "summary": "Upload License", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "UploadLicense", + "tags": [ + "license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadLicenseReqData" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadLicenseResponse" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719060-run" + } + }, + "/api/license/activation_code": { + "post": { + "summary": "Register the activation code and automatically import the eco-license.", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "RegisterActivationCode", + "tags": [ + "license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendActivationCodeReqData" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "@ErrorInfo(10001,\"unknown error\")\n@ErrorInfo(10003,\"Read failed\")\n@ErrorInfo(10041,\"invalid json\")\n@ErrorInfo(10043,\"no match field\")\n@ErrorInfo(10045,\"read form file failed\")", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusError" + } + } + } + }, + "204": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719061-run" + } + }, + "/api/license/floating": { + "post": { + "summary": "ECP deliver floating license to NeuronEX", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DeliverFloatingLicense", + "tags": [ + "license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliverLicenseReqData" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "@ErrorInfo(10001,\"unknown error\")\n@ErrorInfo(10003,\"Read failed\")\n@ErrorInfo(10041,\"invalid json\")\n@ErrorInfo(10043,\"no match field\")\n@ErrorInfo(10045,\"read form file failed\")", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusError" + } + } + } + }, + "204": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719062-run" + } + }, + "/api/license/tag": { + "get": { + "summary": "Get the number of tags in use", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "GetUsedTag", + "tags": [ + "license" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsedTagCountResponse" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719063-run" + }, + "post": { + "summary": "Deliver Tag When NeuronEx is managed by ECP.", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DeliverTag", + "tags": [ + "license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliverLicenseReqData" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "@ErrorInfo(10001,\"unknown error\")\n@ErrorInfo(10003,\"Read failed\")\n@ErrorInfo(10041,\"invalid json\")\n@ErrorInfo(10043,\"no match field\")\n@ErrorInfo(10045,\"read form file failed\")", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusError" + } + } + } + }, + "204": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719064-run" + }, + "delete": { + "summary": "ECP assigns 0 tags to NeuronEX or unmanages NeuronEX", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "RemoveVirtualLicense", + "tags": [ + "license" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "204": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719065-run" + } + }, + "/api/login": { + "post": { + "summary": "Login", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "loginHandler", + "tags": [ + "server" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginBody" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/responseData" + } + } + } + }, + "500": { + "description": "Password does not match!", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719066-run" + } + }, + "/api/password": { + "post": { + "summary": "Change password", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "passwordChangeHandler", + "tags": [ + "server" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordChangeBody" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" + } + }, + "/api/system": { + "get": { + "summary": "Get system information", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "querySystemInfo", + "tags": [ + "server" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySystemInfoResp" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719068-run" + } + }, + "/api/version": { + "get": { + "summary": "Gett NeuronEX version information", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "queryVersion", + "tags": [ + "server" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-apifox-orders": [], + "properties": {}, + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719069-run" + } + }, + "/api/webhook/syslog": { + "get": { + "summary": "Get NeuronEX Log Remote Forwarding Configuration", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "syslogForwardConfig", + "tags": [ + "server" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/syslogInfoData" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719070-run" + }, + "post": { + "summary": "Update NeuronEX Log Remote Forwarding Configuration", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "syslogWebHook", + "tags": [ + "server" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyslogReq" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719071-run" + } + }, + "/api/template": { + "get": { + "summary": "Export Global Configuration Template", + "x-apifox-folder": "NeuronEX/template", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "Export", + "tags": [ + "template" + ], + "parameters": [ + { + "name": "category", + "in": "query", + "description": "Category 1: ekuiper, 2: neuron", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "@ErrorInfo(10001,\"unknown error\")\n@ErrorInfo(10003,\"Read failed\")\n@ErrorInfo(10041,\"invalid json\")\n@ErrorInfo(10043,\"no match field\")\n@ErrorInfo(10045,\"read form file failed\")", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusError" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719072-run" + }, + "post": { + "summary": "Deliver Global Configuration Template", + "x-apifox-folder": "NeuronEX/template", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "Deliver", + "tags": [ + "template" + ], + "parameters": [ + { + "name": "category", + "in": "query", + "description": "Category 1: ekuiper, 2: neuron\n0-all,1-partial now only support 0\nType uint `json:\"type\" in:\"query\"`", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliverBody" + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "@ErrorInfo(10001,\"unknown error\")\n@ErrorInfo(10003,\"Read failed\")\n@ErrorInfo(10041,\"invalid json\")\n@ErrorInfo(10043,\"no match field\")\n@ErrorInfo(10045,\"read form file failed\")", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusError" + } + } + } + }, + "204": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719073-run" + } + }, + "/api/neuron/login": { + "post": { + "summary": "Login", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Login", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "user account name", + "required": false, + "example": "admin", + "schema": { + "type": "string" + } + }, + { + "name": "pass", + "in": "query", + "description": "user account password", + "required": false, + "example": "0000", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-token" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzcyODcxNjMsImlhdCI6MTYzNzIwMDc2MywiaXNzIjoiRU1RIFRlY2hub2xvZ2llcyBDby4sIEx0ZCBBbGwgcmlnaHRzIHJlc2VydmVkLiIsInBhc3MiOiIwMDAwIiwidXNlciI6ImFkbWluIn0.2EZzPC9djErrCeYNrK2av0smh-eKxDYeyu7cW4MyknI" + } + } + } + } + } + }, + "401": { + "description": "401 token err", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "missing token", + "value": { + "error": 1004 + } + }, + "2": { + "summary": "decoding token error", + "value": { + "error": 1005 + } + } + } + } + } + }, + "403": { + "description": "403 token err", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "expired token", + "value": { + "error": 1006 + } + }, + "2": { + "summary": "validate token error", + "value": { + "error": 1007 + } + }, + "3": { + "summary": "invalid token", + "value": { + "error": 1008 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119930987-run" + } + }, + "/api/neuron/password": { + "post": { + "summary": "Update password", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Update password", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "old_pass": { + "type": "string" + }, + "new_pass": { + "type": "string" + } + }, + "required": [ + "name", + "old_pass", + "new_pass" + ], + "x-apifox-orders": [ + "name", + "old_pass", + "new_pass" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "admin", + "old_pass": "01234", + "new_pass": "56789" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "401": { + "description": "401 token err", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "missing token", + "value": { + "error": 1004 + } + }, + "2": { + "summary": "decoding token error", + "value": { + "error": 1005 + } + }, + "3": { + "summary": "password length too short or too long", + "value": { + "error": 1012 + } + }, + "4": { + "summary": "duplicate password", + "value": { + "error": 1013 + } + } + } + } + } + }, + "403": { + "description": "token err", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "expired token", + "value": { + "error": 1006 + } + }, + "2": { + "summary": "validate token error", + "value": { + "error": 1007 + } + }, + "3": { + "summary": "invalid token", + "value": { + "error": 1008 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119956369-run" + } + }, + "/api/neuron/ping": { + "post": { + "summary": "Ping", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Ping", + "tags": [ + "configuration" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119980411-run" + } + }, + "/api/neuron/node": { + "post": { + "summary": "Add Node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Add Node", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "plugin name", + "type": "string", + "title": "node name" + }, + "plugin": { + "type": "string", + "title": "plugin name" + } + }, + "required": [ + "name", + "plugin" + ], + "x-apifox-orders": [ + "name", + "plugin" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "modbus-tcp-node", + "plugin": "Modbus TCP" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "node type invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node type invalid", + "value": { + "error": 2001 + } + } + } + } + } + }, + "404": { + "description": "library not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "library not found", + "value": { + "error": 2301 + } + } + } + } + } + }, + "409": { + "description": "node exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node exist", + "value": { + "error": 2002 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119982799-run" + }, + "delete": { + "summary": "Del node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Delete node", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "example": { + "name": "modbus-tcp-node" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119994253-run" + }, + "get": { + "summary": "Get node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Get node", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "node name" + } + }, + "required": [ + "name" + ], + "x-apifox-orders": [ + "name" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "modbus-tcp-node" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119997773-run" + }, + "put": { + "summary": "Update node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Update node", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "new_name": { + "type": "string" + } + }, + "required": [ + "name", + "new_name" + ], + "x-apifox-orders": [ + "name", + "new_name" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "modbus-node", + "new_name": "modbus-tcp-node" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "node not allow update", + "value": { + "error": 2013 + } + }, + "2": { + "summary": "node name is empty", + "value": { + "error": 2015 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + }, + "409": { + "description": "node exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "node exist", + "value": { + "error": 2002 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "internal server error", + "value": { + "error": 1001 + } + }, + "2": { + "summary": "server is busy", + "value": { + "error": 1010 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120001259-run" + } + }, + "/api/neuron/node/setting": { + "get": { + "summary": "Get Node Setting", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Get Node Setting", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "node", + "in": "query", + "description": "Node name", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "params": { + "type": "object", + "x-apifox-orders": [], + "properties": {}, + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "node", + "params" + ], + "description": "//The parameter fields in json fill in different fields according to different plugins", + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "node": "modbus-node", + "params": { + "param1": "1.1.1.1", + "param2": 502 + } + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120090777-run" + }, + "post": { + "summary": "Node Setting", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Please refer to [Plugin Setting](./plugin-setting.md) for the configuration parameters of each plugin.", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "param1": { + "type": "integer" + }, + "param2": { + "type": "string" + }, + "param3": { + "type": "boolean" + }, + "param4": { + "type": "number" + } + }, + "required": [ + "param1", + "param2", + "param3", + "param4" + ], + "x-apifox-orders": [ + "param1", + "param2", + "param3", + "param4" + ], + "description": "The parameter fields in json fill in different fields according to different plugins", + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "node", + "params" + ], + "x-apifox-orders": [ + "node", + "params" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-node", + "params": { + "param1": 1, + "param2": "1.1.1.1", + "param3": true, + "param4": 11.22 + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + }, + "2": { + "summary": "node setting invalid", + "value": { + "error": 2004 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120096830-run" + } + }, + "/api/neuron/node/ctl": { + "post": { + "summary": "Node CTL", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "cmd": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "description": "0 start, 1 stop" + } + }, + "x-apifox-orders": [ + "node", + "cmd" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-node", + "cmd": 0 + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not ready", + "value": { + "error": 2006 + } + }, + "2": { + "summary": "node is running", + "value": { + "error": 2007 + } + }, + "3": { + "summary": "node not running", + "value": { + "error": 2008 + } + }, + "4": { + "summary": "node is stopped", + "value": { + "error": 2009 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120107078-run" + } + }, + "/api/neuron/node/state": { + "get": { + "summary": "Get Node State", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "node", + "in": "query", + "description": "Node name", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "states": { + "type": "array", + "items": { + "type": "object", + "properties": { + "node": { + "type": "string", + "description": "node name" + }, + "running": { + "type": "integer", + "description": "running state" + }, + "link": { + "type": "integer", + "description": "link state" + }, + "rtt": { + "type": "integer", + "description": "average round trip time communicating with devices" + } + }, + "x-apifox-orders": [ + "node", + "running", + "link", + "rtt" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "x-apifox-orders": [ + "states" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "states": [ + { + "node": "modbus-node1", + "running": 2, + "link": 1, + "rtt": 100 + }, + { + "node": "modbus-node2", + "running": 1, + "link": 0, + "rtt": 9999 + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120107079-run" + } + }, + "/api/neuron/group": { + "post": { + "summary": "Add Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "group name" + }, + "node": { + "type": "string", + "description": "node name" + }, + "interval": { + "type": "integer", + "description": "read/upload interval(ms)" + } + }, + "x-apifox-orders": [ + "name", + "node", + "interval" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "gconfig1", + "node": "modbus-node", + "interval": 10000 + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + }, + "409": { + "description": "group not allow", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "group not allow", + "value": { + "error": 2103 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120107080-run" + }, + "delete": { + "summary": "Del Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "group name" + }, + "node": { + "type": "string", + "description": "node name" + } + }, + "x-apifox-orders": [ + "name", + "node" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "gconfig1", + "node": "modbus-node", + "interval": 10000 + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + }, + "2": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + }, + "412": { + "description": "group already subscribed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group already subscribed", + "value": { + "error": 2101 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120315458-run" + }, + "put": { + "summary": "Update Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string", + "description": "node name" + }, + "group": { + "type": "string", + "description": "group name" + }, + "new_name": { + "type": "string", + "description": "group new name" + }, + "interval": { + "type": "integer", + "description": "read/upload interval(ms)" + } + }, + "x-apifox-orders": [ + "node", + "group", + "new_name", + "interval" + ], + "required": [ + "node", + "group" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-node", + "group": "gconfig1", + "new_name": "group1", + "interval": 10000 + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + }, + "2": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + }, + "409": { + "description": "group exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group exist", + "value": { + "error": 2104 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120111610-run" + }, + "get": { + "summary": "Get Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "node", + "in": "query", + "description": "Node name", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "interval": { + "type": "integer" + }, + "tag_count": { + "type": "integer" + } + }, + "x-apifox-orders": [ + "name", + "interval", + "tag_count" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "x-apifox-orders": [ + "groups" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "groups": [ + { + "name": "config_modbus_tcp_sample_2", + "interval": 2000, + "tag_count": 0 + }, + { + "name": "gconfig1", + "interval": 10000, + "tag_count": 0 + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120111611-run" + } + }, + "/api/neuron/tags": { + "post": { + "summary": "Add Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "group": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "tag name" + }, + "address": { + "type": "string", + "description": "tag address" + }, + "attribute": { + "type": "integer", + "description": "tag attribute" + }, + "type": { + "type": "integer", + "description": "tag type" + }, + "precision": { + "type": "integer", + "optional": true, + "description": "optional, float/double precision, optional(0-17)" + }, + "decimal": { + "type": "integer", + "optional": true, + "description": "optional, decimal" + }, + "description": { + "type": "string", + "optional": true, + "description": "optional, description" + }, + "value": { + "type": "number", + "optional": true, + "description": "optional, when the attribute is static,the value field needs to be added." + } + }, + "x-apifox-orders": [ + "name", + "address", + "attribute", + "type", + "precision", + "decimal", + "description", + "value" + ], + "required": [ + "name", + "address", + "attribute", + "type" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "x-apifox-orders": [ + "node", + "group", + "tags" + ], + "required": [ + "node", + "group" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-node", + "group": "config_modbus_tcp_sample_2", + "tags": [ + { + "name": "tag1", + "address": "1!400001", + "attribute": 8, + "type": 4, + "precision": 0, + "decimal": 0, + "description": "", + "value": 12 + }, + { + "name": "tag2", + "address": "1!00001", + "attribute": 3, + "type": 3, + "decimal": 0.01 + }, + { + "name": "tag3", + "address": "1!400009", + "attribute": 3, + "type": 9, + "precision": 3 + }, + { + "name": "static_tag", + "address": "", + "attribute": 10, + "type": 1, + "description": "It is a static tag", + "value": 42 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index": { + "type": "integer" + }, + "error": { + "type": "integer" + } + }, + "required": [ + "index", + "error" + ], + "x-apifox-orders": [ + "index", + "error" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "index": 1, + "error": 0 + } + } + } + } + } + }, + "206": { + "description": "Partial Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag name conflict", + "value": { + "error": 2202 + } + }, + "2": { + "summary": "tag attribute not support", + "value": { + "error": 2203 + } + }, + "3": { + "summary": "tag type not support", + "value": { + "error": 2204 + } + }, + "4": { + "summary": "tag address format invalid", + "value": { + "error": 2205 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120141651-run" + }, + "get": { + "summary": "Get Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "node.string", + "in": "query", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "group", + "in": "query", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "tag type", + "type": "string" + }, + "type": { + "description": "tag address", + "type": "integer" + }, + "address": { + "description": "tag attribute", + "type": "string" + }, + "attribute": { + "description": "description", + "type": "integer" + }, + "description": { + "description": "float/double precision", + "type": "string" + }, + "precision": { + "description": "decimal", + "type": "integer" + }, + "decimal": { + "description": "optional, when the attribute is static", + "type": "integer" + }, + "value": { + "type": "integer" + }, + "precison": { + "type": "integer" + } + }, + "required": [ + "name", + "type", + "address", + "attribute", + "description", + "decimal", + "precison" + ], + "x-apifox-orders": [ + "name", + "type", + "address", + "attribute", + "description", + "precision", + "decimal", + "value", + "precison" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "tags" + ], + "x-apifox-orders": [ + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "tags": [ + { + "name": "tag1", + "type": 8, + "address": "1!400001", + "attribute": 0, + "description": "", + "precision": 0, + "decimal": 0, + "value": 12 + }, + { + "name": "tag2", + "type": 6, + "address": "1!400002", + "attribute": 0, + "description": "", + "precision": 0, + "decimal": 0 + }, + { + "name": "static_tag", + "address": "", + "attribute": 10, + "type": 8, + "description": "", + "precision": 0, + "decimal": 0, + "value": 42 + } + ] + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120176722-run" + }, + "put": { + "summary": "Update Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "description": "node name", + "type": "string" + }, + "group": { + "type": "string", + "description": "group name" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "tag name", + "type": "string" + }, + "type": { + "description": "tag type", + "type": "integer" + }, + "attribute": { + "description": "tag attribute", + "type": "integer" + }, + "address": { + "description": "tag address", + "type": "string" + }, + "description": { + "type": "string" + }, + "precision": { + "description": "float/double precison", + "type": "integer" + }, + "decimal": { + "type": "integer" + }, + "value": { + "type": "integer", + "description": "optional, when the attribute is static,the value field needs to be added." + } + }, + "required": [ + "name", + "type", + "attribute", + "address", + "description", + "decimal", + "precision" + ], + "x-apifox-orders": [ + "name", + "type", + "attribute", + "address", + "description", + "precision", + "decimal", + "value" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "node", + "group", + "tags" + ], + "x-apifox-orders": [ + "node", + "group", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "example": "{\n \"node\": \"modbus-tcp-test\",\n \"group\": \"group1\",\n \"tags\": [\n {\n \"name\": \"tag1\",\n \"type\": 8,\n \"attribute\": 0,\n \"address\": \"1!400001\",\n \"description\": \"\",\n \"precision\": 0,\n \"decimal\": 0,\n \"value\": 12\n },\n {\n \"name\": \"tag2\",\n \"type\": 6,\n \"attribute\": 0,\n \"address\": \"1!400002\",\n \"description\": \"\",\n \"precison\": 0,\n \"decimal\": 0,\n },\n {\n \"name\": \"static_tag\",\n \"address\": \"\",\n \"attribute\": 10,\n \"type\": 8,\n \"description\": \"\",\n \"precison\": 0,\n \"decimal\": 0,\n \"value\": 42\n }\n ]\n}" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + }, + "index": { + "type": "integer" + } + }, + "required": [ + "error", + "index" + ], + "x-apifox-orders": [ + "error", + "index" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0, + "index": 1 + } + } + } + } + } + }, + "206": { + "description": "206", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag not exist", + "value": { + "error": 2201 + } + }, + "2": { + "summary": "tag name conflict", + "value": { + "error": 2202 + } + }, + "3": { + "summary": "tag attribute not support", + "value": { + "error": 2203 + } + }, + "4": { + "summary": "tag type not support", + "value": { + "error": 2204 + } + }, + "5": { + "summary": "tag address format invalid", + "value": { + "error": 2205 + } + } + } + } + } + }, + "404": { + "description": "neuron node/group 404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + }, + "2": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120182666-run" + }, + "delete": { + "summary": "Del Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "group": { + "description": "group name", + "type": "string" + }, + "node": { + "description": "node name", + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "tag name" + } + }, + "required": [ + "group", + "node", + "tags" + ], + "x-apifox-orders": [ + "group", + "node", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "group": "config_modbus_tcp_sample_2", + "node": "modbus-node", + "tags": [ + "tag1", + "tag2" + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120185700-run" + } + }, + "/api/neuron/plugin": { + "post": { + "summary": "Add Plugin", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "library": { + "type": "string", + "description": "plugin library name" + } + }, + "required": [ + "library" + ], + "x-apifox-orders": [ + "library" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "library info invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "library info invalid", + "value": { + "error": 2302 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120186278-run" + }, + "delete": { + "summary": "Del Plugin", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "plugin": { + "type": "string", + "description": "plugin name" + } + }, + "required": [ + "plugin" + ], + "x-apifox-orders": [ + "plugin" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120187807-run" + }, + "get": { + "summary": "Get Plugin", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "plugin", + "in": "query", + "description": "plugin name", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "plugins": { + "type": "array", + "items": { + "type": "object", + "properties": { + "kind": { + "description": "plugin kind", + "type": "integer" + }, + "node_type": { + "type": "integer" + }, + "name": { + "type": "string", + "description": "plugin name" + }, + "library": { + "type": "string", + "description": "plugin library name" + }, + "description": { + "type": "string" + }, + "description_zh": { + "type": "string" + }, + "schema": { + "type": "string" + } + }, + "required": [ + "kind", + "node_type", + "name", + "library", + "description", + "description_zh", + "schema" + ], + "x-apifox-orders": [ + "kind", + "node_type", + "name", + "library", + "description", + "description_zh", + "schema" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "plugins" + ], + "x-apifox-orders": [ + "plugins" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "plugins": [ + { + "kind": 1, + "node_type": 1, + "name": "Modbus TCP", + "library": "libplugin-modbus-tcp.so", + "description": "description", + "description_zh": "描述", + "schema": "modbus-tcp" + }, + { + "kind": 1, + "node_type": 2, + "name": "MQTT", + "library": "libplugin-mqtt.so", + "description": "Neuron northbound MQTT plugin bases on NanoSDK.", + "description_zh": "基于 NanoSDK 的 Neuron 北向应用 MQTT 插件", + "schema": "mqtt" + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120228089-run" + } + }, + "/api/neuron/schema": { + "get": { + "summary": "Get Plugin Schema", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "schema_name", + "in": "query", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag_regex": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "integer" + }, + "regex": { + "type": "string" + } + }, + "required": [ + "type", + "regex" + ], + "x-apifox-orders": [ + "type", + "regex" + ], + "x-apifox-ignore-properties": [] + } + }, + "group_interval": { + "type": "integer" + }, + "connection_mode": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "name_zh": { + "type": "string" + }, + "description": { + "type": "string" + }, + "description_zh": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "default": { + "type": "integer" + }, + "valid": { + "type": "object", + "properties": { + "map": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "key", + "value" + ], + "x-apifox-orders": [ + "key", + "value" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "map" + ], + "x-apifox-orders": [ + "map" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-orders": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-ignore-properties": [] + }, + "interval": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "name_zh": { + "type": "string" + }, + "description": { + "type": "string" + }, + "description_zh": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "default": { + "type": "integer" + }, + "valid": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": [ + "min", + "max" + ], + "x-apifox-orders": [ + "min", + "max" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-orders": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-ignore-properties": [] + }, + "host": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "name_zh": { + "type": "string" + }, + "description": { + "type": "string" + }, + "description_zh": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "valid": { + "type": "object", + "properties": { + "regex": { + "type": "string" + }, + "length": { + "type": "integer" + } + }, + "required": [ + "regex", + "length" + ], + "x-apifox-orders": [ + "regex", + "length" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "valid" + ], + "x-apifox-orders": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "valid" + ], + "x-apifox-ignore-properties": [] + }, + "port": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "name_zh": { + "type": "string" + }, + "description": { + "type": "string" + }, + "description_zh": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "default": { + "type": "integer" + }, + "valid": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": [ + "min", + "max" + ], + "x-apifox-orders": [ + "min", + "max" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-orders": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-ignore-properties": [] + }, + "timeout": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "name_zh": { + "type": "string" + }, + "description": { + "type": "string" + }, + "description_zh": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "default": { + "type": "integer" + }, + "valid": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": [ + "min", + "max" + ], + "x-apifox-orders": [ + "min", + "max" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-orders": [ + "name", + "name_zh", + "description", + "description_zh", + "attribute", + "type", + "default", + "valid" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "tag_regex", + "group_interval", + "connection_mode", + "interval", + "host", + "port", + "timeout" + ], + "x-apifox-orders": [ + "tag_regex", + "group_interval", + "connection_mode", + "interval", + "host", + "port", + "timeout" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "tag_regex": [ + { + "type": 3, + "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" + }, + { + "type": 4, + "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" + }, + { + "type": 5, + "regex": "^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$" + }, + { + "type": 6, + "regex": "^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$" + }, + { + "type": 7, + "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" + }, + { + "type": 8, + "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" + }, + { + "type": 9, + "regex": "^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$" + }, + { + "type": 10, + "regex": "^[0-9]+![3-4][0-9]+(#B|#L|)$" + }, + { + "type": 11, + "regex": "^[0-9]+!([0-1][0-9]+|[3-4][0-9]+\\.([0-9]|[0-1][0-5]))$" + }, + { + "type": 13, + "regex": "^[0-9]+![3-4][0-9]+\\.[0-9]+(H|L|)$" + } + ], + "group_interval": 1000, + "connection_mode": { + "name": "Connection Mode", + "name_zh": "连接模式", + "description": "Neuron as the client, or as the server", + "description_zh": "Neuron 作为客户端或服务端", + "attribute": "required", + "type": "map", + "default": 0, + "valid": { + "map": [ + { + "key": "Client", + "value": 0 + }, + { + "key": "Server", + "value": 1 + } + ] + } + }, + "interval": { + "name": "Send Interval", + "name_zh": "指令发送间隔", + "description": "Send reading instruction interval(ms)", + "description_zh": "发送读指令时间间隔,单位为毫秒", + "attribute": "required", + "type": "int", + "default": 20, + "valid": { + "min": 0, + "max": 3000 + } + }, + "host": { + "name": "IP Address", + "name_zh": "IP地址", + "description": "Local IP in server mode, remote device IP in client mode", + "description_zh": "服务端模式中填写本地 IP,客户端模式中填写目标设备 IP", + "attribute": "required", + "type": "string", + "valid": { + "regex": "/^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$/", + "length": 30 + } + }, + "port": { + "name": "Port", + "name_zh": "端口号", + "description": "Local port in server mode, remote device port in client mode", + "description_zh": "服务端模式中填写本地端口号,客户端模式中填写远程设备端口号", + "attribute": "required", + "type": "int", + "default": 502, + "valid": { + "min": 1, + "max": 65535 + } + }, + "timeout": { + "name": "Connection Timeout", + "name_zh": "连接超时时间", + "description": "Connection timeout(ms)", + "description_zh": "连接超时时间,单位为毫秒", + "attribute": "required", + "type": "int", + "default": 3000, + "valid": { + "min": 1000, + "max": 65535 + } + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120232938-run" + } + }, + "/api/neuron/subscribe": { + "post": { + "summary": "Subscribe", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "app": { + "description": "app name", + "type": "string" + }, + "driver": { + "description": "driver name", + "type": "string" + }, + "group": { + "description": "driver node group name", + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "topic": { + "description": "optional, when using the MQTT plugin, the topic field needs to be added", + "type": "string" + } + }, + "description": "when using the MQTT plugin, the topic field needs to be added", + "x-apifox-orders": [ + "topic" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "app", + "driver", + "group" + ], + "x-apifox-orders": [ + "app", + "driver", + "group", + "params" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "app": "mqtt", + "driver": "modbus-tcp", + "group": "group-1", + "params": { + "topic": "/neuron/mqtt/group-1" + } + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "group not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120234390-run" + }, + "put": { + "summary": "Update Subscribe Parameters", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "app": { + "description": "app name", + "type": "string" + }, + "driver": { + "description": "deliver name", + "type": "string" + }, + "group": { + "type": "string", + "description": "driver node group name" + }, + "params": { + "type": "object", + "properties": { + "topic": { + "type": "string", + "description": "when using the MQTT plugin, the topic key is the upload topic" + } + }, + "required": [ + "topic" + ], + "x-apifox-orders": [ + "topic" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "app", + "driver", + "group", + "params" + ], + "x-apifox-orders": [ + "app", + "driver", + "group", + "params" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "group not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120238577-run" + }, + "delete": { + "summary": "UnSubscribe", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "app": { + "description": "app name", + "type": "string" + }, + "driver": { + "description": "driver name", + "type": "string" + }, + "group": { + "description": "driver node group name", + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "topic": { + "description": "optional, when using the MQTT plugin, the topic field needs to be added", + "type": "string" + } + }, + "required": [ + "topic" + ], + "description": "optional, when using the MQTT plugin, the topic field needs to be added", + "x-apifox-orders": [ + "topic" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "app", + "driver", + "group", + "params" + ], + "x-apifox-orders": [ + "app", + "driver", + "group", + "params" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "app": "mqtt", + "driver": "modbus-tcp", + "group": "group-1", + "params": { + "topic": "/neuron/mqtt/group-1" + } + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "group not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120240457-run" + }, + "get": { + "summary": "Get Subscribe Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "app", + "in": "query", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "driver": { + "description": "deliver name", + "type": "string" + }, + "group": { + "description": "group name", + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "topic": { + "type": "string" + } + }, + "required": [ + "topic" + ], + "description": "when using the MQTT plugin, the topic field needs to be added", + "x-apifox-orders": [ + "topic" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "driver", + "group", + "params" + ], + "x-apifox-orders": [ + "driver", + "group", + "params" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "groups" + ], + "x-apifox-orders": [ + "groups" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "groups": [ + { + "driver": "modbus-tcp", + "group": "group-1", + "params": { + "topic": "/neuron/mqtt/group-1" + } + }, + { + "driver": "modbus-tcp", + "group": "group-2", + "params": { + "topic": "/neuron/mqtt/group-2" + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120242283-run" + } + }, + "/api/neuron/subscribes": { + "post": { + "summary": "Subscribe Multiple Groups", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "app": { + "type": "string", + "description": "app n" + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "driver": { + "description": "deliver name", + "type": "string" + }, + "group": { + "description": "group name", + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "topic": { + "description": "when using the MQTT plugin, the topic key is the upload topoic", + "type": "string" + } + }, + "required": [ + "topic" + ], + "description": "optional, depends on plugins", + "x-apifox-orders": [ + "topic" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "driver", + "group", + "params" + ], + "x-apifox-orders": [ + "driver", + "group", + "params" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "app", + "groups" + ], + "x-apifox-orders": [ + "app", + "groups" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "app": "mqtt", + "groups": [ + { + "driver": "modbus1", + "group": "group1", + "params": { + "topic": "/neuron/mqtt/modbus1/group1" + } + }, + { + "driver": "modbus2", + "group": "group2", + "params": { + "topic": "/neuron/mqtt/modbus2/group2" + } + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "suceess", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120235956-run" + } + }, + "/api/neuron/version": { + "get": { + "summary": "Get Version", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "build_date": { + "type": "string" + }, + "revision": { + "description": "dirty indicates uncommit changes", + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "build_date", + "revision", + "version" + ], + "x-apifox-orders": [ + "build_date", + "revision", + "version" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "build_date": "2022-06-01", + "revision": "99e2184+dirty", + "version": "2.4.0" + } + } + } + } + } + }, + "500": { + "description": "internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120244016-run" + } + }, + "/api/neuron/license": { + "post": { + "summary": "Upload License", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "license": { + "type": "string" + } + }, + "required": [ + "license" + ], + "x-apifox-orders": [ + "license" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "license": "-----BEGIN CERTIFICATE-----\nMIID2TCCAsGgAwIBAgIEATSJqjA....." + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": " license invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "license invalid", + "value": { + "error": 2401 + } + } + } + } + } + }, + "500": { + "description": "internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120246003-run" + }, + "get": { + "summary": "Get License Info", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "valid_until": { + "type": "string" + }, + "valid_since": { + "type": "string" + }, + "valid": { + "type": "boolean" + }, + "max_nodes": { + "type": "integer" + }, + "max_node_tags": { + "type": "integer" + }, + "used_nodes": { + "type": "integer" + }, + "used_tags": { + "type": "integer" + }, + "license_type": { + "type": "string" + }, + "error": { + "type": "integer" + }, + "enabled_plugins": { + "type": "array", + "items": { + "type": "string" + } + }, + "hardware_token": { + "type": "string" + }, + "object": { + "type": "string" + }, + "email_address": { + "type": "string" + } + }, + "required": [ + "valid_until", + "valid_since", + "valid", + "max_nodes", + "max_node_tags", + "used_nodes", + "used_tags", + "license_type", + "error", + "enabled_plugins", + "hardware_token", + "object", + "email_address" + ], + "x-apifox-orders": [ + "valid_until", + "valid_since", + "valid", + "max_nodes", + "max_node_tags", + "used_nodes", + "used_tags", + "license_type", + "error", + "enabled_plugins", + "hardware_token", + "object", + "email_address" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "valid_until": "2023-03-15 08:11:19", + "valid_since": "2022-03-15 08:11:19", + "valid": false, + "max_nodes": 1, + "max_node_tags": 1, + "used_nodes": 12, + "used_tags": 846, + "license_type": "retail", + "error": 0, + "enabled_plugins": [ + "MODBUS TCP Advance", + "OPC UA" + ], + "hardware_token": "I+kZidSifiyVSbz0/EgcM6AcefnlfR4IU19ZZUnTS18=", + "object": "emq", + "email_address": "emq@emqx.io" + } + } + } + } + } + }, + "404": { + "description": " license not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "license not found", + "value": { + "error": 2400 + } + } + } + } + } + }, + "500": { + "description": "internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120250382-run" + } + }, + "/api/neuron/logs": { + "get": { + "summary": "Download log files", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "file not exist", + "value": { + "error": 1011 + } + }, + "2": { + "summary": "command execution failed", + "value": { + "error": 1014 + } + } + } + } + } + }, + "500": { + "description": "internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120256146-run" + } + }, + "/api/neuron/log/level": { + "put": { + "summary": "Update node log level", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Call the api to modify the log level of the node to debug, and automatically switch to the default level in about ten minutes.", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node_name": { + "type": "string" + } + }, + "required": [ + "node_name" + ], + "x-apifox-orders": [ + "node_name" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + }, + "500": { + "description": "server is busy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120270694-run" + } + }, + "/api/neuron/file": { + "get": { + "summary": "Download File", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "file_path", + "in": "query", + "description": "absolute path of the file", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "file not exist", + "value": { + "error": 1011 + } + }, + "2": { + "summary": "file open failure", + "value": { + "error": 4101 + } + }, + "3": { + "summary": "file read failure", + "value": { + "error": 4102 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120272126-run" + } + }, + "/api/neuron/file/info": { + "get": { + "summary": "Get file list information", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "dir_path", + "in": "query", + "description": "absolute path of the directory.", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "ctime": { + "type": "string" + }, + "mtime": { + "type": "string" + } + }, + "required": [ + "name", + "size", + "ctime", + "mtime" + ], + "x-apifox-orders": [ + "name", + "size", + "ctime", + "mtime" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "files" + ], + "x-apifox-orders": [ + "files" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "files": [ + { + "name": "neuron", + "size": 4096, + "ctime": "Wed Jan 4 02:38:12 2023", + "mtime": "Mon Dec 26 09:48:42 2022" + }, + { + "name": "test.txt", + "size": 13, + "ctime": "Wed Jan 4 02:38:12 2023", + "mtime": "Mon Dec 26 09:48:42 2022" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "file not exist", + "value": { + "error": 1011 + } + }, + "2": { + "summary": "file open failure", + "value": { + "error": 4101 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120273202-run" + } + }, + "/api/neuron/template": { + "post": { + "summary": "Add Template", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "interval": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "integer" + }, + "address": { + "type": "string" + }, + "attribute": { + "type": "integer" + }, + "precison": { + "type": "integer" + }, + "decimal": { + "type": "integer" + } + }, + "required": [ + "name", + "type", + "address", + "attribute" + ], + "x-apifox-orders": [ + "name", + "type", + "address", + "attribute", + "precison", + "decimal" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "x-apifox-orders": [ + "name", + "interval", + "tags" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "name", + "plugin", + "groups" + ], + "x-apifox-orders": [ + "name", + "plugin", + "groups" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "rtu template", + "plugin": "Modbus RTU", + "groups": [ + { + "name": "group1", + "interval": 2000, + "tags": [ + { + "name": "tag1", + "type": 4, + "address": "1!400001", + "attribute": 1, + "precison": 1, + "decimal": 0 + }, + { + "name": "tag2", + "type": 11, + "address": "1!400009", + "attribute": 3 + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "206": { + "description": "206", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag attribute not support", + "value": { + "error": 2203 + } + }, + "2": { + "summary": "tag type not support", + "value": { + "error": 2204 + } + }, + "3": { + "summary": "tag address format invalid", + "value": { + "error": 2205 + } + }, + "4": { + "summary": "tag name too long", + "value": { + "error": 2206 + } + }, + "5": { + "summary": "tag address too long", + "value": { + "error": 2207 + } + }, + "6": { + "summary": "tag description too long", + "value": { + "error": 2208 + } + }, + "7": { + "summary": "tag precision invalid", + "value": { + "error": 2209 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group parameter invalid", + "value": { + "error": 2105 + } + }, + "2": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "3": { + "summary": "template name too long", + "value": { + "error": 2502 + } + }, + "4": { + "summary": "plugin name too long", + "value": { + "error": 3013 + } + }, + "5": { + "summary": "plugin does not support template", + "value": { + "error": 3016 + } + } + } + } + } + }, + "404": { + "description": "plugin not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "plugin not found", + "value": { + "error": 3014 + } + } + } + } + } + }, + "409": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group exist", + "value": { + "error": 2104 + } + }, + "2": { + "summary": "tag name conflict", + "value": { + "error": 2202 + } + }, + "3": { + "summary": "template already exists", + "value": { + "error": 2500 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }, + "x-500:server is busy": { + "description": "server is busy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120283074-run" + }, + "delete": { + "summary": "Del Template", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "optional, name of the template to delete. If not specified, then delete all templates.", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "template not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "server is busy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120284812-run" + }, + "get": { + "summary": "Get Template", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "name of a particular template.", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Without the **name** request parameter", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "plugin": { + "type": "string" + } + }, + "required": [ + "name", + "plugin" + ], + "x-apifox-orders": [ + "name", + "plugin" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "templates" + ], + "x-apifox-orders": [ + "templates" + ], + "description": "Without the **name** request parameter, return all templates.", + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Without the **name** request parameter, return all templates.", + "value": { + "templates": [ + { + "name": "template1", + "plugin": "modbus tcp" + }, + { + "name": "template2", + "plugin": "opc ua" + } + ] + } + }, + "2": { + "summary": "When the **name** request parameter is specified, return detail information of the template of the given name.", + "value": { + "name": "rtu template", + "plugin": "Modbus RTU", + "groups": [ + { + "name": "group1", + "interval": 2000, + "tags": [ + { + "name": "tag1", + "type": 4, + "address": "1!400001", + "attribute": 1, + "precison": 1, + "decimal": 0 + }, + { + "name": "tag2", + "type": 11, + "address": "1!400009", + "attribute": 3 + } + ] + } + ] + } + } + } + } + } + }, + "400": { + "description": " request param invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": " request param invalid", + "value": { + "error": 1003 + } + } + } + } + } + }, + "404": { + "description": "template not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120288549-run" + }, + "/api/neuron/template/inst": { + "post": { + "summary": "Template Instantiation", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "name", + "node" + ], + "x-apifox-orders": [ + "name", + "node" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "rtu template", + "node": "modbus-rtu" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "library failed to open", + "value": { + "error": 2304 + } + }, + "2": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "409": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node exist", + "value": { + "error": 2002 + } + }, + "2": { + "summary": "library not allow create instance", + "value": { + "error": 2307 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120290329-run" + } + }, + "/api/neuron/template/instances": { + "post": { + "summary": "Template Multi Node Instantiation", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "name", + "node" + ], + "x-apifox-orders": [ + "name", + "node" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "nodes" + ], + "x-apifox-orders": [ + "nodes" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "nodes": [ + { + "name": "rtu template", + "node": "node1" + }, + { + "name": "tcp template", + "node": "node2" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "library failed to open", + "value": { + "error": 2304 + } + }, + "2": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "library not found", + "value": { + "error": 2301 + } + }, + "2": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "409": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "node exist", + "value": { + "error": 2002 + } + }, + "2": { + "summary": "library not allow create instance", + "value": { + "error": 2307 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120293844-run" + } + }, + "/api/neuron/template/group": { + "post": { + "summary": "Add Template Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "group": { + "type": "string" + }, + "interval": { + "type": "integer" + } + }, + "required": [ + "template", + "group", + "interval" + ], + "x-apifox-orders": [ + "template", + "group", + "interval" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group parameter invalid", + "value": { + "error": 2105 + } + }, + "2": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "3": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "409": { + "description": "group exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group exist", + "value": { + "error": 2104 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120295930-run" + }, + "delete": { + "summary": "Del Template Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "group": { + "type": "string" + } + }, + "required": [ + "template", + "group" + ], + "x-apifox-orders": [ + "template", + "group" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "2": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + }, + "2": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120297681-run" + }, + "put": { + "summary": "Update Template Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "group": { + "type": "string", + "description": "group name" + }, + "interval": { + "type": "integer", + "description": "interval(ms)" + }, + "new_name": { + "type": "string", + "description": "group new name" + } + }, + "required": [ + "template", + "group", + "interval", + "new_name" + ], + "x-apifox-orders": [ + "template", + "group", + "interval", + "new_name" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "template": "modbus-template", + "group": "gconfig1", + "new_name": "group1", + "interval": 10000 + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group parameter invalid", + "value": { + "error": 2105 + } + }, + "2": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "3": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "template not found", + "value": { + "error": 2501 + } + }, + "2": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120298592-run" + }, + "get": { + "summary": "Get Template Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "name of the template.", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "interval": { + "type": "integer" + }, + "tag_count": { + "type": "integer" + } + }, + "x-apifox-orders": [ + "name", + "interval", + "tag_count" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "groups" + ], + "x-apifox-orders": [ + "groups" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "groups": [ + { + "name": "group1", + "interval": 2000, + "tag_count": 2 + } + ] + } + } + } + } + } + }, + "400": { + "description": "request param invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "request param invalid", + "value": { + "error": 1003 + } + } + } + } + } + }, + "404": { + "description": "template not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120299795-run" + } + }, + "/api/neuron/template/tag": { + "post": { + "summary": "Add Template Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "group": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "attribute": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "decimal": { + "type": [ + "integer", + "number" + ] + }, + "description": { + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "name", + "address", + "attribute", + "type", + "decimal" + ], + "x-apifox-orders": [ + "name", + "address", + "attribute", + "type", + "precision", + "decimal", + "description", + "value" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "template", + "group", + "tags" + ], + "x-apifox-orders": [ + "template", + "group", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "template": "modbus-template", + "group": "group1", + "tags": [ + { + "name": "tag1", + "address": "1!400001", + "attribute": 8, + "type": 4, + "precision": 0, + "decimal": 0, + "description": "", + "value": 12 + }, + { + "name": "tag2", + "address": "1!00001", + "attribute": 3, + "type": 3, + "decimal": 0.01 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index": { + "type": "integer" + }, + "error": { + "type": "integer" + } + }, + "required": [ + "index", + "error" + ], + "x-apifox-orders": [ + "index", + "error" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "index": 2, + "error": 0 + } + } + } + } + } + }, + "206": { + "description": "206", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag attribute not support", + "value": { + "error": 2203 + } + }, + "2": { + "summary": "tag type not support", + "value": { + "error": 2204 + } + }, + "3": { + "summary": "tag address format invalid", + "value": { + "error": 2205 + } + }, + "4": { + "summary": "tag name too long", + "value": { + "error": 2206 + } + }, + "5": { + "summary": "tag address too long", + "value": { + "error": 2207 + } + }, + "6": { + "summary": "tag description too long", + "value": { + "error": 2208 + } + }, + "7": { + "summary": "tag precision invalid", + "value": { + "error": 2209 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "2": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + }, + "2": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "409": { + "description": "tag name conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag name conflict", + "value": { + "error": 2202 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120304450-run" + }, + "put": { + "summary": "Update Template Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "group": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "attribute": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "decimal": { + "type": [ + "integer", + "number" + ] + }, + "description": { + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "name", + "address", + "attribute", + "type", + "decimal" + ], + "x-apifox-orders": [ + "name", + "address", + "attribute", + "type", + "precision", + "decimal", + "description", + "value" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "template", + "group", + "tags" + ], + "x-apifox-orders": [ + "template", + "group", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "template": "modbus-template", + "group": "group1", + "tags": [ + { + "name": "tag1", + "address": "1!400001", + "attribute": 8, + "type": 4, + "precision": 0, + "decimal": 0, + "description": "", + "value": 12 + }, + { + "name": "tag2", + "address": "1!00001", + "attribute": 3, + "type": 3, + "decimal": 0.01 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index": { + "type": "integer" + }, + "error": { + "type": "integer" + } + }, + "required": [ + "index", + "error" + ], + "x-apifox-orders": [ + "index", + "error" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "index": 2, + "error": 0 + } + } + } + } + } + }, + "206": { + "description": "206", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag attribute not support", + "value": { + "error": 2203 + } + }, + "2": { + "summary": "tag type not support", + "value": { + "error": 2204 + } + }, + "3": { + "summary": "tag address format invalid", + "value": { + "error": 2205 + } + }, + "4": { + "summary": "tag name too long", + "value": { + "error": 2206 + } + }, + "5": { + "summary": "tag address too long", + "value": { + "error": 2207 + } + }, + "6": { + "summary": "tag description too long", + "value": { + "error": 2208 + } + }, + "7": { + "summary": "tag precision invalid", + "value": { + "error": 2209 + } + }, + "8": { + "summary": "tag not exist", + "value": { + "error": 2201 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "2": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + }, + "2": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120304471-run" + }, + "delete": { + "summary": "Del Template Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "group": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "template", + "group", + "tags" + ], + "x-apifox-orders": [ + "template", + "group", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "template": "modbus-template", + "group": "group1", + "tags": [ + "tag1", + "tag2" + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "206": { + "description": "tag name too long", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "tag name too long", + "value": { + "error": 2206 + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group name too long", + "value": { + "error": 2107 + } + }, + "2": { + "summary": "template name too long", + "value": { + "error": 2502 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + }, + "2": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120312712-run" + }, + "get": { + "summary": "Get Template Tag ", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "configuration" + ], + "parameters": [ + { + "name": "template", + "in": "query", + "description": " name of the template.", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "group", + "in": "query", + "description": "name of the group.", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "integer" + }, + "address": { + "type": "string" + }, + "attribute": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "precision": { + "type": "integer" + }, + "decimal": { + "type": "integer" + }, + "value": { + "type": "integer" + }, + "precison": { + "type": "integer" + } + }, + "required": [ + "name", + "type", + "address", + "attribute", + "description", + "decimal" + ], + "x-apifox-orders": [ + "name", + "type", + "address", + "attribute", + "description", + "precision", + "decimal", + "value", + "precison" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "tags", + "error" + ], + "x-apifox-orders": [ + "error", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "tags": [ + { + "name": "tag1", + "type": 4, + "address": "1!400001", + "attribute": 8, + "description": "", + "precision": 0, + "decimal": 0, + "value": 12 + }, + { + "name": "tag2", + "type": 14, + "address": "1!00001", + "attribute": 3, + "description": "", + "precison": 0, + "decimal": 0 + } + ] + } + } + } + } + } + }, + "400": { + "description": "Incorrect request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "request param invalid", + "value": { + "error": 1003 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + }, + "2": { + "summary": "template not found", + "value": { + "error": 2501 + } + } + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + }, + "2": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + }}, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120313950-run" + } + }, + "/api/neuron/metrics": { + "get": { + "summary": "Get Metrics", + "x-apifox-folder": "Neuron/metrics", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "metrics" + ], + "parameters": [ + { + "name": "category", + "in": "query", + "description": "one of `global`, `driver` and `app`", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "node", + "in": "query", + "description": "filter with node name, only meaningful when `category=driver` or `category=app`", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": "# HELP core_dumped Whether there is any core dump\n# TYPE core_dumped gauge\ncore_dumped 0\n# HELP uptime_seconds Uptime in seconds\n# TYPE uptime_seconds counter\nuptime_seconds 314\n# HELP north_nodes_total Number of north nodes\n# TYPE north_nodes_total gauge\nnorth_nodes_total 1\n# HELP north_running_nodes_total Number of north nodes in running state\n# TYPE north_running_nodes_total gauge\nnorth_running_nodes_total 1\n# HELP north_disconnected_nodes_total Number of north nodes disconnected\n# TYPE north_disconnected_nodes_total gauge\nnorth_disconnected_nodes_total 1\n# HELP south_nodes_total Number of south nodes\n# TYPE south_nodes_total gauge\nsouth_nodes_total 1\n# HELP south_running_nodes_total Number of south nodes in running state\n# TYPE south_running_nodes_total gauge\nsouth_running_nodes_total 0\n# HELP south_disconnected_nodes_total Number of south nodes disconnected\n# TYPE south_disconnected_nodes_total gauge\nsouth_disconnected_nodes_total 1\n# HELP send_msgs_total Total number of messages sent\n# TYPE send_msgs_total counter\nsend_msgs_total{node=\"data-stream-processing\"} 0\n# HELP send_msg_errors_total Total number of errors sending messages\n# TYPE send_msg_errors_total counter\nsend_msg_errors_total{node=\"data-stream-processing\"} 0\n# HELP recv_msgs_total Total number of messages received\n# TYPE recv_msgs_total counter\nrecv_msgs_total{node=\"data-stream-processing\"} 0\n# HELP last_rtt_ms Last request round trip time in milliseconds\n# TYPE last_rtt_ms gauge\nlast_rtt_ms{node=\"modbus\"} 9999\n# HELP send_bytes Total number of bytes sent\n# TYPE send_bytes gauge\nsend_bytes{node=\"modbus\"} 0\n# HELP recv_bytes Total number of bytes received\n# TYPE recv_bytes gauge\nrecv_bytes{node=\"modbus\"} 0\n# HELP tag_reads_total Total number of tag reads including errors\n# TYPE tag_reads_total counter\ntag_reads_total{node=\"modbus\"} 0\n# HELP tag_read_errors_total Total number of tag read errors\n# TYPE tag_read_errors_total counter\ntag_read_errors_total{node=\"modbus\"} 0\n# HELP group_tags_total Total number of tags in the group\n# TYPE group_tags_total gauge\ngroup_tags_total{node=\"modbus\",group=\"grp\"} 1\n# HELP group_last_send_msgs Number of messages sent on last group timer invocation\n# TYPE group_last_send_msgs gauge\ngroup_last_send_msgs{node=\"modbus\",group=\"grp\"} 0\n# HELP group_last_timer_ms Time in milliseconds consumed on last group timer invocation\n# TYPE group_last_timer_ms gauge\ngroup_last_timer_ms{node=\"modbus\",group=\"grp\"} 0" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120511756-run" + } + }, + "/api/neuron/read": { + "post": { + "summary": "Read Tag", + "x-apifox-folder": "Neuron/rw", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "rw" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "description": "node name", + "type": "string" + }, + "group": { + "type": "string", + "description": "group name" + } + }, + "required": [ + "node", + "group" + ], + "x-apifox-orders": [ + "node", + "group" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-tcp-1", + "group": "config_modbus_tcp_sample_2" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "tag name", + "type": "string" + }, + "value": { + "type": [ + "integer", + "boolean" + ], + "description": "tag value" + }, + "error": { + "type": "integer" + } + }, + "required": [ + "name", + "value" + ], + "x-apifox-orders": [ + "name", + "value", + "error" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "tags" + ], + "x-apifox-orders": [ + "tags" + ], + "description": "The value is displayed only when the value is read correctly, when the value is read incorrectly, the error code is displayed, not the value.", + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120515851-run" + } + }, + "/api/neuron/write": { + "post": { + "summary": "Write One Tag", + "x-apifox-folder": "Neuron/rw", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "rw" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "group": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "node", + "group", + "tag", + "value" + ], + "x-apifox-orders": [ + "node", + "group", + "tag", + "value" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-tcp-1", + "group": "config_modbus_tcp_sample_2", + "tag": "tag1", + "value": 1234 + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120516330-run" + } + }, + "/api/neuron/write/tags": { + "post": { + "summary": "Write Multiple Tags", + "x-apifox-folder": "Neuron/rw", + "x-apifox-status": "released", + "deprecated": false, + "description": "Multiple tags writing currently only supports Mitsubishi 3E, Beckhoff ADS, Modbus TCP, Modbus RTU, Siemens S7 ISOTCP, Omron FINS TCP, OPC UA, BACnet/IP drivers.", + "tags": [ + "rw" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "group": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "value": { + "type": [ + "integer", + "string" + ] + } + }, + "required": [ + "tag", + "value" + ], + "x-apifox-orders": [ + "tag", + "value" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "node", + "group", + "tags" + ], + "x-apifox-orders": [ + "node", + "group", + "tags" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "node": "modbus-tcp-1", + "group": "group1", + "tags": [ + { + "tag": "tag1", + "value": 123 + }, + { + "tag": "tag2", + "value": 1233 + }, + { + "tag": "tag3", + "value": 7788 + }, + { + "tag": "tag4", + "value": 1 + }, + { + "tag": "tag5", + "value": "asdfda" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-error" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120517750-run" + } + }, + "/api/ekuiper/metadata/sources/yaml/{name}": { + "get": { + "summary": "List all configKey", + "x-apifox-folder": "Ekuiper/configKey", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to get all Config Keys under a specific source name.\n\nNote: When retrieving Config Keys, if the properties contain a password field (case-insensitive, such as Password), the API will not return the actual password value, but instead replace it with \"******\" to conceal the password information.", + "tags": [ + "configKey" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Source name, supports built-in sources and extended sources. The built-in sources include mqtt, redis, neuron, memory, httppull, httppush, file, edgex,\n Extended sources include random, sql, video, zmq and user-defined sources", + "required": true, + "example": "mqtt", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "amd_broker": { + "type": "object", + "properties": { + "insecureSkipVerify": { + "type": "boolean" + }, + "protocolVersion": { + "type": "string" + }, + "qos": { + "type": "integer" + }, + "server": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "insecureSkipVerify", + "protocolVersion", + "qos", + "server", + "password" + ], + "x-apifox-orders": [ + "insecureSkipVerify", + "protocolVersion", + "qos", + "server", + "password" + ], + "x-apifox-ignore-properties": [] + }, + "default": { + "type": "object", + "properties": { + "qos": { + "type": "integer" + }, + "server": { + "type": "string" + } + }, + "required": [ + "qos", + "server" + ], + "x-apifox-orders": [ + "qos", + "server" + ], + "x-apifox-ignore-properties": [] + }, + "demo_conf": { + "type": "object", + "properties": { + "qos": { + "type": "integer" + }, + "server": { + "type": "string" + } + }, + "required": [ + "qos", + "server" + ], + "x-apifox-orders": [ + "qos", + "server" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "amd_broker", + "default", + "demo_conf" + ], + "x-apifox-orders": [ + "amd_broker", + "default", + "demo_conf" + ], + "description": "Note: When retrieving Config Keys, if the properties contain a password field (case-insensitive, such as Password), the API will not return the actual password value, but instead replace it with \"******\" to conceal the password information.", + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "curl /metadata/sources/yaml/mqtt", + "value": { + "amd_broker": { + "insecureSkipVerify": false, + "protocolVersion": "3.1.1", + "qos": 1, + "server": "tcp://122.9.166.75:1883", + "password": "******" + }, + "default": { + "qos": 2, + "server": "tcp://emqx:1883" + }, + "demo_conf": { + "qos": 0, + "server": "tcp://10.211.55.6:1883" + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120937670-run" + } + }, + "/api/ekuiper/metadata/sources/{name}/confKeys/{confKey}": { + "delete": { + "summary": "Delete a configKey", + "x-apifox-folder": "Ekuiper/configKey", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to delete a Config Key configuration under a specific source name", + "tags": [ + "configKey" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Source name, supports built-in sources and extended sources. The built-in sources include mqtt, redis, neuron, memory, httppull, httppush, file, edgex,\nExtended sources include random, sql, video, zmq and user-defined sources", + "required": true, + "example": "mqtt", + "schema": { + "type": "string" + } + }, + { + "name": "confKey", + "in": "path", + "description": "Config Key Name。Taking the above as an example, the Config Keys are amd_broker, default, demo_conf in sequence.", + "required": true, + "example": "demo_conf", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120939123-run" + }, + "put": { + "summary": "Register a Config Key", + "x-apifox-folder": "Ekuiper/configKey", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to register a Config Key under a specific source name", + "tags": [ + "configKey" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Source name, supports built-in sources and extended sources. The built-in sources include mqtt, redis, neuron, memory, httppull, httppush, file, edgex, Extended sources include random, sql, video, zmq and user-defined sources", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "confKey", + "in": "path", + "description": "Config Key name to register", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "supports built-in sources and extended sources. The built-in sources include mqtt, redis, neuron, memory, httppull, httppush, file, edgex, Extended sources include random, sql, video, zmq and user-defined sources", + "title": "Source name" + }, + "confKey": { + "type": "string", + "title": "Config Key name to register" + } + }, + "x-apifox-orders": [ + "name", + "confKey" + ], + "required": [ + "confKey", + "name" + ], + "x-apifox-ignore-properties": [] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "demo_conf": { + "type": "object", + "properties": { + "qos": { + "type": "integer" + }, + "server": { + "type": "string" + } + }, + "required": [ + "qos", + "server" + ], + "x-apifox-orders": [ + "qos", + "server" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "demo_conf" + ], + "x-apifox-orders": [ + "demo_conf" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Register the Config Key named demo_conf under the MQTT source", + "value": { + "demo_conf": { + "qos": 0, + "server": "tcp://10.211.55.6:1883" + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120941522-run" + } + }, + "/api/ekuiper/configs": { + "patch": { + "summary": "Reload Basic Configs", + "x-apifox-folder": "Ekuiper/configs", + "x-apifox-status": "released", + "deprecated": false, + "description": "By dynamically reloading [configuration](../../configuration/global_configurations.md), parameters such as debug and timezone can be updated for running eKuiper without restarting the application.\nCurrent supported dynamic reloadable parameters:\n\n- `debug`\n- `consoleLog`\n- `fileLog`\n- `timezone`", + "tags": [ + "configs" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "debug": { + "type": "boolean" + }, + "consoleLog": { + "type": "boolean" + }, + "fileLog": { + "type": "boolean" + }, + "timezone": { + "type": "string" + } + }, + "x-apifox-orders": [ + "debug", + "consoleLog", + "fileLog", + "timezone" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "debug": true, + "consoleLog": true, + "fileLog": true, + "timezone": "UTC" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120982132-run" + } + }, + "/api/ekuiper/data/import": { + "post": { + "summary": "Import Data", + "x-apifox-folder": "Ekuiper/data", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API resets all existing data and then imports the new data into the system by default. But user can specify ``partial=1`` parameter in HTTP URL to keep the existing data and apply the new data.\nThe API supports specifying data by means of text content or file URIs.\n\n\n\nExample 1: Import by text content\n\n```shell\nPOST http://{{host}}/data/import\nContent-Type: application/json\n\n{\n \"content\": \"{json of the ruleset}\"\n}\n```\n\nExample 2: Import by file URI\n\n```shell\nPOST http://{{host}}/data/import\nContent-Type: application/json\n\n{\n \"file\": \"file:///tmp/a.json\"\n}\n```\n\nExample 3: Import data via file URI and exit (for plug-ins and static schema updates, users need to ensure that eKuiper can be restarted after exiting)\n\n```shell\nPOST http://{{host}}/data/import?stop=1\nContent-Type: application/json\n\n{\n \"file\": \"file:///tmp/a.json\"\n}\n```\n\nExample 4: Keep the old data and import new data (overwrite the tables/streams/rules/source config/sink config. install plugins/schema if not exist, else ignore them)\n\n```shell\nPOST http://{{host}}/data/import?partial=1\nContent-Type: application/json\n\n{\n \"file\": \"file:///tmp/a.json\"\n}\n```\n\n## \n\n## Data Format\n\nThe file format for importing and exporting data is JSON, which can contain : `streams`, `tables`, `rules`, `plugin`, `source yaml` and so on. Each type holds the the key-value pair of the name and the creation statement. In the following example file, we define stream 、rules、table、plugin、source config、sink config\n\n\n```shell \n{\n \"streams\": {\n \"demo\": \"CREATE STREAM demo () WITH (DATASOURCE=\\\"users\\\", FORMAT=\\\"JSON\\\")\"\n },\n \"tables\": {\n \"T110\":\"\\n CREATE TABLE T110\\n (\\n S1 string\\n )\\n WITH (DATASOURCE=\\\"test.json\\\", FORMAT=\\\"json\\\", TYPE=\\\"file\\\", KIND=\\\"scan\\\", );\\n \"\n },\n \"rules\": {\n \"rule1\": \"{\\\"id\\\": \\\"rule1\\\",\\\"sql\\\": \\\"SELECT * FROM demo\\\",\\\"actions\\\": [{\\\"log\\\": {}}]}\",\n \"rule2\": \"{\\\"id\\\": \\\"rule2\\\",\\\"sql\\\": \\\"SELECT * FROM demo\\\",\\\"actions\\\": [{ \\\"log\\\": {}}]}\"\n },\n \"nativePlugins\":{\n \"functions_image\":\"{\\\"name\\\":\\\"image\\\",\\\"file\\\":\\\"https://packages.emqx.net/kuiper-plugins/1.8.1/debian/functions/image_amd64.zip\\\",\\\"shellParas\\\":[]}\",\n \"sources_video\":\"{\\\"name\\\":\\\"video\\\",\\\"file\\\":\\\"https://packages.emqx.net/kuiper-plugins/1.8.1/debian/sources/video_amd64.zip\\\",\\\"shellParas\\\":[]}\"\n },\n \"portablePlugins\":{\n },\n \"sourceConfig\":{\n \"mqtt\":\"{\\\"td\\\":{\\\"insecureSkipVerify\\\":false,\\\"password\\\":\\\"public\\\",\\\"protocolVersion\\\":\\\"3.1.1\\\",\\\"qos\\\":1,\\\"server\\\":\\\"tcp://broker.emqx.io:1883\\\",\\\"username\\\":\\\"admin\\\"},\\\"test\\\":{\\\"insecureSkipVerify\\\":false,\\\"password\\\":\\\"public\\\",\\\"protocolVersion\\\":\\\"3.1.1\\\",\\\"qos\\\":1,\\\"server\\\":\\\"tcp://127.0.0.1:1883\\\",\\\"username\\\":\\\"admin\\\"}}\"\n },\n \"sinkConfig\":{\n \"edgex\":\"{\\\"test\\\":{\\\"bufferLength\\\":1024,\\\"contentType\\\":\\\"application/json\\\",\\\"enableCache\\\":false,\\\"format\\\":\\\"json\\\",\\\"messageType\\\":\\\"event\\\",\\\"omitIfEmpty\\\":false,\\\"port\\\":6379,\\\"protocol\\\":\\\"redis\\\",\\\"sendSingle\\\":true,\\\"server\\\":\\\"localhost\\\",\\\"topic\\\":\\\"application\\\",\\\"type\\\":\\\"redis\\\"}}\"\n },\n \"connectionConfig\":{\n },\n \"Service\":{\n },\n \"Schema\":{\n },\n \"uploads\":{\n }\n}\n```", + "tags": [ + "data" + ], + "parameters": [ + { + "name": "stop", + "in": "query", + "description": "for plug-ins and static schema updates, users need to ensure that eKuiper can be restarted after exiting", + "required": false, + "example": "1", + "schema": { + "type": "integer" + } + }, + { + "name": "partial", + "in": "query", + "description": "Keep the old data and import new data (overwrite the tables/streams/rules/source config/sink config. install plugins/schema if not exist, else ignore them)", + "required": false, + "example": "1", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "title": "text content" + }, + "file": { + "type": "string", + "title": " file URI" + } + }, + "x-apifox-orders": [ + "content", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "content": "{json of the ruleset}" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ErrorMsg": { + "type": "string" + }, + "ConfigResponse": { + "type": "object", + "properties": { + "streams": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "tables": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "rules": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "nativePlugins": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "portablePlugins": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "sourceConfig": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "sinkConfig": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "connectionConfig": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "Service": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "Schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "streams", + "tables", + "rules", + "nativePlugins", + "portablePlugins", + "sourceConfig", + "sinkConfig", + "connectionConfig", + "Service", + "Schema" + ], + "x-apifox-orders": [ + "streams", + "tables", + "rules", + "nativePlugins", + "portablePlugins", + "sourceConfig", + "sinkConfig", + "connectionConfig", + "Service", + "Schema" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "ErrorMsg", + "ConfigResponse" + ], + "x-apifox-orders": [ + "ErrorMsg", + "ConfigResponse" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "ErrorMsg": "", + "ConfigResponse": { + "streams": {}, + "tables": {}, + "rules": {}, + "nativePlugins": {}, + "portablePlugins": {}, + "sourceConfig": {}, + "sinkConfig": {}, + "connectionConfig": {}, + "Service": {}, + "Schema": {} + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120995501-run" + } + }, + "/api/ekuiper/data/import/status": { + "get": { + "summary": "Import data status", + "x-apifox-folder": "Ekuiper/data", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API returns data import errors. If all returns are empty, it means that the import is completely successful.", + "tags": [ + "data" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "streams": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "tables": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "rules": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "nativePlugins": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "portablePlugins": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "sourceConfig": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "sinkConfig": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "connectionConfig": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "Service": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "Schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "uploads": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "streams", + "tables", + "rules", + "nativePlugins", + "portablePlugins", + "sourceConfig", + "sinkConfig", + "connectionConfig", + "Service", + "Schema", + "uploads" + ], + "x-apifox-orders": [ + "streams", + "tables", + "rules", + "nativePlugins", + "portablePlugins", + "sourceConfig", + "sinkConfig", + "connectionConfig", + "Service", + "Schema", + "uploads" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "streams": {}, + "tables": {}, + "rules": {}, + "nativePlugins": {}, + "portablePlugins": {}, + "sourceConfig": {}, + "sinkConfig": {}, + "connectionConfig": {}, + "Service": {}, + "Schema": {}, + "uploads": {} + } + }, + "2": { + "summary": "Failed to import plugin", + "value": { + "streams": {}, + "tables": {}, + "rules": {}, + "nativePlugins": { + "sinks_tdengine": "fail to download file file:///root/ekuiper-jran/_plugins/ubuntu/sinks/tdengine_amd64.zip: stat /root/ekuiper-jran/_plugins/ubuntu/sinks/tdengine_amd64.zip: no such file or directory", + "sources_random": "fail to download file file:///root/ekuiper-jran/_plugins/ubuntu/sources/random_amd64.zip: stat /root/ekuiper-jran/_plugins/ubuntu/sources/random_amd64.zip: no such file or directory" + }, + "portablePlugins": {}, + "sourceConfig": {}, + "sinkConfig": {}, + "connectionConfig": {}, + "Service": {}, + "Schema": {}, + "uploads": {} + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121013522-run" + } + }, + "/api/ekuiper/data/export": { + "get": { + "summary": "Export all data", + "x-apifox-folder": "Ekuiper/data", + "x-apifox-status": "released", + "deprecated": false, + "description": "Export all data,The export API returns a file to download.", + "tags": [ + "data" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": "{\n \"streams\": {},\n \"tables\": {},\n \"rules\": {},\n \"nativePlugins\": {},\n \"portablePlugins\": {},\n \"sourceConfig\": {},\n \"sinkConfig\": {},\n \"connectionConfig\": {},\n \"Service\": {},\n \"Schema\": {}\n}" + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121016081-run" + }, + "post": { + "summary": "Export specific rules related data", + "x-apifox-folder": "Ekuiper/data", + "x-apifox-status": "released", + "deprecated": false, + "description": "Export specific rules related data,The export API returns a file to download.", + "tags": [ + "data" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "[\"rule1\",\"rule2\"]": { + "type": "string" + } + }, + "required": [ + "[\"rule1\",\"rule2\"]" + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "streams": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "tables": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "rules": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "nativePlugins": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "portablePlugins": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "sourceConfig": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "sinkConfig": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "connectionConfig": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "Service": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "Schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + }, + "required": [ + "streams", + "tables", + "rules", + "nativePlugins", + "portablePlugins", + "sourceConfig", + "sinkConfig", + "connectionConfig", + "Service", + "Schema" + ], + "x-apifox-ignore-properties": [], + "x-apifox-orders": [ + "streams", + "tables", + "rules", + "nativePlugins", + "portablePlugins", + "sourceConfig", + "sinkConfig", + "connectionConfig", + "Service", + "Schema" + ] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "streams": {}, + "tables": {}, + "rules": {}, + "nativePlugins": {}, + "portablePlugins": {}, + "sourceConfig": {}, + "sinkConfig": {}, + "connectionConfig": {}, + "Service": {}, + "Schema": {} + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121022926-run" + } + }, + "/api/ekuiper/": { + "get": { + "summary": "Getting information", + "x-apifox-folder": "Ekuiper/overview", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to get the version number, system type, and program running time.", + "tags": [ + "overview" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "os": { + "type": "string" + }, + "upTimeSeconds": { + "type": "integer" + } + }, + "required": [ + "version", + "os", + "upTimeSeconds" + ], + "x-apifox-orders": [ + "version", + "os", + "upTimeSeconds" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "version": "1.0.1-22-g119ee91", + "os": "darwin", + "upTimeSeconds": 14 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121026189-run" + } + }, + "/api/ekuiper/ping": { + "get": { + "summary": "ping", + "x-apifox-folder": "Ekuiper/overview", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "overview" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "null" + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121026403-run" + } + }, + "/api/ekuiper/plugins/{type}": { + "post": { + "summary": "Create a plugin", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API accepts a JSON content to create a new plugin.The plugin is identified by the name. The name must be unique.\n\n### Parameters\n\n1. name: a unique name of the plugin. The name must be the same as the camel case version of the plugin with lowercase first letter. For example, if the exported plugin name is `Random`, then the name of this plugin is `random`.\n2. file: the url of the plugin files. The url can be `http` or `https` scheme or `file` scheme to refer to a local file path of the eKuiper server. It must be a zip file with: a compiled so file and the yaml file(only required for sources). If the plugin depends on some external dependencies, a bash script named install.sh can be provided to do the dependency installation. The name of the files must match the name of the plugin. Please check [Extension](../../extension/overview.md) for the naming rule.\n\n### Plugin File Format\n\n`Note`: For `portables` type, please refer to this [format](../../extension/portable/overview.md#package).\n\nA sample zip file for a source named random.zip\n\n1. Random@v1.0.0.so\n2. random.yaml\n3. install.sh\n4. Various dependency files/folders of install.sh\n - mysdk.zip\n - myconfig.conf\n5. etc directory: the runtime configuration files or dependency files. After installation, this directory will be\n renamed to the plugin name under {{eKuiperPath}}/etc/{{pluginType}} directory.\n\nNotice that, the install.sh will be run that the system may already had the lib or package. Make sure to check the path before. Below is an example install.sh to install a sample sdk lib.\n\n\n```shell #!/bin/sh\ndir=/usr/local/mysdk\ncur=$(dirname \"$0\")\necho \"Base path $cur\"\nif [ -d \"$dir\" ]; then\n echo \"SDK path $dir exists.\"\nelse\n echo \"Creating SDK path $dir\"\n mkdir -p $dir\n echo \"Created SDK path $dir\"\nfi\n\napt install --no-upgrade unzip\nif [ -d \"$dir/lib\" ]; then\n echo \"SDK lib path $dir/lib exists.\"\nelse\n echo \"Unzip SDK lib to path $dir\"\n unzip $cur/mysdk.zip -d $dir\n echo \"Unzipped SDK lib to path $dir\"\nfi\n\nif [ -f \"/etc/ld.so.conf.d/myconfig.conf\" ]; then\n echo \"/etc/ld.so.conf.d/myconfig.conf exists\"\nelse\n echo \"Copy conf file\"\n cp $cur/myconfig.conf /etc/ld.so.conf.d/\n echo \"Copied conf file\"\nfi\nldconfig\necho \"Done\"\n```\n", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "description": "value only can be \"sources\", \"sinks\", \"functions\",\"portables\"", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string", + "description": "- Request Sample when the file locates in a http server\n\n file:\"http://127.0.0.1/plugins/sources/random.zip\"\n\n- Request Sample for files locates in the same machine of the eKuiper server.\n\n file:\"file:///var/plugins/sources/random.zip\"" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "random", + "file": "http://127.0.0.1/plugins/sources/random.zip" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "name": "random", + "file": "file:///var/plugins/sources/random.zip" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121031556-run" + }, + "get": { + "summary": "Show plugins", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all of plugins defined in the server for a plugin type.", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "description": "value only can be \"sources\", \"sinks\", \"functions\",\"portables\"", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + "plugin1", + "plugin2" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121041047-run" + } + }, + "/api/ekuiper/plugins/{type}/{name}": { + "get": { + "summary": "Describe a sources plugin", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to print out the detailed definition of a plugin.", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "description": "value only can be \"sources\", \"sinks\", \"functions\",\"portables\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "path", + "description": "Path parameter `name` is the name of the plugin.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "name", + "version" + ], + "x-apifox-orders": [ + "name", + "version" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "name": "plugin1", + "version": "1.0.0" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121043474-run" + }, + "delete": { + "summary": "Drop a plugin", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for drop the plugin. Notice that, for native plugins, the eKuiper server needs to be restarted to take effect. The current rules will continue to run with the deleted native plugins successfully. For portable plugin, the deletion will take effect immediately. The current rules which are using that plugin may encounter errors but won't stop and can continue running if an updated plugin with the same name is created later. If this is not expected, manually stop or delete those rules before deleting a plugin.\n\nThe user can pass a query parameter to decide if eKuiper should be stopped after a delete in order to make the deletion take effect. The parameter is `stop` and only when the value is `1` will the eKuiper be stopped. The user has to manually restart it.", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "description": "value only can be \"sources\", \"sinks\", \"functions\",\"portables\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "stop", + "in": "query", + "description": "", + "required": false, + "example": "1", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121045298-run" + }, + "put": { + "summary": "Update a sources plugin", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "Notice that, native plugins can be updated, but the new version will not take effect until the eKuiper server is\nrestarted.\nPortable plugins can be updated, and the new version will take effect immediately even for the running rules.\nThe request body is the same as the create plugin request.", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "description": "value only can be \"sources\", \"sinks\", \"functions\",\"portables\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121046737-run" + } + }, + "/api/ekuiper/plugins/udfs": { + "get": { + "summary": "Show udfs", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all user defined functions which are defined across all plugins.\n\nUnlike source and sink plugins, function plugin can export multiple functions at once. The exported names must be unique globally across all plugins. There will be a one to many mapping between function and its container plugin. Thus, we provide show udf(user defined function) api to query all user defined functions so that users can check the name duplication. And we provide describe udf api to find out the defined plugin of a function. We also provide the register functions api to register the udf list for an auto loaded plugin.\n", + "tags": [ + "plugins" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + "func1", + "func2" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121050140-run" + } + }, + "/api/ekuiper/plugins/udfs/{name}": { + "get": { + "summary": "Describe an udf", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to find out the plugin which defines the UDF. [APIs to handle function plugin with multiple functions](doc-3173101)", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "plugin": { + "type": "string" + } + }, + "required": [ + "name", + "plugin" + ], + "x-apifox-orders": [ + "name", + "plugin" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "name": "funcName", + "plugin": "pluginName" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121050249-run" + } + }, + "/api/ekuiper/plugins/functions/{plugin_name}/register": { + "get": { + "summary": "Register functions", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API aims to register all exported functions in an auto loaded function plugin or when the exported functions are changed. If the plugin was loaded by CLI create command or REST create API with functions property specified, then this is not needed. The register API will persist the functions list in the kv. Unless the exported functions are changed, users only need to register it once.\n[APIs to handle function plugin with multiple functions](doc-3173101)", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "plugin_name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "functions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "functions" + ], + "x-apifox-orders": [ + "functions" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "functions": [ + "func1", + "func2" + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121050604-run" + } + }, + "/api/ekuiper/plugins/{type}/prebuild": { + "get": { + "summary": "Get the available plugins", + "x-apifox-folder": "Ekuiper/plugins", + "x-apifox-status": "released", + "deprecated": false, + "description": "According to the configuration `pluginHosts` in file `etc/kuiper.yaml` , it returns the plugins list that can be installed at local run eKuiper instance. By default, it get the list from `https://packages.emqx.net` .", + "tags": [ + "plugins" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "description": "value only can be \"sources\", \"sinks\", \"functions\",\"portables\"", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "file": "http://127.0.0.1:63767/kuiper-plugins/0.9.1/sinks/alpine/file_arm64.zip", + "influx": "http://127.0.0.1:63767/kuiper-plugins/0.9.1/sinks/alpine/influx_arm64.zip", + "zmq": "http://127.0.0.1:63768/kuiper-plugins/0.9.1/sinks/alpine/zmq_arm64.zip" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121055109-run" + } + }, + "/api/ekuiper/rules": { + "post": { + "summary": "Create a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API accepts a JSON content and create and start a rule.", + "tags": [ + "rules" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "log": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "log" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "id", + "sql", + "actions" + ], + "x-apifox-orders": [ + "id", + "sql", + "actions" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "id": "rule1", + "sql": "SELECT * FROM demo", + "actions": [ + { + "log": {} + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121060893-run" + }, + "get": { + "summary": "Show rules", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all of rules defined in the server with a brief status.", + "tags": [ + "rules" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "status" + ], + "x-apifox-orders": [ + "id", + "status" + ], + "x-apifox-ignore-properties": [] + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + { + "id": "rule1", + "status": "Running" + }, + { + "id": "rule2", + "status": "Stopped: canceled by error." + } + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121061337-run" + } + }, + "/api/ekuiper/rules/{id}": { + "get": { + "summary": "Describe a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for print the detailed definition of rule.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "id is the id or name of the rule.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "log": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "mqtt": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "topic": { + "type": "string" + } + }, + "required": [ + "server", + "topic" + ], + "x-apifox-orders": [ + "server", + "topic" + ], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "log", + "mqtt" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "sql", + "actions" + ], + "x-apifox-orders": [ + "sql", + "actions" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "sql": "SELECT * from demo", + "actions": [ + { + "log": {} + }, + { + "mqtt": { + "server": "tcp://127.0.0.1:1883", + "topic": "demoSink" + } + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121061827-run" + }, + "put": { + "summary": "Update a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API accepts a JSON content and update a rule.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "id is the id or name of the old rule.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "log": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "log" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "id", + "sql", + "actions" + ], + "x-apifox-orders": [ + "id", + "sql", + "actions" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "id": "rule1", + "sql": "SELECT * FROM demo", + "actions": [ + { + "log": {} + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121062446-run" + }, + "delete": { + "summary": "Drop a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for drop the rule.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121062764-run" + } + }, + "/api/ekuiper/rules/{id}/start": { + "post": { + "summary": "Start a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to start running the rule.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121064270-run" + } + }, + "/api/ekuiper/rules/{id}/stop": { + "post": { + "summary": "Stop a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to start running the rule.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121064504-run" + } + }, + "/api/ekuiper/rules/{id}/restart": { + "post": { + "summary": "Restart a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to start running the rule.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121065173-run" + } + }, + "/api/ekuiper/rules/{id}/status": { + "get": { + "summary": "Get the status of a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The command is used to get the status of the rule. If the rule is running, the metrics will be retrieved realtime. The status can be\n- $metrics\n- stopped: $reason", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source_demo_0_records_in_total": { + "type": "integer" + }, + "source_demo_0_records_out_total": { + "type": "integer" + }, + "source_demo_0_exceptions_total": { + "type": "integer" + }, + "source_demo_0_process_latency_ms": { + "type": "integer" + }, + "source_demo_0_buffer_length": { + "type": "integer" + }, + "source_demo_0_last_invocation": { + "type": "string" + }, + "op_filter_0_records_in_total": { + "type": "integer" + }, + "op_filter_0_records_out_total": { + "type": "integer" + }, + "op_filter_0_exceptions_total": { + "type": "integer" + }, + "op_filter_0_process_latency_ms": { + "type": "integer" + }, + "op_filter_0_buffer_length": { + "type": "integer" + }, + "op_filter_0_last_invocation": { + "type": "string" + } + }, + "required": [ + "source_demo_0_records_in_total", + "source_demo_0_records_out_total", + "source_demo_0_exceptions_total", + "source_demo_0_process_latency_ms", + "source_demo_0_buffer_length", + "source_demo_0_last_invocation", + "op_filter_0_records_in_total", + "op_filter_0_records_out_total", + "op_filter_0_exceptions_total", + "op_filter_0_process_latency_ms", + "op_filter_0_buffer_length", + "op_filter_0_last_invocation" + ], + "x-apifox-orders": [ + "source_demo_0_records_in_total", + "source_demo_0_records_out_total", + "source_demo_0_exceptions_total", + "source_demo_0_process_latency_ms", + "source_demo_0_buffer_length", + "source_demo_0_last_invocation", + "op_filter_0_records_in_total", + "op_filter_0_records_out_total", + "op_filter_0_exceptions_total", + "op_filter_0_process_latency_ms", + "op_filter_0_buffer_length", + "op_filter_0_last_invocation" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": "{\n \"source_demo_0_records_in_total\": 5,\n \"source_demo_0_records_out_total\": 5,\n \"source_demo_0_exceptions_total\": 0,\n \"source_demo_0_process_latency_ms\": 0,\n \"source_demo_0_buffer_length\": 0,\n \"source_demo_0_last_invocation\": \"2020-01-02T11:28:33.054821\",\n \"op_filter_0_records_in_total\": 5,\n \"op_filter_0_records_out_total\": 2,\n \"op_filter_0_exceptions_total\": 0,\n \"op_filter_0_process_latency_ms\": 0,\n \"op_filter_0_buffer_length\": 0,\n \"op_filter_0_last_invocation\": \"2020-01-02T11:28:33.054821\",\n}" + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121067003-run" + } + }, + "/api/ekuiper/rules/{id}/topo": { + "get": { + "summary": "Get the topology structure of a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The command is used to get the status of the rule represented as a json string. In the json string, there are 2 fields:\n\n- sources: it is a string array of the names of all source nodes. They are the entry of the topology.\n- edges: it is a hash map of all edges categorized by nodes. The keys are the starting point of an edge. And the value is a collection of ending point.", + "tags": [ + "rules" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "type": "string" + } + }, + "edges": { + "type": "object", + "properties": { + "op_project": { + "type": "array", + "items": { + "type": "string" + } + }, + "source_stream": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "op_project", + "source_stream" + ], + "x-apifox-orders": [ + "op_project", + "source_stream" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "sources", + "edges" + ], + "x-apifox-orders": [ + "sources", + "edges" + ], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121067658-run" + } + }, + "/api/ekuiper/rules/validate": { + "post": { + "summary": "Validate a rule", + "x-apifox-folder": "Ekuiper/rules", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API accepts a JSON content and validate a rule.\nFor the API, here is the explanation of the status codes:\n\n- If the request body is incorrect, a status code of 400 will be returned, indicating an invalid request.\n- If the rule validation fails, a status code of 422 will be returned, indicating an invalid rule.\n- If the rule validation passes, a status code of 200 will be returned, indicating a valid and successfully validated rule.", + "tags": [ + "rules" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "log": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "log" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "id", + "sql", + "actions" + ], + "x-apifox-orders": [ + "id", + "sql", + "actions" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "id": "rule1", + "sql": "SELECT * FROM demo", + "actions": [ + { + "log": {} + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121067840-run" + } + }, + "/api/ekuiper/ruleset/import": { + "post": { + "summary": "Import Ruleset", + "x-apifox-folder": "Ekuiper/ruleset", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API accepts rulesets and imports them into the system. If a stream or rule in the ruleset already exists, it is not created. The API returns text informing the number of streams and rules created. The API supports specifying rulesets by means of text content or file URIs.\n\n## Ruleset Format\n\nThe file format for importing and exporting ruleset is JSON, which can contain three parts: `streams`, `tables` and `rules`. Each type holds the the key-value pair of the name and the creation statement. In the following example file, we define a stream and two rules.\n\n```shell {\n \"streams\": {\n \"demo\": \"CREATE STREAM demo () WITH (DATASOURCE=\\\"users\\\", FORMAT=\\\"JSON\\\")\"\n },\n \"tables\": {},\n \"rules\": {\n \"rule1\": \"{\\\"id\\\": \\\"rule1\\\",\\\"sql\\\": \\\"SELECT * FROM demo\\\",\\\"actions\\\": [{\\\"log\\\": {}}]}\",\n \"rule2\": \"{\\\"id\\\": \\\"rule2\\\",\\\"sql\\\": \\\"SELECT * FROM demo\\\",\\\"actions\\\": [{ \\\"log\\\": {}}]}\"\n }\n}\n```", + "tags": [ + "ruleset" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "title": " Import by file URI" + }, + "content": { + "type": "string", + "title": " Import by text content" + } + }, + "x-apifox-orders": [ + "file", + "content" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "file": "file:///tmp/a.json" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121075911-run" + } + }, + "/api/ekuiper/ruleset/export": { + "post": { + "summary": "Export Ruleset", + "x-apifox-folder": "Ekuiper/ruleset", + "x-apifox-status": "released", + "deprecated": false, + "description": "The export API returns a file to download.", + "tags": [ + "ruleset" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121076182-run" + } + }, + "/api/ekuiper/schemas/protobuf": { + "post": { + "summary": "Create a schema", + "x-apifox-folder": "Ekuiper/schemas", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API accepts a JSON content and create a schema. Each schema type has a standalone endpoint. Currently, only one schema type `protobuf` is supported. Schema is identified by its name, so the name must be unique for each type.\n\nParameters\n1. name:the unique name of the schema.\n2. schema content, use `file` or `content` parameter to specify. After schema created, the schema content will be written into file `data/schemas/$shcema_type/$schema_name`.\n - file: the url of the schema file. The url can be `http` or `https` scheme or `file` scheme to refer to a local file path of the eKuiper server. The schema file must be the file type of the corresponding schema type. For example, protobuf schema file's extension name must be .proto.\n - content: the text content of the schema.\n3. soFile:The so file of the static plugin. Detail about the plugin creation, please check [customize format](../../guide/serialization/serialization.md#format-extension).", + "tags": [ + "schemas" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "content": { + "type": "string", + "title": "Schema content inside content." + }, + "file": { + "type": "string", + "title": "Schema content in a file" + }, + "soFile": { + "type": "string", + "title": "Schema with static plugin" + } + }, + "required": [ + "name" + ], + "x-apifox-orders": [ + "name", + "content", + "file", + "soFile" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121080031-run" + }, + "get": { + "summary": "Show schemas", + "x-apifox-folder": "Ekuiper/schemas", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all schemas defined in the server.", + "tags": [ + "schemas" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + "schema1", + "schema2" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121081412-run" + } + }, + "/api/ekuiper/schemas/protobuf/{name}": { + "get": { + "summary": "Describe a schema", + "x-apifox-folder": "Ekuiper/schemas", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for print the detailed definition of a schema.", + "tags": [ + "schemas" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the schema.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "content": { + "type": "string" + }, + "file": { + "type": "string" + } + }, + "required": [ + "type", + "name", + "content", + "file" + ], + "x-apifox-orders": [ + "type", + "name", + "content", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "type": "protobuf", + "name": "schema1", + "content": "message Book {required string title = 1; required int32 price = 2;}", + "file": "ekuiper\\etc\\schemas\\protobuf\\schema1.proto" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121081624-run" + }, + "delete": { + "summary": "Delete a schema", + "x-apifox-folder": "Ekuiper/schemas", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for dropping the schema.", + "tags": [ + "schemas" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121082085-run" + }, + "put": { + "summary": "Update a schema", + "x-apifox-folder": "Ekuiper/schemas", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for updating the schema. The request body is the same as creating a schema.", + "tags": [ + "schemas" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121084077-run" + } + }, + "/api/ekuiper/services": { + "post": { + "summary": "Register external services", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API accepts JSON content to create new external services.\n### parameter\n\n1. name: The unique name of the external service, which must be exactly the same as the json file of service definition in the zip file.\n2. file: URL of external service file. URL supports http, https and file modes. When using the file mode, the file must be on the machine where the eKuiper server is located. It must be a zip file, which contains the service description json file with the same name as the service and any other auxiliary files. The schema file must be in the schema folder.\n\n### Service file format\n\nA sample zip file of the source named sample.zip\n\n1. sample.json\n2. Schema directory: it contains one or more schema files used by the service. For example, sample.proto.\n\nAn example of a request for a file on an HTTP server:\n\n```json\n{\n \"name\":\"random\",\n \"file\":\"http://127.0.0.1/services/sample.zip\"\n}\n```\n\nAn example of a request for a file on the eKuiper server:\n\n```json\n{\n \"name\":\"random\",\n \"file\":\"file:///var/services/sample.zip\"\n}\n```\n\n### ", + "tags": [ + "services" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string", + "description": " a file on an HTTP server or a file on the eKuiper server." + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "random", + "file": "http://127.0.0.1/services/sample.zip" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121094424-run" + }, + "get": { + "summary": "Display external services", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to display all external services defined in the server.", + "tags": [ + "services" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + "sample", + "sample2" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121094856-run" + } + }, + "/api/ekuiper/services/{name}": { + "get": { + "summary": "Describe external services", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to print detailed definitions of external services.", + "tags": [ + "services" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "the name of the external service.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121095616-run" + }, + "delete": { + "summary": "Delete external services", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to delete external services, and all functions defined under the service will be deleted.", + "tags": [ + "services" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121096344-run" + }, + "put": { + "summary": "Update external services", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to update external services, and its parameters are the same as that of service registration.", + "tags": [ + "services" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file": { + "type": "string" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "file" + ], + "x-apifox-ignore-properties": [] + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121097883-run" + } + }, + "/api/ekuiper/services/functions": { + "get": { + "summary": "Display all external functions", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "Each service can contain multiple functions. This API is used to display the names of all external functions that can be used in SQL.", + "tags": [ + "services" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + "func1", + "func2" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121098266-run" + } + }, + "/api/ekuiper/services/functions/{name}": { + "get": { + "summary": "Describe external functions", + "x-apifox-folder": "Ekuiper/services", + "x-apifox-status": "released", + "deprecated": false, + "description": "This API is used to display the name of the service that defines this external function.", + "tags": [ + "services" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "serviceName": { + "type": "string" + } + }, + "required": [ + "name", + "serviceName" + ], + "x-apifox-orders": [ + "name", + "serviceName" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "name": "funcName", + "serviceName": "serviceName" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121098479-run" + } + }, + "/api/ekuiper/streams": { + "post": { + "summary": "Create a stream", + "x-apifox-folder": "Ekuiper/streams", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for creating a stream. For more detailed information of stream definition, please refer to [streams](../../sqls/streams.md).\nThis API can run any stream sql statements, not only stream creation.", + "tags": [ + "streams" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string" + } + }, + "required": [ + "sql" + ], + "x-apifox-orders": [ + "sql" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "sql": "create stream my_stream (id bigint, name string, score float) WITH ( datasource = \"topic/temperature\", FORMAT = \"json\", KEY = \"id\")" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121102062-run" + }, + "get": { + "summary": "Show streams", + "x-apifox-folder": "Ekuiper/streams", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all of streams defined in the server.", + "tags": [ + "streams" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "异常示例", + "value": [ + "mystream" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121102454-run" + } + }, + "/api/ekuiper/streams/{id}}": { + "get": { + "summary": "Describe a stream", + "x-apifox-folder": "Ekuiper/streams", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for print the detailed definition of stream.", + "tags": [ + "streams" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "StreamFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "FieldType": { + "type": "object", + "properties": { + "Type": { + "type": "integer" + } + }, + "required": [ + "Type" + ], + "x-apifox-orders": [ + "Type" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "Name", + "FieldType" + ], + "x-apifox-orders": [ + "Name", + "FieldType" + ], + "x-apifox-ignore-properties": [] + } + }, + "Options": { + "type": "object", + "properties": { + "DATASOURCE": { + "type": "string" + }, + "FORMAT": { + "type": "string" + } + }, + "required": [ + "DATASOURCE", + "FORMAT" + ], + "x-apifox-orders": [ + "DATASOURCE", + "FORMAT" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "Name", + "StreamFields", + "Options" + ], + "x-apifox-orders": [ + "Name", + "StreamFields", + "Options" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "Name": "demo", + "StreamFields": [ + { + "Name": "temperature", + "FieldType": { + "Type": 2 + } + }, + { + "Name": "ts", + "FieldType": { + "Type": 1 + } + } + ], + "Options": { + "DATASOURCE": "demo", + "FORMAT": "JSON" + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121103241-run" + } + }, + "/api/ekuiper/streams/{id}/schema": { + "get": { + "summary": "Get stream schema", + "x-apifox-folder": "Ekuiper/streams", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to get the stream schema. The schema is inferred from the physical and logical schema definitions.", + "tags": [ + "streams" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ], + "x-apifox-orders": [ + "type" + ], + "x-apifox-ignore-properties": [] + }, + "name": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ], + "x-apifox-orders": [ + "type" + ], + "x-apifox-ignore-properties": [] + }, + "age": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ], + "x-apifox-orders": [ + "type" + ], + "x-apifox-ignore-properties": [] + }, + "hobbies": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "properties": { + "type": "object", + "properties": { + "indoor": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ], + "x-apifox-orders": [ + "type" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "type", + "items" + ], + "x-apifox-orders": [ + "type", + "items" + ], + "x-apifox-ignore-properties": [] + }, + "outdoor": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ], + "x-apifox-orders": [ + "type" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "type", + "items" + ], + "x-apifox-orders": [ + "type", + "items" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "indoor", + "outdoor" + ], + "x-apifox-orders": [ + "indoor", + "outdoor" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "type", + "properties" + ], + "x-apifox-orders": [ + "type", + "properties" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "id", + "name", + "age", + "hobbies" + ], + "x-apifox-orders": [ + "id", + "name", + "age", + "hobbies" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "id": { + "type": "bigint" + }, + "name": { + "type": "string" + }, + "age": { + "type": "bigint" + }, + "hobbies": { + "type": "struct", + "properties": { + "indoor": { + "type": "array", + "items": { + "type": "string" + } + }, + "outdoor": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121104415-run" + } + }, + "/api/ekuiper/streams/{id}": { + "get": { + "summary": "Update a stream", + "x-apifox-folder": "Ekuiper/streams", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for update the stream definition.", + "tags": [ + "streams" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "the id or name of the old stream.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string" + } + }, + "required": [ + "sql" + ], + "x-apifox-orders": [ + "sql" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "sql": "create stream my_stream (id bigint, name string, score float) WITH ( datasource = \"topic/temperature\", FORMAT = \"json\", KEY = \"id\")" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121104974-run" + }, + "delete": { + "summary": "Drop a stream", + "x-apifox-folder": "Ekuiper/streams", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for drop the stream definition.", + "tags": [ + "streams" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121105204-run" + } + }, + "/api/ekuiper/tables": { + "post": { + "summary": "Create a table", + "x-apifox-folder": "Ekuiper/tables", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for creating a table. For more detailed information of table definition, please refer to [tables](../../sqls/tables.md).\nThis API can run any table sql statements, not only table creation.", + "tags": [ + "tables" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string" + } + }, + "required": [ + "sql" + ], + "x-apifox-orders": [ + "sql" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "sql": "create table my_table (id bigint, name string, score float) WITH ( datasource = \"lookup.json\", FORMAT = \"json\", KEY = \"id\")" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121107564-run" + }, + "get": { + "summary": "Show tables", + "x-apifox-folder": "Ekuiper/tables", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all of tables defined in the server.\nThis API accepts one parameter kind, the value could be `scan` or `lookup` to query each kind of tables. Other values are invalid, it will return all kinds of tables. ", + "tags": [ + "tables" + ], + "parameters": [ + { + "name": "kind", + "in": "query", + "description": "query all the lookup tables.", + "required": false, + "example": "lookup", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "异常示例", + "value": [ + "mytable" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121108127-run" + } + }, + "/api/ekuiper/tables/{id}}": { + "get": { + "summary": "Describe a table", + "x-apifox-folder": "Ekuiper/tables", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for print the detailed definition of table.", + "tags": [ + "tables" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "StreamFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "FieldType": { + "type": "object", + "properties": { + "Type": { + "type": "integer" + } + }, + "required": [ + "Type" + ], + "x-apifox-orders": [ + "Type" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "Name", + "FieldType" + ], + "x-apifox-orders": [ + "Name", + "FieldType" + ], + "x-apifox-ignore-properties": [] + } + }, + "Options": { + "type": "object", + "properties": { + "DATASOURCE": { + "type": "string" + }, + "FORMAT": { + "type": "string" + } + }, + "required": [ + "DATASOURCE", + "FORMAT" + ], + "x-apifox-orders": [ + "DATASOURCE", + "FORMAT" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "Name", + "StreamFields", + "Options" + ], + "x-apifox-orders": [ + "Name", + "StreamFields", + "Options" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "Name": "demo", + "StreamFields": [ + { + "Name": "temperature", + "FieldType": { + "Type": 2 + } + }, + { + "Name": "ts", + "FieldType": { + "Type": 1 + } + } + ], + "Options": { + "DATASOURCE": "lookup.json", + "FORMAT": "JSON" + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121109117-run" + } + }, + "/api/ekuiper/tables/{id}/schema": { + "get": { + "summary": "Get table schema", + "x-apifox-folder": "Ekuiper/tables", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used to get the table schema. The schema is inferred from the physical and logical schema definitions.", + "tags": [ + "tables" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121110544-run" + } + }, + "/api/ekuiper/tables/{id}": { + "put": { + "summary": "Update a table", + "x-apifox-folder": "Ekuiper/tables", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for update the table definition.", + "tags": [ + "tables" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "the id or name of the old table.", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string" + } + }, + "required": [ + "sql" + ], + "x-apifox-orders": [ + "sql" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "sql": "create table my_table (id bigint, name string, score float) WITH ( datasource = \"topic/temperature\", FORMAT = \"json\", KEY = \"id\")" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121112174-run" + }, + "delete": { + "summary": "Drop a table", + "x-apifox-folder": "Ekuiper/tables", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for drop the table definition.", + "tags": [ + "tables" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121112366-run" + } + }, + "/api/ekuiper/config/uploads": { + "post": { + "summary": "Upload a configuration file", + "x-apifox-folder": "Ekuiper/uploads", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API supports to upload a local file, provide the text content of file or upload a http file link. The upload request will save the file into your `${dataPath}/uploads`. It will override the existed file of the same name. The response is the absolute path of the uploaded file which you can refer in other configurations.\n\n### Upload by a file\n\nThe API accepts a multipart file upload requests. Below is an example html file to upload file to `http://127.0.0.1:9081/config/uploads`. In the form data, the file input name must be `uploadFile`.\n\n```shell \n\n \n \n \n \n Upload File\n \n \n \n \n \n \n \n\n```\n### Upload by content\n\nProvide the text content and file name to create a configuration file.\n\n\n```json \n{\n \"name\": \"my.json\",\n \"content\": \"{\\\"hello\\\":\\\"world\\\"}\"\n}\n```\n\n### Upload by HTTP file link\n```json \n{\n \"name\": \"my.json\",\n \"file\": \"http://127.0.0.1:80/my.json\"\n}\n```", + "tags": [ + "uploads" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "configuration file name" + }, + "content": { + "type": "string", + "title": " text content" + }, + "file": { + "type": "string", + "title": "HTTP file link", + "description": "Should put the file in HTTP Server in advance" + } + }, + "required": [ + "name", + "file" + ], + "x-apifox-orders": [ + "name", + "content", + "file" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "my.json", + "content": "{\"hello\":\"world\"}" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121118567-run" + }, + "get": { + "summary": "Show uploaded file list", + "x-apifox-folder": "Ekuiper/uploads", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for displaying all files in the `${dataPath}/uploads` path.", + "tags": [ + "uploads" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "1": { + "summary": "success", + "value": [ + "/ekuiper/data/uploads/zk.gif", + "/ekuiper/data/uploads/abc.gif" + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121118950-run" + } + }, + "/config/uploads/{fileName}": { + "delete": { + "summary": "Delete an uploaded file", + "x-apifox-folder": "Ekuiper/uploads", + "x-apifox-status": "released", + "deprecated": false, + "description": "The API is used for deleting a file in the `${dataPath}/uploads` path.", + "tags": [ + "uploads" + ], + "parameters": [ + { + "name": "fileName", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121119036-run" + } + } + }, + "components": { + "schemas": { + "neuron-error": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Data-schemas" + }, + "neuron-0": { + "type": "object", + "properties": { + "error": { + "type": "integer" + } + }, + "required": [ + "error" + ], + "x-apifox-orders": [ + "error" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Data-schemas" + }, + "neuron-token": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "x-apifox-orders": [ + "token" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Data-schemas" + }, + "DeliverBody": { + "type": "object", + "required": [ + "template" + ], + "properties": { + "template": { + "type": "string", + "x-go-name": "Template" + } + }, + "x-apifox-orders": [ + "template" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "SyslogReq": { + "type": "object", + "required": [ + "enabled", + "network", + "addr", + "priority", + "tag" + ], + "properties": { + "addr": { + "description": "address of log remote forwarding.", + "type": "string", + "x-go-name": "Addr" + }, + "enabled": { + "description": "whether to enable log remote forwarding. true: enable; false: disable", + "type": "boolean", + "x-go-name": "Enabled" + }, + "network": { + "description": "now only support udp4", + "type": "string", + "x-go-name": "Network" + }, + "priority": { + "description": "value can be emerg/alert/crit/err/warning/notice/info/debug", + "type": "string", + "x-go-name": "Priority" + }, + "tag": { + "description": "syslog protocol tag field, used for syslog server to identify which neuronex client send the syslog message", + "type": "string", + "x-go-name": "Tag" + } + }, + "x-apifox-orders": [ + "addr", + "enabled", + "network", + "priority", + "tag" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "syslogInfoData": { + "type": "object", + "required": [ + "enabled", + "network", + "addr", + "priority", + "tag" + ], + "properties": { + "addr": { + "description": "address of log remote forwarding.", + "type": "string", + "x-go-name": "Addr" + }, + "enabled": { + "description": "whether to enable log remote forwarding. true: enable; false: disable", + "type": "boolean", + "x-go-name": "Enabled" + }, + "network": { + "description": "now only support udp4", + "type": "string", + "x-go-name": "Network" + }, + "priority": { + "description": "value can be emerg/alert/crit/err/warning/notice/info/debug", + "type": "string", + "x-go-name": "Priority" + }, + "tag": { + "description": "syslog protocol tag field, used for syslog server to identify which neuronex client send the syslog message", + "type": "string", + "x-go-name": "Tag" + } + }, + "x-apifox-orders": [ + "addr", + "enabled", + "network", + "priority", + "tag" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "QuerySystemInfoResp": { + "type": "object", + "required": [ + "version", + "systemStatus", + "neuronRunningTime", + "neuronStatus", + "neuronMemoryUsed", + "neuronMemoryTotal", + "ekuiperRunningTime", + "ekuiperStatus", + "ekuiperMemoryUsed", + "ekuiperMemoryTotal", + "hwToken", + "os", + "arch" + ], + "properties": { + "arch": { + "type": "string", + "x-go-name": "Arch" + }, + "ekuiperMemoryTotal": { + "description": " unit: byte", + "type": "string", + "x-go-name": "EkuiperMemoryTotal" + }, + "ekuiperMemoryUsed": { + "description": " unit: byte", + "type": "string", + "x-go-name": "EkuiperMemoryUsed" + }, + "ekuiperRunningTime": { + "description": " unit: second", + "type": "string", + "x-go-name": "EkuiperRunningTime" + }, + "ekuiperStatus": { + "description": " 0:normal 1:exception", + "type": "string", + "x-go-name": "EkuiperStatus" + }, + "hwToken": { + "description": "Hardware Identification", + "type": "string", + "x-go-name": "HwToken" + }, + "neuronMemoryTotal": { + "description": " unit: byte", + "type": "string", + "x-go-name": "NeuronMemoryTotal" + }, + "neuronMemoryUsed": { + "description": " unit: byte", + "type": "string", + "x-go-name": "NeuronMemoryUsed" + }, + "neuronRunningTime": { + "description": " unit: second", + "type": "string", + "x-go-name": "NeuronRunningTime" + }, + "neuronStatus": { + "description": " 0:normal 1:exception", + "type": "string", + "x-go-name": "NeuronStatus" + }, + "os": { + "type": "string", + "x-go-name": "Os" + }, + "systemStatus": { + "description": " 0:normal 1:exception", + "type": "string", + "x-go-name": "SystemStatus" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-apifox-orders": [ + "arch", + "ekuiperMemoryTotal", + "ekuiperMemoryUsed", + "ekuiperRunningTime", + "ekuiperStatus", + "hwToken", + "neuronMemoryTotal", + "neuronMemoryUsed", + "neuronRunningTime", + "neuronStatus", + "os", + "systemStatus", + "version" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "PasswordChangeBody": { + "type": "object", + "required": [ + "name", + "old_pass", + "new_pass" + ], + "properties": { + "name": { + "type": "string", + "x-go-name": "Username" + }, + "new_pass": { + "type": "string", + "x-go-name": "NewPassword" + }, + "old_pass": { + "type": "string", + "x-go-name": "OldPassword" + } + }, + "x-apifox-orders": [ + "name", + "new_pass", + "old_pass" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "responseData": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "x-go-name": "Token" + } + }, + "x-apifox-orders": [ + "token" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "LoginBody": { + "type": "object", + "required": [ + "name", + "pass" + ], + "properties": { + "name": { + "type": "string", + "x-go-name": "Username" + }, + "pass": { + "type": "string", + "x-go-name": "Password" + } + }, + "x-apifox-orders": [ + "name", + "pass" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "UsedTagCountResponse": { + "type": "object", + "required": [ + "usedTagCount" + ], + "properties": { + "usedTagCount": { + "type": "integer", + "format": "uint64", + "x-go-name": "UsedTagCount" + } + }, + "x-apifox-orders": [ + "usedTagCount" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "DeliverLicenseReqData": { + "type": "object", + "required": [ + "license" + ], + "properties": { + "license": { + "description": "\tcontents of the virtual license generated by ECP", + "type": "string", + "x-go-name": "License" + } + }, + "x-apifox-orders": [ + "license" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "StatusError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "description": "错误代码", + "type": "integer", + "format": "int64", + "x-go-name": "Code" + }, + "message": { + "description": "错误信息", + "type": "string", + "x-go-name": "Msg" + } + }, + "x-apifox-orders": [ + "code", + "message" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "SendActivationCodeReqData": { + "type": "object", + "required": [ + "activationCode" + ], + "properties": { + "activationCode": { + "type": "string", + "x-go-name": "ActivationCode" + } + }, + "x-apifox-orders": [ + "activationCode" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "UploadLicenseResponse": { + "type": "object", + "required": [ + "type", + "customerName", + "customerContact", + "startDate", + "expiredDate", + "expired", + "totalTagCount", + "usedTagCount", + "enabledPlugins", + "hardwareToken", + "ekuiperOn", + "officialEmail" + ], + "properties": { + "customerContact": { + "type": "string", + "x-go-name": "CustomerContact" + }, + "customerName": { + "type": "string", + "x-go-name": "CustomerName" + }, + "ekuiperOn": { + "description": "\tWhether to enable data stream processing", + "type": "boolean", + "x-go-name": "EkuiperOn" + }, + "enabledPlugins": { + "description": "Plugins supported by current license", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "EnabledPlugins" + }, + "expired": { + "description": "\tWhether the license is expired or not", + "type": "boolean", + "x-go-name": "Expired" + }, + "expiredDate": { + "description": "License expiration time (utc time)", + "type": "string", + "x-go-name": "ExpiredDate" + }, + "hardwareToken": { + "description": "\tHardware identification", + "type": "string", + "x-go-name": "HardwareToken" + }, + "officialEmail": { + "description": "Issuing Email", + "type": "string", + "x-go-name": "OfficialEmail" + }, + "startDate": { + "description": "License effective time (utc time)", + "type": "string", + "x-go-name": "StartDate" + }, + "totalTagCount": { + "description": "\tMaximum number of tag supported by license", + "type": "integer", + "format": "uint64", + "x-go-name": "TotalTagCount" + }, + "type": { + "description": "The value can be TRIAL, OFFCIAL, VIRTUAL.", + "type": "string", + "x-go-name": "LicenseType" + }, + "usedTagCount": { + "description": "Number of tags currently in use", + "type": "integer", + "format": "uint64", + "x-go-name": "UsedTagCount" + } + }, + "x-apifox-orders": [ + "customerContact", + "customerName", + "ekuiperOn", + "enabledPlugins", + "expired", + "expiredDate", + "hardwareToken", + "officialEmail", + "startDate", + "totalTagCount", + "type", + "usedTagCount" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "UploadLicenseReqData": { + "type": "object", + "required": [ + "license" + ], + "properties": { + "license": { + "description": "\tContents of the license file to be uploaded", + "type": "string", + "x-go-name": "License" + } + }, + "x-apifox-orders": [ + "license" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + }, + "GetLicenseResponse": { + "type": "object", + "required": [ + "licenseType", + "customerName", + "customerContact", + "startDate", + "expiredDate", + "expired", + "totalTagCount", + "usedTagCount", + "enabledPlugins", + "hardwareToken", + "ekuiperOn", + "officialEmail" + ], + "properties": { + "customerContact": { + "type": "string", + "x-go-name": "CustomerContact" + }, + "customerName": { + "type": "string", + "x-go-name": "CustomerName" + }, + "ekuiperOn": { + "description": "\tWhether to enable data stream processing", + "type": "boolean", + "x-go-name": "EkuiperOn" + }, + "enabledPlugins": { + "description": "Plugins supported by current license", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "EnabledPlugins" + }, + "expired": { + "description": "\tWhether the license is expired or not", + "type": "boolean", + "x-go-name": "Expired" + }, + "expiredDate": { + "description": "License expiration time (utc time)", + "type": "string", + "x-go-name": "ExpiredDate" + }, + "hardwareToken": { + "description": "\tHardware identification", + "type": "string", + "x-go-name": "HardwareToken" + }, + "licenseType": { + "description": "The value can be TRIAL, OFFCIAL, VIRTUAL.", + "type": "string", + "x-go-name": "LicenseType" + }, + "officialEmail": { + "description": "Issuing Email", + "type": "string", + "x-go-name": "OfficialEmail" + }, + "startDate": { + "description": "License effective time (utc time)", + "type": "string", + "x-go-name": "StartDate" + }, + "totalTagCount": { + "description": "\tMaximum number of tag supported by license", + "type": "integer", + "format": "uint64", + "x-go-name": "TotalTagCount" + }, + "usedTagCount": { + "description": "Number of tags currently in use", + "type": "integer", + "format": "uint64", + "x-go-name": "UsedTagCount" + } + }, + "x-apifox-orders": [ + "customerContact", + "customerName", + "ekuiperOn", + "enabledPlugins", + "expired", + "expiredDate", + "hardwareToken", + "licenseType", + "officialEmail", + "startDate", + "totalTagCount", + "usedTagCount" + ], + "x-apifox-ignore-properties": [], + "x-apifox-folder": "Schemas" + } + } + }, + "servers": [] +} \ No newline at end of file diff --git a/neuronex/zh_CN/api/rw.md b/neuronex/zh_CN/api/rw.md deleted file mode 100644 index 5d45122..0000000 --- a/neuronex/zh_CN/api/rw.md +++ /dev/null @@ -1,142 +0,0 @@ -# 读写 - -## 读 Tag - -*POST* /api/v2/read - -### 请求头部 - -**Content--Type** application/json - -**Authorization** Bearer \ - -### 响应状态 - -* 200 - -### 请求体 - -```json -{ - //node name - "node": "modbus-tcp-1", - //group name - "group": "config_modbus_tcp_sample_2" -} -``` - -### 响应 - -```json -{ - "tags": [ - { - //tag nmae - "name": "data1", - //tag value - "value": 1, - }, - { - "name": "data2", - "error": 2014 - }, - { - "name": "data3", - "value": true, - } - ] -} -``` - -::: tip -当某个点位读数值出错时,将显示 **error** 字段,不再显示 **value** 字段。 -::: - -## 写 Tag - -### 写一个 Tag - -*POST* /api/v2/write - -#### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -#### 响应状态 - -* 200 OK - -#### 请求体 - -```json -{ - "node": "modbus-tcp-1", - "group": "config_modbus_tcp_sample_2", - "tag": "tag1", - "value": 1234 -} -``` - -#### 响应 - -```json -{ - "error": 0 -} -``` - -### 写多个 Tag - -*POST* /api/v2/write/tags - -#### 请求头部 - -**Content-Type** application/json - -**Authorization** Bearer \ - -#### 响应状态 - -* 200 OK - -#### 请求体 - -```json -{ - "node": "modbus-tcp-1", - "group": "group1", - "tags": [ - - { - "tag": "tag1", - "value": 123 - }, - { - "tag": "tag2", - "value": 1233 - }, - { - "tag": "tag3", - "value": 7788 - }, - { - "tag": "tag4", - "value": 1 - }, - { - "tag": "tag5", - "value": "asdfda" - } - ] -} -``` - -#### 响应 - -```json -{ - "error": 0 -} -``` \ No newline at end of file