From 92f55d604404342a7829582d05e4c07de2ea7ce6 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Tue, 24 Sep 2024 17:34:53 +0800 Subject: [PATCH 1/7] feat: use npx @redocly/cli build-docs to instead the redoc-cli bundle --- .github/workflows/deploy_docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index 2817b20..2802ef4 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -105,7 +105,7 @@ jobs: yarn global add redoc-cli LANGS=(zh en) for lang in "${LANGS[@]}"; do - redoc-cli bundle redoc/api-swagger-${lang}.json -t redoc/template.hbs \ + npx @redocly/cli build-docs redoc/api-swagger-${lang}.json -t redoc/template.hbs \ --output docs/.vitepress/dist/${lang}/neuronex/${VERSION}/api/api-docs.html \ --options.theme.colors.primary.main=#00b173 \ --options.theme.typography.headings.fontFamily='Roboto, sans-serif' \ From ee2294026a00db367398fb2517f6aed4f8e14691 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Tue, 24 Sep 2024 17:49:49 +0800 Subject: [PATCH 2/7] chore: add ci branch for ci test --- .github/workflows/deploy_docs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index 2802ef4..638847e 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -10,6 +10,7 @@ on: - v* branches: - main + - ci jobs: deploy: From 210d403281c983869633a3777944e356a2f69483 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Fri, 27 Sep 2024 09:59:52 +0800 Subject: [PATCH 3/7] feat: just retain one api-swagger.json file --- .github/workflows/deploy_docs.yaml | 3 +- redocly/api-swagger-en.json | 14716 --------------------------- redocly/api-swagger-zh.json | 14016 ------------------------- redocly/api-swagger.json | 8318 +++++++++++++++ 4 files changed, 8320 insertions(+), 28733 deletions(-) delete mode 100644 redocly/api-swagger-en.json delete mode 100644 redocly/api-swagger-zh.json create mode 100644 redocly/api-swagger.json diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index 638847e..a425c5c 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -104,9 +104,10 @@ jobs: run: | cd frontend yarn global add redoc-cli + set -x LANGS=(zh en) for lang in "${LANGS[@]}"; do - npx @redocly/cli build-docs redoc/api-swagger-${lang}.json -t redoc/template.hbs \ + npx @redocly/cli build-docs redoc/api-swagger.json -t redoc/template.hbs \ --output docs/.vitepress/dist/${lang}/neuronex/${VERSION}/api/api-docs.html \ --options.theme.colors.primary.main=#00b173 \ --options.theme.typography.headings.fontFamily='Roboto, sans-serif' \ diff --git a/redocly/api-swagger-en.json b/redocly/api-swagger-en.json deleted file mode 100644 index c351e3a..0000000 --- a/redocly/api-swagger-en.json +++ /dev/null @@ -1,14716 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "NeuronEX API", - "description": "", - "version": "1.0.0" - }, - "tags": [ - { - "name": "NeuronEX-API" - }, - { - "name": "System" - }, - { - "name": "server" - }, - { - "name": "management" - }, - { - "name": "liveness" - }, - { - "name": "log" - }, - { - "name": "monitor" - }, - { - "name": "process_control" - }, - { - "name": "status" - }, - { - "name": "sse" - }, - { - "name": "sso" - }, - { - "name": "template" - }, - { - "name": "ekuiper_plugin" - }, - { - "name": "tunnel" - }, - { - "name": "license" - }, - { - "name": "Data Collection" - }, - { - "name": "data collection 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" - }, - { - "name": "data processing metrics" - }, - { - "name": "test rule" - }, - { - "name": "udf" - } - ], - "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" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "licenseType": "TRIAL", - "customerName": "EMQ Technologies Inc.", - "customerContact": "support@emqx.io", - "startDate": "2023-12-06 03:28:25", - "expiredDate": "2123-12-06 03:28:25", - "expired": false, - "totalTagCount": 30, - "usedTagCount": 0, - "enabledPlugins": [ - "ABB COMLI", - "Allen-Bradley ControlLogix 5500", - "Allen-Bradley DF1", - "Allen-Bradley MicroLogix 1400", - "BACnet/IP", - "Beckhoff ADS", - "DLT645-1997", - "DLT645-2007", - "EtherNet/IP(CIP)", - "GE SRTP", - "HJ212-2017", - "HOSTLINK CMODE", - "IEC60870-5-104", - "IEC61850", - "Inovance Modbus TCP", - "KNXnet/IP", - "KUKA ETHERNET KRL TCP", - "Mitsubishi 1E", - "Mitsubishi 3E", - "Mitsubishi FX", - "Modbus RTU", - "Modbus TCP", - "Modbus TCP QH", - "NON A11", - "OPC UA", - "Omron FINS TCP", - "Omron FINS UDP", - "Panasonic Mewtocol", - "Profinet IO", - "SECS GEM HSMS", - "Siemens FetchWrite", - "Siemens RK512", - "Siemens S7 ISOTCP", - "Siemens S7 ISOTCP for 300/400", - "SparkPlugB", - "WebSocket" - ], - "hardwareToken": "FdVCScD63F5gGcB0eO5OuwQsxg5jJoa+YOxyOub9c5g=", - "ekuiperOn": true, - "officialEmail": "support@emqx.io" - } - } - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "license": "CAIaFUVNUSBUZWNobm9s..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UploadLicenseResponse" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "type": "TRIAL", - "customerName": "EMQ Technologies Inc.", - "customerContact": "support@emqx.io", - "startDate": "2023-12-06", - "expiredDate": "2123-12-06", - "expired": false, - "totalTagCount": 1000, - "usedTagCount": 1, - "enabledPlugins": [ - "ABB COMLI", - "Allen-Bradley ControlLogix 5500", - "Allen-Bradley DF1", - "Allen-Bradley MicroLogix 1400", - "BACnet/IP", - "Beckhoff ADS", - "DLT645-1997", - "DLT645-2007", - "EtherNet/IP(CIP)", - "GE SRTP", - "HJ212-2017", - "HOSTLINK CMODE", - "IEC60870-5-104", - "IEC61850", - "Inovance Modbus TCP", - "KNXnet/IP", - "KUKA ETHERNET KRL TCP", - "Mitsubishi 1E", - "Mitsubishi 3E", - "Mitsubishi FX", - "Modbus RTU", - "Modbus TCP", - "Modbus TCP QH", - "NON A11", - "OPC UA", - "Omron FINS TCP", - "Omron FINS UDP", - "Panasonic Mewtocol", - "Profinet IO", - "SECS GEM HSMS", - "Siemens FetchWrite", - "Siemens RK512", - "Siemens S7 ISOTCP", - "Siemens S7 ISOTCP for 300/400", - "SparkPlugB", - "WebSocket" - ], - "hardwareToken": "", - "ekuiperOn": true, - "officialEmail": "support@emqx.io" - } - } - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "activationCode": "6YnJBVBOcL2pBQgwnPdtdtW..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusError" - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "license": "CAIaFUVNUSBUZWNobm9s..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusError" - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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-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": { - "license": "CAIaFUVNUSBUZWNobm9s..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusError" - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": {} - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719065-run" - } - }, - "/api/plugin/portable": { - "post": { - "summary": "Create ekuiper plugin ", - "x-apifox-folder": "NeuronEX/ekuiper_plugin", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "ekuiper_plugin" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "name": { - "type": "string" - }, - "operationId": { - "type": "integer" - } - }, - "required": [ - "address", - "name", - "operationId" - ], - "x-apifox-ignore-properties": [], - "x-apifox-orders": [ - "address", - "name", - "operationId" - ] - }, - "example": { - "address": "http://127.0.0.1:9081", - "name": "123456", - "operationId": 10 - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": "" - } - } - } - } - } - } - } - }, - "/api/ek_service": { - "post": { - "summary": "Create external service", - "x-apifox-folder": "NeuronEX/ekuiper_plugin", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "ekuiper_plugin" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "headers": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - } - }, - "required": [ - "name", - "address", - "headers" - ], - "x-apifox-ignore-properties": [], - "x-apifox-orders": [ - "name", - "address", - "headers" - ] - }, - "example": { - "name": "test", - "address": "http://127.0.0.1:9081", - "headers": {} - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": "" - } - } - } - } - } - } - } - }, - "/api/ek_service/${serviceName}": { - "delete": { - "summary": "Delete external service ", - "x-apifox-folder": "NeuronEX/ekuiper_plugin", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "ekuiper_plugin" - ], - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": "" - } - } - } - } - } - } - } - }, - "/api/tunnel": { - "get": { - "summary": "Get ECP Tunnel Config info", - "x-apifox-folder": "NeuronEX/tunnel", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "tunnel" - ], - "parameters": [], - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enable": { - "type": "boolean" - }, - "enableSSL": { - "type": "boolean" - }, - "registerId": { - "type": "string" - } - }, - "required": [ - "enable", - "enableSSL", - "registerId" - ], - "x-apifox-orders": [ - "enable", - "enableSSL", - "registerId" - ], - "x-apifox-ignore-properties": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "enable": false, - "enableSSL": false, - "registerId": "dc3e97118e33-1115b9328bfb58948407" - } - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-161376701-run" - }, - "post": { - "summary": "ECP Tunnel configuration", - "x-apifox-folder": "NeuronEX/tunnel", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "tunnel" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enable": { - "type": "boolean" - }, - "enableSSL": { - "type": "boolean" - }, - "address": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "description": { - "type": "string" - }, - "certificationRaw": { - "type": "string" - }, - "privateKeyRaw": { - "type": "string" - }, - "rootCARaw": { - "type": "string" - }, - "registerId": { - "type": "string" - } - }, - "required": [ - "enable", - "enableSSL", - "address", - "username", - "password", - "description", - "certificationRaw", - "privateKeyRaw", - "rootCARaw", - "registerId" - ], - "x-apifox-orders": [ - "enable", - "enableSSL", - "address", - "username", - "password", - "description", - "certificationRaw", - "privateKeyRaw", - "rootCARaw", - "registerId" - ], - "x-apifox-ignore-properties": [] - }, - "example": { - "enable": false, - "enableSSL": false, - "address": "tcp://127.0.0.1:1883", - "username": "admin", - "password": "password", - "description": "test", - "certificationRaw": "cert_base64", - "privateKeyRaw": "key_base64", - "rootCARaw": "ca_base64", - "registerId": "1234567890" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - } - } - } - } - } - } - }, - "/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": { - "name": "admin", - "password": "0000" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/responseData" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "token": "eyJhbGciOiJ....", - "role": "Administrator" - } - } - } - } - } - }, - "401": { - "description": "Username or Password incorrect!", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719066-run" - } - }, - "/api/users/password/{name}": { - "put": { - "summary": "Change password", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "passwordChangeHandler", - "tags": [ - "server" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "username to be deleted", - "required": true, - "example": "test", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PasswordChangeBody" - }, - "example": { - "name": "test", - "old_password": "0000", - "new_password": "1111" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" - } - }, - "/api/users": { - "post": { - "summary": "Creat New User", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "newUserHandler", - "tags": [ - "server" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewUserRequestBody" - }, - "example": { - "name": "test", - "password": "test", - "role": "Viewer", - "description": "create new user test and set him to viewer" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" - } - }, - "/api/users/role/{name}": { - "put": { - "summary": "Change role", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "roleChangeHandler", - "tags": [ - "server" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "username to be deleted", - "required": true, - "example": "test", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserRoleChangeBody" - }, - "example": { - "name": "test", - "role": "Viewer", - "description": "change user test's role to viewer" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" - } - }, - "/api/users/{name}": { - "delete": { - "summary": "Delete User", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "deleteUserHandler", - "tags": [ - "server" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "username to be deleted", - "required": true, - "example": "test", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "version": "3.1.0-beta.3", - "systemStatus": "0", - "neuronRunningTime": "6332", - "neuronStatus": "0", - "neuronMemoryUsed": "8364032", - "neuronMemoryTotal": "4125425664", - "ekuiperRunningTime": "6332", - "ekuiperStatus": "0", - "ekuiperMemoryUsed": "84316160", - "ekuiperMemoryTotal": "4125425664", - "submoduleStatus": { - "alert": false, - "monitor": false, - "syslog": false - }, - "hwToken": "m/djk5abRRToVTyBBCXkUVyMumgbYmo2PdwdjnVeqn8=", - "os": "Debian GNU/Linux 11", - "kernel": "5.10.124-linuxkit", - "arch": "x86_64", - "clib": "glibc-2.31" - } - } - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "$ref": "#/components/schemas/VersionResp" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "version": "3.1.0-beta.3" - } - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719069-run" - } - }, - "/api/management/cancel": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "management" - ], - "summary": "Cancel being Managed by ECP", - "x-apifox-folder": "NeuronEX/management", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "CancelManagement", - "responses": { - "200": { - "description": "", - "schema": {} - } - } - } - }, - "/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" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "enabled": false, - "network": "udp4", - "addr": "", - "priority": 6, - "tag": "neuronex" - } - } - } - } - } - } - } - }, - "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": { - "enabled": true, - "addr": "localhost:10514", - "priority": 6, - "tag": "neuronex" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - } - } - }, - "/api/liveness/report": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "liveness" - ], - "summary": "Query liveness info", - "x-apifox-folder": "NeuronEX/liveness", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "GetLivenessConfig", - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LivenessReq" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "endpointUrl": "", - "serviceId": "", - "interval": 0 - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "liveness" - ], - "summary": "Liveness configuration", - "x-apifox-folder": "NeuronEX/liveness", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "livenessConfigHandler", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LivenessReq" - }, - "example": { - "endpointUrl": "127.0.0.1:1456", - "serviceId": "123456", - "interval": 10 - } - } - } - }, - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/log": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Get NeuronEX log level configuration", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "LoglevelGetting", - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/responseLogData" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "level": "info" - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Set NeuronEX log level configuration", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "LoglevelSetting", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoglevelSettingReqData" - }, - "example": { - "level": "info" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/log/ekuiper": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download data processing engine log", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadEkuiperLog", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/api/log/neuron": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download data collection engine log", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadNeuronLog", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/api/log/neuron/{nodeName}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download the log of data collection engine driver node", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadNeuronLogByNodeName", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/api/log/neuronex": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download NeuronEX log", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadNeuronexLog", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/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" - } - }, - { - "name": "nodes", - "in": "query", - "description": "List of nodes to be queried", - "required": false, - "example": "south1,south3", - "schema": { - "type": "string" - } - }, - { - "name": "rules", - "in": "query", - "description": "List of rules to be queried", - "required": false, - "example": "rule1,rule2", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "query neuron template sueccess", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "streams": { - "type": "object", - "properties": { - "neuronStream": { - "type": "string" - } - }, - "required": [ - "neuronStream" - ], - "x-apifox-orders": [ - "neuronStream" - ] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "uploads": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "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" - ] - }, - "examples": { - "1": { - "summary": "ekuiper success", - "value": { - "streams": { - "neuronStream": "CREATE STREAM neuronStream() WITH (TYPE=\"neuron\",FORMAT=\"json\",CONF_KEY=\"default\",SHARED=\"TRUE\");" - }, - "tables": {}, - "rules": {}, - "nativePlugins": {}, - "portablePlugins": {}, - "sourceConfig": {}, - "sinkConfig": {}, - "connectionConfig": {}, - "Service": {}, - "Schema": {}, - "uploads": {} - } - } - } - } - } - }, - "x-200:query ekuiper template sueccess": { - "description": "query ekuiper template sueccess", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "plugin": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "x-apifox-orders": [ - "plugin", - "name" - ] - } - }, - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "subscriptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "settings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "node": { - "type": "string" - }, - "params": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer" - } - }, - "required": [ - "host", - "port" - ], - "x-apifox-orders": [ - "host", - "port" - ] - } - }, - "x-apifox-orders": [ - "node", - "params" - ] - } - } - }, - "required": [ - "nodes", - "groups", - "tags", - "subscriptions", - "settings" - ], - "x-apifox-orders": [ - "nodes", - "groups", - "tags", - "subscriptions", - "settings" - ] - }, - "examples": { - "1": { - "summary": "query ekuiper template sueccess", - "value": { - "nodes": [ - { - "plugin": "eKuiper", - "name": "Processing" - } - ], - "groups": [], - "tags": [], - "subscriptions": [], - "settings": [ - { - "node": "Processing", - "params": { - "host": "127.0.0.1", - "port": 7081 - } - } - ] - } - } - } - } - } - } - }, - "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 ", - "required": true, - "example": "", - "schema": { - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "template": { - "type": "string", - "description": "optional, Node data to be deliver if category is 1, or rule data to be deliver if category is 2 " - }, - "ruleData": { - "type": "string", - "description": "optional, Rule data to be deliver " - }, - "NodeData": { - "type": "string", - "description": "optional, Node data to be deliver " - }, - "operationId": { - "type": "integer", - "description": "optional,if operationId > 0, The operation will be logged and pushed" - } - }, - "required": [ - ] - }, - "example": { - "template": "{\n \"streams\": {\n \"neuronStream\": \"CREATE STREAM neuronStream() WITH (TYPE=\\\"neuron\\\",FORMAT=\\\"json\\\",CONF_KEY=\\\"default\\\",SHARED=\\\"TRUE\\\");\"\n },\n \"tables\": {},\n \"rules\": {},\n \"nativePlugins\": {},\n \"portablePlugins\": {},\n \"sourceConfig\": {},\n \"sinkConfig\": {},\n \"connectionConfig\": {},\n \"Service\": {},\n \"Schema\": {},\n \"uploads\": {}\n}" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "400": { - "description": "Deliver failed", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "failed reason message" - } - }, - "required": [ - "message" - ], - "x-apifox-orders": [ - "message" - ] - }, - "examples": { - "1": { - "summary": "Json format err", - "value": { - "message": "Json format err" - } - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719073-run" - } - }, - "/api/process/ekuiper/start": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Start ekuiper process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StartKuiper", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/ekuiper/stop": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Stop ekuiper process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StopKuiper", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/neuron/start": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Start neuron process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StartNeuron", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/neuron/stop": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Stop neuron process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StopNeuron", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/status": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "The status of Ekuiper and Neuron process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "KuiperNeuronStatus", - "responses": { - "200": { - "description": "", - "schema": {} - } - } - } - }, - "/api/status/liveness": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "status" - ], - "summary": "Get NeuronEX liveness status", - "x-apifox-folder": "NeuronEX/status", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "LiveStatusGetting", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "liveness": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - } - }, - "required": [ - "liveness" - ], - "x-apifox-orders": [ - "liveness" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "liveness": { - "in": 853, - "out": 0 - } - } - } - } - } - } - } - } - } - }, - "/api/status/log": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "status" - ], - "summary": "Get NeuronEX syslog status", - "x-apifox-folder": "NeuronEX/status", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "SyslogStatusGetting", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "server": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "outSend": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "sse": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - }, - "neuron": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "neuronex": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "ekuiper": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "others": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "clientNumber": { - "type": "integer" - } - }, - "required": [ - "in", - "out", - "neuron", - "neuronex", - "ekuiper", - "others", - "clientNumber" - ], - "x-apifox-orders": [ - "in", - "out", - "neuron", - "neuronex", - "ekuiper", - "others", - "clientNumber" - ] - } - }, - "required": [ - "server", - "outSend", - "sse" - ], - "x-apifox-orders": [ - "server", - "outSend", - "sse" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "server": { - "in": 75668145, - "out": 75668144 - }, - "outSend": { - "in": 75668145, - "out": 2513 - }, - "sse": { - "in": 75668145, - "out": 75668144, - "neuron": { - "in": 464, - "out": 464 - }, - "neuronex": { - "in": 75665075, - "out": 75665074 - }, - "ekuiper": { - "in": 93, - "out": 93 - }, - "others": { - "in": 2513, - "out": 2513 - }, - "clientNumber": 0 - } - } - } - } - } - } - } - } - } - }, - "/api/status/ecp_tunnel": { - "get": { - "summary": "Get ecp tunnel status", - "x-apifox-folder": "NeuronEX/status", - "x-apifox-status": "released", - "deprecated": false, - "description": "Get ecp tunnel status", - "tags": [ - "status" - ], - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "tunnel status,value can be init,idle,subscribe serviceId,subscribe revoke serviceId,activating,subscribe configuration,revoke serviceId,ECP config modified." - } - }, - "required": [ - "status" - ], - "x-apifox-orders": [ - "status" - ], - "x-apifox-ignore-properties": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "status": "init" - } - } - } - } - } - } - } - } - }, - "/api/stream/log": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "sse" - ], - "summary": "Get NeuronEX streaming log", - "x-apifox-folder": "NeuronEX/sse", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StreamingLog", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": "0", - "x-go-name": "Type", - "name": "type", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": "10", - "x-go-name": "Priority", - "name": "priority", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/event-stream": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "2023-12-20T07:55:49Z neuronex[1]: level=error msg=\"forward syslog to server error [&{0x174ba08 true 0xc00054e000 neuronex neuronex-231220 6 localhost:10514}][failed to get connection]\" file=\"syslog/out_send.go:113\" func=\"internal/syslog.(*SendOut).Process\"" - } - } - } - } - } - } - } - }, - "/api/stream/clients": { - "get": { - "summary": "Get stream client status", - "x-apifox-folder": "NeuronEX/sse", - "x-apifox-status": "released", - "deprecated": false, - "description": "Get stream client status", - "tags": [ - "sse" - ], - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "clientAddress": { - "type": "string" - } - }, - "x-apifox-orders": [ - "clientAddress" - ], - "x-apifox-ignore-properties": [] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "clientAddress": "127.0.0.1:9081" - } - ] - } - } - } - } - } - } - } - }, - "/api/sso": { - "get": { - "summary": "Get all SSO configurations", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "QuerySSOConfigs", - "tags": [ - "sso" - ], - "parameters": [ - { - "name": "enabled", - "in": "query", - "description": "Optional, query configurations by 'enabled' field", - "required": false, - "example": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "clientId": { - "type": "string" - }, - "clientSecret": { - "type": "string" - }, - "type": { - "type": "string" - }, - "enabled": { - "type": "boolean", - "default": false - } - }, - "required": [ - "name", - "url", - "clientId", - "clientSecret", - "type", - "enabled" - ], - "x-apifox-orders": [ - "name", - "url", - "clientId", - "clientSecret", - "type", - "enabled" - ] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "8I744Myxxxx", - "clientSecret": "5jMnFyxxxx", - "type": "oauth2", - "enabled": true - }, - { - "name": "sso2", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0uxxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": false - } - ] - } - } - } - } - }, - "400": { - "description": "@ErrorInfo(1003,\"Request param invalid\")\n@ErrorInfo(19002,\"Configuration name not found in the query\")\n)" - } - } - }, - "post": { - "summary": "Add a new SSO configuration", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "SSOConfigHandler", - "tags": [ - "sso" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SSOConfigBody" - }, - "example": { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0usxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": false - } - } - } - }, - "responses": { - "200": { - "description": "", - "schema": {} - }, - "400": { - "description": "@ErrorInfo(1002,\"Request body invalid\")\n@ErrorInfo(19000,\"Add ssoConfiguration failed\")\n@ErrorInfo(19004,\"Configuration already exists\")\n" - } - } - } - }, - "/api/sso/{serverName}": { - "get": { - "summary": "Get an SSO configuration", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "QuerySSOConfig", - "tags": [ - "sso" - ], - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SSOConfigBody" - }, - "example": { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0usxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": false - } - } - } - }, - "400": { - "description": "@ErrorInfo(19002,\"Configuration name not found in the query\")\n" - } - } - }, - "put": { - "summary": "Update an SSO configuration", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "UpdateSSOConfig", - "tags": [ - "sso" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSSOConfigBody" - }, - "example": { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0usxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": true - } - } - } - }, - "responses": { - "200": { - "description": "", - "schema": {} - }, - "400": { - "description": "@ErrorInfo(1002,\"Request body invalid\")\n@ErrorInfo(19001,\"Update ssoConfiguration failed\")\n@ErrorInfo(19002,\"Configuration name not found in the query\")\n" - } - } - }, - "delete": { - "summary": "Delete an SSO configuration", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "DeleteSSOConfig", - "tags": [ - "sso" - ], - "responses": { - "200": { - "description": "", - "schema": {} - }, - "400": { - "description": "@ErrorInfo(19003,\"Delete ssoConfiguration failed\")\n" - } - } - } - }, - "/sso/{serverName}/oauth2": { - "get": { - "summary": "SSO Handling", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "OAuth2Handler", - "tags": [ - "sso" - ], - "parameters": [ - { - "name": "code", - "in": "query", - "description": "", - "required": true, - "example": "5068471130381875", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-token" - }, - "example": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzcyODcxNjMsImlhdCI6MTYzNzIwMDc2MywiaXNzIjoiRU1RIFRlY2hub2xvZ2llcyBDby4sIEx0ZCBBbGwgcmlnaHRzIHJlc2VydmVkLiIsInBhc3MiOiIwMDAwIiwidXNlciI6ImFkbWluIn0.2EZzPC9djErrCeYNrK2av0smh-eKxDYeyu7cW4MyknI" - } - } - } - }, - "400": { - "description": "@ErrorInfo(19002,\"Configuration name not found in the query\")\n" - } - } - } - }, - "/api/monitor/alert": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Alert types currently supported by NeuronEX", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "AlertRuleConfig", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": [ - "ruleId", - "name", - "desc" - ], - "x-apifox-orders": [ - "ruleId", - "name", - "desc" - ] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "ruleId": "1", - "name": "node_exception_alert", - "desc": "Data collection node exception alert" - }, - { - "ruleId": "2", - "name": "rule_exception_alert", - "desc": "Data processing rule exception alert" - }, - { - "ruleId": "3", - "name": "restart_alert", - "desc": "neuronex restart alert" - } - ] - } - } - } - } - } - } - } - }, - "/api/monitor/alert_config": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Query the current alert rule-related settings", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "QueryAlertRuleConfig", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "webhookUrl": { - "type": "string" - }, - "interval": { - "type": "integer" - }, - "fireChecks": { - "type": "integer" - }, - "resolveChecks": { - "type": "integer" - }, - "alertsConfig": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ], - "x-apifox-orders": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "enabled": true, - "webhookUrl": "https://www.baidu.com", - "interval": 15, - "fireChecks": 0, - "resolveChecks": 0, - "alertsConfig": [ - { - "ruleId": "3", - "fireChecks": 1, - "resolveChecks": -1, - "ruleName": "restart_alert" - }, - { - "ruleId": "1", - "fireChecks": 3, - "resolveChecks": 3, - "ruleName": "node_exception_alert" - }, - { - "ruleId": "2", - "fireChecks": 1, - "resolveChecks": 1, - "ruleName": "rule_exception_alert" - } - ] - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Configure Alert rule-related settings.", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DistributeAlertRuleConfig", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "false: disabled, true: enabled ,If the value is false, the other fields are non-required" - }, - "webhookUrl": { - "type": "string", - "description": "required if enabled is true,the webhook that alert events are pushed to" - }, - "interval": { - "type": "integer", - "description": "required if enabled is true" - }, - "fireChecks": { - "type": "integer", - "description": "required if alertsConfig is empty, the default fireChecks for all rules in alertsConfig" - }, - "resolveChecks": { - "type": "integer", - "description": "required if alertsConfig is empty, the default resolveChecks for all rules in alertsConfig" - }, - "alertsConfig": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "fireChecks": { - "type": "integer", - "description": "how many consecutive monitoring times will trigger an alarm,means that N.Value must be greater than 0 unless ruleId=3, value can be -1" - }, - "resolveChecks": { - "type": "integer", - "description": "how many times to monitor continuously, the alarm will be resumed,means that P.Value must be greater than 0 unless ruleId=3, value can be -1" - } - }, - "x-apifox-orders": [ - "ruleId", - "fireChecks", - "resolveChecks" - ] - }, - "description": "optional, the setting of the rule alerts to be pushed,if it is empty, it means that requires all alert types." - } - }, - "required": [ - "enabled", - "webhookUrl", - "interval" - ], - "x-apifox-orders": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ] - }, - "example": { - "enabled": true, - "webhookUrl": "https://www.baidu.com", - "interval": 15, - "fireChecks": 0, - "resolveChecks": 0, - "alertsConfig": [ - { - "ruleId": "3", - "fireChecks": 1, - "resolveChecks": -1 - }, - { - "ruleId": "1", - "fireChecks": 3, - "resolveChecks": 3 - }, - { - "ruleId": "2", - "fireChecks": 1, - "resolveChecks": 1 - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/monitor/alert_result": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Query recently generated alert events", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "QueryAlertResult", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "firing": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "labels:": { - "type": "object", - "properties": { - "driver": { - "type": "string" - } - }, - "required": [ - "driver" - ], - "x-apifox-orders": [ - "driver" - ] - } - }, - "x-apifox-orders": [ - "ruleId", - "labels:" - ] - }, - "description": "alert fire event array" - }, - "resolved": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "labels:": { - "type": "object", - "properties": { - "rule": { - "type": "string" - } - }, - "required": [ - "rule" - ], - "x-apifox-orders": [ - "rule" - ] - } - }, - "x-apifox-orders": [ - "ruleId", - "labels:" - ] - }, - "description": "alert resolved event array" - }, - "timestamp": { - "type": "string" - } - }, - "required": [ - "firing", - "resolved", - "timestamp" - ], - "x-apifox-orders": [ - "firing", - "resolved", - "timestamp" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "firing": [ - { - "ruleId": "xxx", - "labels:": { - "driver": "xxx" - } - } - ], - "resolved": [ - { - "ruleId": "xxx", - "labels:": { - "rule": "xxx" - } - } - ], - "timestamp": "2024-01-01T09:52:26.739266876+08:00" - } - } - } - } - } - } - } - } - }, - "/api/monitor/metric": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Metrics currently supported by NeuronEX", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "MetricConfig", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "metricId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": [ - "metricId", - "name", - "desc" - ], - "x-apifox-orders": [ - "metricId", - "name", - "desc" - ] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "metricId": "1", - "name": "os_info", - "desc": "OS distro and kernel version" - }, - { - "metricId": "2", - "name": "cpu_percent", - "desc": "Total CPU utilisation percentage" - }, - { - "metricId": "3", - "name": "cpu_cores", - "desc": "Number of CPU cores" - }, - { - "metricId": "4", - "name": "mem_total_bytes", - "desc": "Total installed memory in bytes" - } - ] - } - } - } - } - } - } - } - }, - "/api/monitor/metric_config": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Query the current metric-related settings", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "QueryMetricConfig", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "prometheusUrl": { - "type": "string" - }, - "interval": { - "type": "integer" - }, - "labels": { - "type": "object", - "properties": { - "instance": { - "type": "string" - }, - "org_id": { - "type": "string" - }, - "project_id": { - "type": "string" - }, - "service_id": { - "type": "string" - } - }, - "required": [ - "instance", - "org_id", - "project_id", - "service_id" - ], - "x-apifox-orders": [ - "instance", - "org_id", - "project_id", - "service_id" - ] - }, - "metrics": { - "type": "array", - "items": { - "type": "object", - "properties": { - "metricId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": [ - "metricId", - "name", - "desc" - ], - "x-apifox-orders": [ - "metricId", - "name", - "desc" - ] - } - } - }, - "required": [ - "enabled", - "prometheusUrl", - "interval", - "labels", - "metrics" - ], - "x-apifox-orders": [ - "enabled", - "prometheusUrl", - "interval", - "labels", - "metrics" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "enabled": true, - "prometheusUrl": "http://127.0.0.1:9091", - "interval": 15, - "labels": { - "instance": "127.0.0.1:8111", - "org_id": "76995af8", - "project_id": "c1c69f9d", - "service_id": "55f20f8b" - }, - "metrics": [ - { - "metricId": "13", - "name": "north_nodes_total", - "desc": "Number of north nodes" - }, - { - "metricId": "14", - "name": "north_running_nodes_total", - "desc": "Number of north nodes in running state" - }, - { - "metricId": "15", - "name": "north_disconnected_nodes_total", - "desc": "Number of north nodes disconnected" - }, - { - "metricId": "16", - "name": "south_nodes_total", - "desc": "Number of south nodes" - }, - { - "metricId": "17", - "name": "south_running_nodes_total", - "desc": "Number of south nodes in running state" - }, - { - "metricId": "20", - "name": "license_max_tags", - "desc": "License tags limit" - }, - { - "metricId": "21", - "name": "license_used_tags", - "desc": "License total used tags" - }, - { - "metricId": "1031", - "name": "kuiper_op_records_in_total", - "desc": "Total number of messages received by the operation of kuiper_op" - }, - { - "metricId": "1032", - "name": "kuiper_op_records_out_total", - "desc": "Total number of messages published by the operation of kuiper_op" - }, - { - "metricId": "2000", - "name": "running_nodes_total", - "desc": "Number of nodes in running state" - }, - { - "metricId": "2001", - "name": "exception_nodes_total", - "desc": "Number of nodes in running state" - }, - { - "metricId": "2002", - "name": "south_connected_nodes_total", - "desc": "Number of south nodes connected" - }, - { - "metricId": "2003", - "name": "south_exception_nodes_total", - "desc": "Number of south in exception state" - }, - { - "metricId": "2004", - "name": "north_connected_nodes_total", - "desc": "Number of north nodes connected" - }, - { - "metricId": "2005", - "name": "north_exception_nodes_total", - "desc": "Number of north in exception state" - }, - { - "metricId": "2006", - "name": "running_rules_total", - "desc": "Number of rules in running state" - }, - { - "metricId": "2007", - "name": "stopped_rules_total", - "desc": "Number of rules in stopped state" - }, - { - "metricId": "2008", - "name": "not_running_node", - "desc": "Node not in running state" - }, - { - "metricId": "2009", - "name": "exception_node", - "desc": "Node in exception state" - }, - { - "metricId": "3000", - "name": "not_running_rule", - "desc": "Rule not in running state" - } - ] - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Configure Metric-related settings.", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DistributeMetricConfig", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "required,false: disabled, true: enabled ,If the value is false, the other fields are non-required" - }, - "prometheusUrl": { - "type": "string", - "description": " required if enabled is true, the url of pushgateway,like http://localhost:9091" - }, - "prometheusUsername": { - "type": "string", - "description": "optional, the url of username for pushgateway" - }, - "prometheusPassword": { - "type": "string", - "description": " optional, the url of password for pushgateway" - }, - "metricIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "optional, metric id array,a value of null means push all metric data." - }, - "interval": { - "type": "integer", - "description": "required if enabled is true, the interval of generating metrics data,unit is second" - }, - "labels": { - "type": "object", - "properties": { - "key1": { - "type": "string" - } - }, - "x-apifox-orders": [ - "key1" - ], - "description": "optional, additional labels needed for metric, will be pushed to pushgateway along with the metrics data for grouping of metrics,key: label name,value: label value" - } - }, - "required": [ - "enabled", - "prometheusUrl", - "interval" - ], - "x-apifox-orders": [ - "enabled", - "prometheusUrl", - "prometheusUsername", - "prometheusPassword", - "metricIds", - "interval", - "labels" - ] - }, - "example": { - "enabled": false, - "prometheusUrl": "http://127.0.0.1:9091", - "prometheusUsername": "", - "prometheusPassword": "", - "metricIds": [ - "13", - "14", - "15", - "16", - "17", - "20", - "21", - "1031", - "1032", - "2000", - "2001", - "2002", - "2003", - "2004", - "2005", - "2006", - "2007", - "2008", - "2009", - "3000" - ], - "interval": 15, - "labels": { - "category": "4", - "org_id": "ef5f285a", - "project_id": "c46ffe05", - "service_id": "25a967f3", - "type": "4" - } - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - } - } - }, - "/api/monitor/metric_contents": { - "get": { - "tags": [ - "monitor" - ], - "summary": "Query the most recent metric data", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "MetricContents", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "license_max_tags 30\nlicense_used_tags 0\nnorth_nodes_total 1\nnorth_running_nodes_total 1\nnorth_disconnected_nodes_total 1\nsouth_nodes_total 0\nsouth_running_nodes_total 0\nrunning_nodes_total 1\nexception_nodes_total 1\nsouth_connected_nodes_total 0\nsouth_exception_nodes_total 0\nnorth_connected_nodes_total 0\nnorth_exception_nodes_total 1\nrunning_rules_total 0\nstopped_rules_total 0\n" - } - } - } - } - } - } - } - }, - "/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" - ] - }, - "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": "node name", - "type": "string", - "title": "node name" - }, - "plugin": { - "type": "string", - "title": "plugin name" - }, - "params": { - "type": "array", - "title": "setting (optional)", - "items": { - "type": "object", - "properties": { - "param1": { - "type": "integer", - "description": "" - }, - "param2": { - "type": "string", - "description": "" - }, - "param3": { - "type": "bool", - "description": "" - }, - "param4": { - "type": "integer", - "description": "" - } - }, - "x-apifox-orders": [ - "name", - "plugin", - "params" - ] - } - } - }, - "required": [ - "name", - "plugin" - ], - "x-apifox-orders": [ - "name", - "plugin" - ] - }, - "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(2001)": { - "description": "node type invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "node type invalid", - "value": { - "error": 2001 - } - } - } - } - } - }, - "400(2004)": { - "description": "node setting invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "node setting invalid", - "value": { - "error": 2004 - } - } - } - } - } - }, - "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" - ] - }, - "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" - ] - }, - "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-orders": [ - "node", - "params" - ], - "description": "//The parameter fields in json fill in different fields according to different plugins" - }, - "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](https://docs.emqx.com/zh/neuronex/latest/api/plugin-setting.html) 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" - } - }, - "required": [ - "node", - "params" - ], - "x-apifox-orders": [ - "node", - "params" - ] - }, - "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": {} - }, - "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" - ] - }, - "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-orders": [ - "states" - ] - }, - "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" - ] - }, - "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": {} - }, - "examples": { - "1": { - "summary": "node not exist", - "value": { - "error": 2003 - } - } - } - } - } - }, - "409": { - "description": "group not allow", - "content": { - "application/json": { - "schema": { - "type": "object", - "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" - ] - }, - "example": { - "name": "gconfig1", - "node": "modbus-node" - } - } - } - }, - "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" - ] - }, - "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-orders": [ - "groups" - ] - }, - "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-orders": [ - "node", - "group", - "tags" - ], - "required": [ - "node", - "group" - ] - }, - "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" - ] - }, - "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" - ] - } - } - }, - "required": [ - "tags" - ], - "x-apifox-orders": [ - "tags" - ] - }, - "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" - ] - } - } - }, - "required": [ - "node", - "group", - "tags" - ], - "x-apifox-orders": [ - "node", - "group", - "tags" - ] - }, - "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" - ] - }, - "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" - ] - }, - "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" - ] - } - } - } - }, - "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" - ] - } - } - } - }, - "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" - ] - } - } - }, - "required": [ - "plugins" - ], - "x-apifox-orders": [ - "plugins" - ] - }, - "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" - ] - } - }, - "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" - ] - } - } - }, - "required": [ - "map" - ], - "x-apifox-orders": [ - "map" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - } - }, - "required": [ - "tag_regex", - "group_interval", - "connection_mode", - "interval", - "host", - "port", - "timeout" - ], - "x-apifox-orders": [ - "tag_regex", - "group_interval", - "connection_mode", - "interval", - "host", - "port", - "timeout" - ] - }, - "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": "substring match against driver name", - "type": "string" - }, - "group": { - "description": "substring match against 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" - ] - } - }, - "required": [ - "app" - ], - "x-apifox-orders": [ - "app", - "driver", - "group", - "params" - ] - }, - "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" - ] - } - }, - "required": [ - "app", - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "app", - "driver", - "group", - "params" - ] - } - } - } - }, - "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" - ] - } - }, - "required": [ - "app", - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "app", - "driver", - "group", - "params" - ] - }, - "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" - ] - } - }, - "required": [ - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "driver", - "group", - "params" - ] - } - } - }, - "required": [ - "groups" - ], - "x-apifox-orders": [ - "groups" - ] - }, - "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" - ] - } - }, - "required": [ - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "driver", - "group", - "params" - ] - } - } - }, - "required": [ - "app", - "groups" - ], - "x-apifox-orders": [ - "app", - "groups" - ] - }, - "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" - ] - }, - "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" - ] - }, - "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" - ] - }, - "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" - ] - } - } - } - }, - "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" - ] - } - } - }, - "required": [ - "files" - ], - "x-apifox-orders": [ - "files" - ] - }, - "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/global/drivers": { - "put": { - "summary": "Put Drivers", - "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-orders": [ - "name", - "interval", - "tags" - ] - } - } - }, - "required": [ - "name", - "plugin", - "groups" - ], - "x-apifox-orders": [ - "name", - "plugin", - "groups" - ] - }, - "example": { - "nodes": [ - { - "name": "rtu template", - "plugin": "Modbus RTU", - "params": { - "param1": 1, - "param2": "1.1.1.1", - "param3": true, - "param4": 11.22 - }, - "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": "request body invalid", - "value": { - "error": 1002 - } - }, - "2": { - "summary": "node name too long", - "value": { - "error": 2010 - } - }, - "3": { - "summary": "node not allow delete", - "value": { - "error": 2011 - } - }, - "4": { - "summary": "group parameter invalid", - "value": { - "error": 2105 - } - }, - "5": { - "summary": "group name too long", - "value": { - "error": 2107 - } - }, - "6": { - "summary": "reach max number of groups", - "value": { - "error": 2108 - } - }, - "7": { - "summary": "reach max number of groups", - "value": { - "error": 2108 - } - }, - "8": { - "summary": " library failed to open", - "value": { - "error": 2304 - } - }, - "9": { - "summary": "plugin name too long", - "value": { - "error": 3013 - } - }, - "10": { - "summary": "plugin does not support requested operation", - "value": { - "error": 3019 - } - } - } - } - } - }, - "404": { - "description": "plugin not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "plugin not found", - "value": { - "error": 3014 - } - }, - "2": { - "summary": "library not found", - "value": { - "error": 2301 - } - } - } - } - } - }, - "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": "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-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" - }, - "get": { - "summary": "Get Drivers", - "x-apifox-folder": "Neuron/configuration", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "configuration" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": " Optional, list of names to filter out driver nodes (separated by ',')", - "required": false, - "example": "", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "If success, returns the list of drivers", - "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" - ] - } - } - }, - "required": [ - "templates" - ], - "x-apifox-orders": [ - "templates" - ], - "description": "" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "nodes": [ - { - "name": "rtu template", - "plugin": "Modbus RTU", - "params": { - "param1": 1, - "param2": "1.1.1.1", - "param3": true, - "param4": 11.22 - }, - "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": "node not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "node not exist", - "value": { - "error": 2003 - } - } - } - } - } - }, - "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/metrics": { - "get": { - "summary": "Get Metrics", - "x-apifox-folder": "Neuron/metrics", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "data collection 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": {} - }, - "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" - }, - "name": { - "type": "string", - "description": "tag name substring match" - }, - "desc": { - "type": "string", - "description": "tag description substring match" - }, - "sync": { - "type": "string", - "description": "synchronous read ,default false" - } - }, - "required": [ - "node", - "group" - ], - "x-apifox-orders": [ - "node", - "group" - ] - }, - "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" - ] - } - } - }, - "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-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" - ] - }, - "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" - ] - } - } - }, - "required": [ - "node", - "group", - "tags" - ], - "x-apifox-orders": [ - "node", - "group", - "tags" - ] - }, - "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" - ] - }, - "default": { - "type": "object", - "properties": { - "qos": { - "type": "integer" - }, - "server": { - "type": "string" - } - }, - "required": [ - "qos", - "server" - ], - "x-apifox-orders": [ - "qos", - "server" - ] - }, - "demo_conf": { - "type": "object", - "properties": { - "qos": { - "type": "integer" - }, - "server": { - "type": "string" - } - }, - "required": [ - "qos", - "server" - ], - "x-apifox-orders": [ - "qos", - "server" - ] - } - }, - "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." - }, - "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" - ] - }, - "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" - ] - } - }, - "required": [ - "demo_conf" - ], - "x-apifox-orders": [ - "demo_conf" - ] - }, - "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, 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" - ] - }, - "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/stop": { - "post": { - "summary": "Shutdown eKuiper", - "x-apifox-folder": "Ekuiper/configs", - "x-apifox-status": "released", - "deprecated": false, - "description": "Shut down eKuiper through rest api.", - "tags": [ - "configs" - ], - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-133392280-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" - ] - }, - "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": [] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "required": [ - "streams", - "tables", - "rules", - "nativePlugins", - "portablePlugins", - "sourceConfig", - "sinkConfig", - "connectionConfig", - "Service", - "Schema" - ], - "x-apifox-orders": [ - "streams", - "tables", - "rules", - "nativePlugins", - "portablePlugins", - "sourceConfig", - "sinkConfig", - "connectionConfig", - "Service", - "Schema" - ] - } - }, - "required": [ - "ErrorMsg", - "ConfigResponse" - ], - "x-apifox-orders": [ - "ErrorMsg", - "ConfigResponse" - ] - }, - "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": [] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "uploads": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "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" - ] - }, - "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": {} - }, - "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-orders": [] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "required": [ - "streams", - "tables", - "rules", - "nativePlugins", - "portablePlugins", - "sourceConfig", - "sinkConfig", - "connectionConfig", - "Service", - "Schema" - ], - "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" - ] - }, - "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.\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" - ] - }, - "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" - ] - }, - "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" - ] - }, - "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-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-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" - ] - }, - "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" - ] - }, - "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" - ] - } - } - } - }, - "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" - ] - }, - "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-orders": [ - "log" - ] - } - } - }, - "required": [ - "id", - "sql", - "actions" - ], - "x-apifox-orders": [ - "id", - "sql", - "actions" - ] - }, - "example": { - "id": "rule1", - "sql": "SELECT * FROM demo", - "actions": [ - { - "log": {} - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - } - }, - "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": [] - }, - "mqtt": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "topic": { - "type": "string" - } - }, - "required": [ - "server", - "topic" - ], - "x-apifox-orders": [ - "server", - "topic" - ] - } - }, - "x-apifox-orders": [ - "log", - "mqtt" - ] - } - } - }, - "required": [ - "sql", - "actions" - ], - "x-apifox-orders": [ - "sql", - "actions" - ] - }, - "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-orders": [ - "log" - ] - } - } - }, - "required": [ - "id", - "sql", - "actions" - ], - "x-apifox-orders": [ - "id", - "sql", - "actions" - ] - }, - "example": { - "id": "rule1", - "sql": "SELECT * FROM demo", - "actions": [ - { - "log": {} - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-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-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-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-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" - ] - }, - "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" - ] - } - }, - "required": [ - "sources", - "edges" - ], - "x-apifox-orders": [ - "sources", - "edges" - ] - } - } - } - } - }, - "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-orders": [ - "log" - ] - } - } - }, - "required": [ - "id", - "sql", - "actions" - ], - "x-apifox-orders": [ - "id", - "sql", - "actions" - ] - }, - "example": { - "id": "rule1", - "sql": "SELECT * FROM demo", - "actions": [ - { - "log": {} - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "example": { - "file": "file:///tmp/a.json" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-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.", - "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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "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-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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "example": { - "name": "random", - "file": "http://127.0.0.1/services/sample.zip" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-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-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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "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.\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" - ] - }, - "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-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" - ] - } - }, - "required": [ - "Name", - "FieldType" - ], - "x-apifox-orders": [ - "Name", - "FieldType" - ] - } - }, - "Options": { - "type": "object", - "properties": { - "DATASOURCE": { - "type": "string" - }, - "FORMAT": { - "type": "string" - } - }, - "required": [ - "DATASOURCE", - "FORMAT" - ], - "x-apifox-orders": [ - "DATASOURCE", - "FORMAT" - ] - } - }, - "required": [ - "Name", - "StreamFields", - "Options" - ], - "x-apifox-orders": [ - "Name", - "StreamFields", - "Options" - ] - }, - "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" - ] - }, - "name": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "x-apifox-orders": [ - "type" - ] - }, - "age": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "x-apifox-orders": [ - "type" - ] - }, - "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" - ] - } - }, - "required": [ - "type", - "items" - ], - "x-apifox-orders": [ - "type", - "items" - ] - }, - "outdoor": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "x-apifox-orders": [ - "type" - ] - } - }, - "required": [ - "type", - "items" - ], - "x-apifox-orders": [ - "type", - "items" - ] - } - }, - "required": [ - "indoor", - "outdoor" - ], - "x-apifox-orders": [ - "indoor", - "outdoor" - ] - } - }, - "required": [ - "type", - "properties" - ], - "x-apifox-orders": [ - "type", - "properties" - ] - } - }, - "required": [ - "id", - "name", - "age", - "hobbies" - ], - "x-apifox-orders": [ - "id", - "name", - "age", - "hobbies" - ] - }, - "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" - ] - }, - "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-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-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.\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" - ] - }, - "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-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" - ] - } - }, - "required": [ - "Name", - "FieldType" - ], - "x-apifox-orders": [ - "Name", - "FieldType" - ] - } - }, - "Options": { - "type": "object", - "properties": { - "DATASOURCE": { - "type": "string" - }, - "FORMAT": { - "type": "string" - } - }, - "required": [ - "DATASOURCE", - "FORMAT" - ], - "x-apifox-orders": [ - "DATASOURCE", - "FORMAT" - ] - } - }, - "required": [ - "Name", - "StreamFields", - "Options" - ], - "x-apifox-orders": [ - "Name", - "StreamFields", - "Options" - ] - }, - "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-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" - ] - }, - "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-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" - ] - }, - "example": { - "name": "my.json", - "content": "{\"hello\":\"world\"}" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121119036-run" - } - }, - "/api/ekuiper/rules/{id}/explain": { - "get": { - "summary": "Query Rule Plan", - "x-apifox-folder": "Ekuiper/rules", - "x-apifox-status": "released", - "deprecated": false, - "description": "The API is used to get the plan of the SQL.", - "tags": [ - "rules" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "rule id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "info": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "children": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": [ - "type", - "info", - "id", - "children" - ], - "x-apifox-orders": [ - "type", - "info", - "id", - "children" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "type": "ProjectPlan", - "info": "Fields:[ * ]", - "id": 0, - "children": [ - 1 - ] - } - } - } - } - } - } - } - } - }, - "/api/ekuiper/metrics": { - "get": { - "summary": "Get Metrics information of the data stream processing", - "x-apifox-folder": "Ekuiper/metrics", - "x-apifox-status": "released", - "deprecated": false, - "description": "Query the raw metrics information of the data stream processing, after the normal operation of the rules, you can see the metrics information in the api similar to kuiper_sink_records_in_total .", - "tags": [ - "data processing metrics" - ], - "parameters": [], - "responses": { - "200": { - "description": "success", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "success", - "value": "# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.000185937\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.000342795\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.000369361\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.000391542\ngo_gc_duration_seconds{quantile=\"1\"} 0.000391542\ngo_gc_duration_seconds_sum 0.001289635\ngo_gc_duration_seconds_count 4\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 15\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.20.2\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 6.983208e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.1783664e+07\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.451727e+06\n# HELP go_memstats_frees_total Total number of frees.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 62815\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 8.595544e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 6.983208e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 6.209536e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 9.91232e+06\n# HELP go_memstats_heap_objects Number of allocated objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 38478\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.58752e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 1.6121856e+07\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7001045398775318e+09\n# HELP go_memstats_lookups_total Total number of pointer lookups.\n# TYPE go_memstats_lookups_total counter\ngo_memstats_lookups_total 0\n# HELP go_memstats_mallocs_total Total number of mallocs.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 101293\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 4800\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15600\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 177280\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 179520\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 1.4275312e+07\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 895921\n# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 655360\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 655360\n# HELP go_memstats_sys_bytes Number of bytes obtained from system.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 2.7915528e+07\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.38\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.048576e+06\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 14\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 7.012352e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.7001045391e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.327280128e+09\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\nprocess_virtual_memory_max_bytes 1.8446744073709552e+19\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0" - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120511756-run" - } - }, - "/api/ekuiper/ruletest": { - "post": { - "summary": "Create a Test Rule", - "x-apifox-folder": "Ekuiper/Test Rule", - "x-apifox-status": "released", - "deprecated": false, - "description": "Create a trial run rule, wait for it to run. This API can check syntax, ensuring the creation of an executable trial run rule.After the rule is created successfully, the websocket endpoint starts. Users can listen to the websocket address http://locahost:10081/test/uuid to get the result output. Among them, the port and id are the above return values.", - "tags": [ - "test rule" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": [ - "string", - "null" - ], - "description": "The id of the test rule, required, used for subsequent test rule management. Ensure uniqueness, it cannot be repeated with other test rules, otherwise the original test rule will be overwritten. This id has no association with the id of ordinary rules." - }, - "sql": { - "type": [ - "string", - "null" - ], - "description": "The sql statement of the test rule, required, used to define the syntax of the test rule." - }, - "mockSource": { - "type": [ - "object", - "null" - ], - "properties": { - "demo": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "a": { - "type": "integer" - }, - "b": { - "type": "integer" - } - }, - "x-apifox-orders": [ - "a", - "b" - ] - } - }, - "interval": { - "type": "integer" - }, - "loop": { - "type": "boolean" - } - }, - "required": [ - "data", - "interval", - "loop" - ], - "x-apifox-orders": [ - "data", - "interval", - "loop" - ] - }, - "demo1": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "n": { - "type": "integer" - } - }, - "required": [ - "n" - ], - "x-apifox-orders": [ - "n" - ] - } - }, - "interval": { - "type": "integer" - }, - "loop": { - "type": "boolean" - } - }, - "required": [ - "data", - "interval", - "loop" - ], - "x-apifox-orders": [ - "data", - "interval", - "loop" - ] - } - }, - "required": [ - "demo", - "demo1" - ], - "x-apifox-orders": [ - "demo", - "demo1" - ], - "description": "The mock rule definition of the data source of the test rule, optional, used to define the input data of the test rule. If not defined, the real data source in SQL will be used." - }, - "sinkProps": { - "type": [ - "object", - "null" - ], - "properties": { - "dataTemplate": { - "type": "string" - }, - "fields": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "dataTemplate", - "fields" - ], - "x-apifox-orders": [ - "dataTemplate", - "fields" - ], - "description": "The definition of the sink parameters of the test rule, optional. Most of the common parameters of the sink can be used, such as dataTemplate and fields. If not defined, the default sink parameters will be used." - } - }, - "required": [ - "id", - "sql", - "mockSource", - "sinkProps" - ], - "x-apifox-orders": [ - "id", - "sql", - "mockSource", - "sinkProps" - ] - }, - "example": { - "id": "uuid", - "sql": "select * from demo", - "mockSource": { - "demo": { - "data": [ - { - "a": 2 - }, - { - "b": 3 - } - ], - "interval": 100, - "loop": true - }, - "demo1": { - "data": [ - { - "n": 2 - }, - { - "n": 3 - } - ], - "interval": 200, - "loop": true - } - }, - "sinkProps": { - "dataTemplate": "xxx", - "fields": [ - "abc", - "test" - ] - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "port": { - "type": "integer" - } - }, - "required": [ - "id", - "port" - ], - "x-apifox-orders": [ - "id", - "port" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "id": "uuid", - "port": 10081 - } - } - } - } - } - }, - "400": { - "description": "error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "msg": { - "type": "string" - } - }, - "required": [ - "msg" - ], - "x-apifox-orders": [ - "msg" - ] - }, - "examples": { - "1": { - "summary": "Exception", - "value": { - "msg": "error message here" - } - } - } - } - } - } - } - } - }, - "/api/ekuiper/ruletest/{id}/start": { - "post": { - "summary": "Start the Test Rule", - "x-apifox-folder": "Ekuiper/Test Rule", - "x-apifox-status": "released", - "deprecated": false, - "description": "Start the trial run rule, WebSocket will be able to receive the data output after the rule runs.", - "tags": [ - "test rule" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "Test rule uuid was started" - } - } - } - } - } - } - } - }, - "/api/ekuiper/ruletest/{id}": { - "delete": { - "summary": "Delete the Test Rule", - "x-apifox-folder": "Ekuiper/Test Rule", - "x-apifox-status": "released", - "deprecated": false, - "description": "Delete the trial run rule, WebSocket will stop the service.", - "tags": [ - "test rule" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "Test rule uuid was stopped" - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-133383197-run" - } - }, - "/api/ekuiper/udf/javascript": { - "post": { - "summary": "Create a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Besides defining function in plugins, user-defined functions (UDF) are also supported independently. Currently, we only support JavaScript UDF. We can use REST API or CLI to manage JavaScript functions. \n\nUse this endpoint to create a new function.", - "tags": [ - "udf" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": " A unique name for the function. This name must also be defined as a function in the script field." - }, - "description": { - "type": "string", - "description": "A brief description of the function." - }, - "script": { - "type": "string", - "description": "The function implementation in JavaScript." - }, - "isAgg": { - "type": "boolean", - "description": "A boolean indicating whether the function is an aggregate function." - } - }, - "required": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-orders": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-ignore-properties": [] - }, - "example": { - "id": "area", - "description": "calculate area", - "script": "function area(x, y) { return x * y; }", - "isAgg": false - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - } - } - } - } - }, - "get": { - "summary": "List UDFs", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Use this endpoint to display all JavaScript functions defined in the server.The response will be a list of function names. ", - "tags": [ - "udf" - ], - "parameters": [], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "examples": { - "1": { - "summary": "success", - "value": [ - "area" - ] - } - } - } - } - } - } - } - }, - "/api/ekuiper/udf/javascript/{id}": { - "get": { - "summary": "Describe a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Use this endpoint to get the detailed definition of a function.Replace {id} with the name of the function you want to describe. The response will be a JSON object with the function's details.", - "tags": [ - "udf" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "script": { - "type": "string" - }, - "isAgg": { - "type": "boolean" - } - }, - "required": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-orders": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-ignore-properties": [] - }, - "examples": { - "1": { - "summary": "success", - "value": { - "id": "area", - "description": "calculate area", - "script": "function area(x, y) { return x * y; }", - "isAgg": false - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Use this endpoint to delete a function.Replace {id} with the name of the function you want to delete. Note that you need to manually stop or delete any rules using the UDF before deleting it. A running rule will not be affected by the deletion of a UDF.", - "tags": [ - "udf" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - } - } - } - } - }, - "put": { - "summary": "Update a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "developing", - "deprecated": false, - "description": "The JavaScript UDF can be updated and hot reload. Notice that, a running rule must be restarted to load the updated function.Replace {id} with the name of the function you want to update. The request body should be the same as when creating a UDF. If the function of the id does not exist, it will be created. Otherwise, it will be updated.", - "tags": [ - "udf" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "neuron-error": { - "type": "object", - "properties": { - "error": { - "type": "integer" - } - }, - "required": [ - "error" - ], - "x-apifox-orders": [ - "error" - ], - "x-apifox-folder": "Data-schemas" - }, - "neuron-0": { - "type": "object", - "properties": { - "error": { - "type": "integer" - } - }, - "required": [ - "error" - ], - "x-apifox-orders": [ - "error" - ], - "x-apifox-folder": "Data-schemas" - }, - "neuron-token": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - }, - "required": [ - "token" - ], - "x-apifox-orders": [ - "token" - ], - "x-apifox-folder": "Data-schemas" - }, - "VersionResp": { - "type": "object", - "properties": { - "version": { - "type": "string" - } - }, - "required": [ - "version" - ], - "x-apifox-orders": [ - "version" - ], - "x-apifox-folder": "Data-schemas" - }, - "DeliverBody": { - "type": "object", - "required": [ - "template" - ], - "properties": { - "template": { - "type": "string", - "x-go-name": "Template" - } - }, - "x-apifox-orders": [ - "template" - ], - "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-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-folder": "Schemas" - }, - "LivenessReq": { - "type": "object", - "required": [ - "endpointUrl", - "serviceId", - "interval" - ], - "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": [ - "endpointUrl", - "serviceId", - "interval" - ], - "x-apifox-folder": "Schemas" - }, - "LoglevelRsqData": { - "type": "object", - "required": [ - "level" - ], - "properties": { - "level": { - "description": "log level ,could be debug、info、notice、warn、error、fatal", - "type": "string", - "x-go-name": "LoglevelStr" - } - } - }, - "LoglevelSettingReqData": { - "type": "object", - "required": [ - "level" - ], - "properties": { - "level": { - "description": "log level ,could be debug、info、notice、warn、error、fatal", - "type": "string", - "x-go-name": "LoglevelStr" - } - } - }, - "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:stop", - "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:stop", - "type": "string", - "x-go-name": "NeuronStatus" - }, - "os": { - "type": "string", - "x-go-name": "Os" - }, - "systemStatus": { - "description": " 0:normal 1:stop", - "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-folder": "Schemas" - }, - "responseData": { - "type": "object", - "required": [ - "token", - "role" - ], - "properties": { - "token": { - "type": "string", - "x-go-name": "Token" - }, - "role": { - "type": "string", - "x-go-name": "Role" - } - }, - "x-apifox-orders": [ - "token", - "role" - ], - "x-apifox-folder": "Schemas" - }, - "responseLogData": { - "type": "object", - "required": [ - "level" - ], - "properties": { - "level": { - "type": "string", - "x-go-name": "level" - } - }, - "x-apifox-orders": [ - "level" - ], - "x-apifox-folder": "Schemas" - }, - "LoginBody": { - "type": "object", - "required": [ - "name", - "password" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "password": { - "type": "string", - "x-go-name": "Password" - } - }, - "x-apifox-orders": [ - "name", - "password" - ], - "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-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-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-folder": "Schemas" - }, - "SendActivationCodeReqData": { - "type": "object", - "required": [ - "activationCode" - ], - "properties": { - "activationCode": { - "type": "string", - "x-go-name": "ActivationCode" - } - }, - "x-apifox-orders": [ - "activationCode" - ], - "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-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-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-folder": "Schemas" - }, - "LivenessBody": { - "type": "object", - "required": [ - "endpointUrl", - "serviceId", - "interval" - ], - "properties": { - "endpointUrl": { - "type": "string", - "x-go-name": "EndpointUrl" - }, - "interval": { - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "serviceId": { - "type": "string", - "x-go-name": "ServiceID" - } - } - }, - "AlertConfig": { - "type": "object", - "required": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ], - "properties": { - "alertsConfig": { - "description": " optional, the setting of the rule alerts to be pushed,if it is empty, it means that requires all alert types.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AlertRuleConfig" - }, - "x-go-name": "AlertsConfig" - }, - "enabled": { - "description": " false: disabled, true: enabled ,If the value is false, the other fields are non-required", - "type": "boolean", - "x-go-name": "Enable" - }, - "fireChecks": { - "description": " required if alertsConfig is empty, the default fireChecks for all rules in alertsConfig", - "type": "integer", - "format": "int64", - "x-go-name": "FireChecks" - }, - "interval": { - "description": "\trequired if enabled is true", - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "resolveChecks": { - "description": " required if alertsConfig is empty, the default resolveChecks for all rules in alertsConfig", - "type": "integer", - "format": "int64", - "x-go-name": "ResolveChecks" - }, - "webhookUrl": { - "description": "\toptional,the webhook that alert events are pushed to", - "type": "string", - "x-go-name": "WebhookUrl" - } - } - }, - "AlertRuleConfig": { - "type": "object", - "required": [ - "ruleId", - "fireChecks", - "resolveChecks", - "ruleName" - ], - "properties": { - "fireChecks": { - "description": "how many consecutive monitoring times will trigger an alarm,means that N.", - "type": "integer", - "format": "int64", - "x-go-name": "FireChecks" - }, - "resolveChecks": { - "description": "how many times to monitor continuously, the alarm will be resumed,means that P.", - "type": "integer", - "format": "int64", - "x-go-name": "ResolveChecks" - }, - "ruleId": { - "type": "string", - "x-go-name": "RuleId" - }, - "ruleName": { - "type": "string", - "x-go-name": "RuleName" - } - } - }, - "MetricConfig": { - "type": "object", - "required": [ - "enabled", - "prometheusUrl", - "prometheusUsername", - "prometheusPassword", - "interval", - "metricIds", - "labels" - ], - "properties": { - "enabled": { - "description": "required,false: disabled, true: enabled ,If the value is false, the other fields are non-required", - "type": "boolean", - "x-go-name": "Enable" - }, - "interval": { - "description": " optional, the interval of generating metrics data,unit is second", - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "labels": { - "description": "optional, additional labels needed for metric, will be pushed to pushgateway along with the metrics data for grouping of metrics,key: label name,value: label value", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "Labels" - }, - "metricIds": { - "description": "optional, metric id array,a value of null means push all metric data.", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MetricIds" - }, - "prometheusPassword": { - "description": " optional, the url of password for pushgateway", - "type": "string", - "x-go-name": "PrometheusPassword" - }, - "prometheusUrl": { - "description": " optional, the url of pushgateway,like http://localhost:9091", - "type": "string", - "x-go-name": "PrometheusUrl" - }, - "prometheusUsername": { - "description": " optional, the url of username for pushgateway", - "type": "string", - "x-go-name": "PrometheusUsername" - } - } - }, - "PasswordChangeBody": { - "type": "object", - "required": [ - "name", - "old_password", - "new_password" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "new_password": { - "type": "string", - "x-go-name": "NewPassword" - }, - "old_password": { - "type": "string", - "x-go-name": "OldPassword" - } - } - }, - "NewUserRequestBody": { - "type": "object", - "required": [ - "name", - "password", - "role" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "password": { - "type": "string", - "x-go-name": "Password" - }, - "description": { - "type": "string", - "x-go-name": "UserDescription" - }, - "role": { - "type": "string", - "x-go-name": "Role" - } - } - }, - "UserRoleChangeBody": { - "type": "object", - "required": [ - "name", - "role" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "description": { - "type": "string", - "x-go-name": "UserDescription" - }, - "role": { - "type": "string", - "x-go-name": "Role" - } - } - }, - "SSOConfigBody": { - "type": "object", - "required": [ - "name", - "url", - "clientId", - "clientSecret", - "type" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Name" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "clientId": { - "type": "string", - "x-go-name": "ClientID" - }, - "clientSecret": { - "type": "string", - "x-go-name": "ClientSecret" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "enabled": { - "type": "boolean", - "default": false, - "x-go-name": "Enabled" - } - } - }, - "UpdateSSOConfigBody": { - "type": "object", - "required": [ - "url", - "clientId", - "clientSecret", - "type", - "enabled" - ], - "properties": { - "url": { - "type": "string", - "x-go-name": "URL" - }, - "clientId": { - "type": "string", - "x-go-name": "ClientID" - }, - "clientSecret": { - "type": "string", - "x-go-name": "ClientSecret" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - } - } - } - } - }, - "servers": [] -} \ No newline at end of file diff --git a/redocly/api-swagger-zh.json b/redocly/api-swagger-zh.json deleted file mode 100644 index acfcaaf..0000000 --- a/redocly/api-swagger-zh.json +++ /dev/null @@ -1,14016 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "NeuronEX API", - "description": "", - "version": "1.0.0" - }, - "tags": [ - { - "name": "NeuronEX-API" - }, - { - "name": "System" - }, - { - "name": "server" - }, - { - "name": "management" - }, - { - "name": "liveness" - }, - { - "name": "log" - }, - { - "name": "monitor" - }, - { - "name": "process_control" - }, - { - "name": "status" - }, - { - "name": "sse" - }, - { - "name": "sso" - }, - { - "name": "template" - }, - { - "name": "ekuiper_plugin" - }, - { - "name": "tunnel" - }, - { - "name": "license" - }, - { - "name": "Data Collection" - }, - { - "name": "data collection 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" - }, - { - "name": "data processing metrics" - }, - { - "name": "test rule" - }, - { - "name": "udf" - } - ], - "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" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "licenseType": "TRIAL", - "customerName": "EMQ Technologies Inc.", - "customerContact": "support@emqx.io", - "startDate": "2023-12-06 03:28:25", - "expiredDate": "2123-12-06 03:28:25", - "expired": false, - "totalTagCount": 30, - "usedTagCount": 0, - "enabledPlugins": [ - "ABB COMLI", - "Allen-Bradley ControlLogix 5500", - "Allen-Bradley DF1", - "Allen-Bradley MicroLogix 1400", - "BACnet/IP", - "Beckhoff ADS", - "DLT645-1997", - "DLT645-2007", - "EtherNet/IP(CIP)", - "GE SRTP", - "HJ212-2017", - "HOSTLINK CMODE", - "IEC60870-5-104", - "IEC61850", - "Inovance Modbus TCP", - "KNXnet/IP", - "KUKA ETHERNET KRL TCP", - "Mitsubishi 1E", - "Mitsubishi 3E", - "Mitsubishi FX", - "Modbus RTU", - "Modbus TCP", - "Modbus TCP QH", - "NON A11", - "OPC UA", - "Omron FINS TCP", - "Omron FINS UDP", - "Panasonic Mewtocol", - "Profinet IO", - "SECS GEM HSMS", - "Siemens FetchWrite", - "Siemens RK512", - "Siemens S7 ISOTCP", - "Siemens S7 ISOTCP for 300/400", - "SparkPlugB", - "WebSocket" - ], - "hardwareToken": "FdVCScD63F5gGcB0eO5OuwQsxg5jJoa+YOxyOub9c5g=", - "ekuiperOn": true, - "officialEmail": "support@emqx.io" - } - } - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "license": "CAIaFUVNUSBUZWNobm9s..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UploadLicenseResponse" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "type": "TRIAL", - "customerName": "EMQ Technologies Inc.", - "customerContact": "support@emqx.io", - "startDate": "2023-12-06", - "expiredDate": "2123-12-06", - "expired": false, - "totalTagCount": 1000, - "usedTagCount": 1, - "enabledPlugins": [ - "ABB COMLI", - "Allen-Bradley ControlLogix 5500", - "Allen-Bradley DF1", - "Allen-Bradley MicroLogix 1400", - "BACnet/IP", - "Beckhoff ADS", - "DLT645-1997", - "DLT645-2007", - "EtherNet/IP(CIP)", - "GE SRTP", - "HJ212-2017", - "HOSTLINK CMODE", - "IEC60870-5-104", - "IEC61850", - "Inovance Modbus TCP", - "KNXnet/IP", - "KUKA ETHERNET KRL TCP", - "Mitsubishi 1E", - "Mitsubishi 3E", - "Mitsubishi FX", - "Modbus RTU", - "Modbus TCP", - "Modbus TCP QH", - "NON A11", - "OPC UA", - "Omron FINS TCP", - "Omron FINS UDP", - "Panasonic Mewtocol", - "Profinet IO", - "SECS GEM HSMS", - "Siemens FetchWrite", - "Siemens RK512", - "Siemens S7 ISOTCP", - "Siemens S7 ISOTCP for 300/400", - "SparkPlugB", - "WebSocket" - ], - "hardwareToken": "", - "ekuiperOn": true, - "officialEmail": "support@emqx.io" - } - } - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "activationCode": "6YnJBVBOcL2pBQgwnPdtdtW..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusError" - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "license": "CAIaFUVNUSBUZWNobm9s..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusError" - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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-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": { - "license": "CAIaFUVNUSBUZWNobm9s..." - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusError" - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": {} - } - } - } - }, - "204": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719065-run" - } - }, - "/api/plugin/portable": { - "post": { - "summary": "Create ekuiper plugin ", - "x-apifox-folder": "NeuronEX/ekuiper_plugin", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "ekuiper_plugin" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "name": { - "type": "string" - }, - "operationId": { - "type": "integer" - } - }, - "required": [ - "address", - "name", - "operationId" - ], - "x-apifox-ignore-properties": [], - "x-apifox-orders": [ - "address", - "name", - "operationId" - ] - }, - "example": { - "address": "http://127.0.0.1:9081", - "name": "123456", - "operationId": 10 - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": "" - } - } - } - } - } - } - } - }, - "/api/ek_service": { - "post": { - "summary": "Create external service", - "x-apifox-folder": "NeuronEX/ekuiper_plugin", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "ekuiper_plugin" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "headers": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - } - }, - "required": [ - "name", - "address", - "headers" - ], - "x-apifox-ignore-properties": [], - "x-apifox-orders": [ - "name", - "address", - "headers" - ] - }, - "example": { - "name": "test", - "address": "http://127.0.0.1:9081", - "headers": {} - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": "" - } - } - } - } - } - } - } - }, - "/api/ek_service/${serviceName}": { - "delete": { - "summary": "Delete external service ", - "x-apifox-folder": "NeuronEX/ekuiper_plugin", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "ekuiper_plugin" - ], - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": "" - } - } - } - } - } - } - } - }, - "/api/tunnel": { - "get": { - "summary": "Get ECP Tunnel Config info", - "x-apifox-folder": "NeuronEX/tunnel", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "tunnel" - ], - "parameters": [], - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enable": { - "type": "boolean" - }, - "enableSSL": { - "type": "boolean" - }, - "registerId": { - "type": "string" - } - }, - "required": [ - "enable", - "enableSSL", - "registerId" - ], - "x-apifox-orders": [ - "enable", - "enableSSL", - "registerId" - ], - "x-apifox-ignore-properties": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "enable": false, - "enableSSL": false, - "registerId": "dc3e97118e33-1115b9328bfb58948407" - } - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-161376701-run" - }, - "post": { - "summary": "ECP Tunnel configuration", - "x-apifox-folder": "NeuronEX/tunnel", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "tunnel" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enable": { - "type": "boolean" - }, - "enableSSL": { - "type": "boolean" - }, - "address": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "description": { - "type": "string" - }, - "certificationRaw": { - "type": "string" - }, - "privateKeyRaw": { - "type": "string" - }, - "rootCARaw": { - "type": "string" - }, - "registerId": { - "type": "string" - } - }, - "required": [ - "enable", - "enableSSL", - "address", - "username", - "password", - "description", - "certificationRaw", - "privateKeyRaw", - "rootCARaw", - "registerId" - ], - "x-apifox-orders": [ - "enable", - "enableSSL", - "address", - "username", - "password", - "description", - "certificationRaw", - "privateKeyRaw", - "rootCARaw", - "registerId" - ], - "x-apifox-ignore-properties": [] - }, - "example": { - "enable": false, - "enableSSL": false, - "address": "tcp://127.0.0.1:1883", - "username": "admin", - "password": "password", - "description": "test", - "certificationRaw": "cert_base64", - "privateKeyRaw": "key_base64", - "rootCARaw": "ca_base64", - "registerId": "1234567890" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-ignore-properties": [], - "x-apifox-orders": [] - } - } - } - } - } - } - }, - "/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": { - "name": "admin", - "password": "0000" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/responseData" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "token": "eyJhbGciOiJ....", - "role": "Administrator" - } - } - } - } - } - }, - "401": { - "description": "Username or Password incorrect!", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719066-run" - } - }, - "/api/users/password/{name}": { - "put": { - "summary": "Change password", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "passwordChangeHandler", - "tags": [ - "server" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "username to be deleted", - "required": true, - "example": "test", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PasswordChangeBody" - }, - "example": { - "name": "test", - "old_password": "0000", - "new_password": "1111" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" - } - }, - "/api/users": { - "post": { - "summary": "Creat New User", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "newUserHandler", - "tags": [ - "server" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewUserRequestBody" - }, - "example": { - "name": "test", - "password": "test", - "role": "Viewer", - "description": "create new user test and set him to viewer" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" - } - }, - "/api/users/role/{name}": { - "put": { - "summary": "Change role", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "roleChangeHandler", - "tags": [ - "server" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "username to be deleted", - "required": true, - "example": "test", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserRoleChangeBody" - }, - "example": { - "name": "test", - "role": "Viewer", - "description": "change user test's role to viewer" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run" - } - }, - "/api/users/{name}": { - "delete": { - "summary": "Delete User", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "deleteUserHandler", - "tags": [ - "server" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "username to be deleted", - "required": true, - "example": "test", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "version": "3.1.0-beta.3", - "systemStatus": "0", - "neuronRunningTime": "6332", - "neuronStatus": "0", - "neuronMemoryUsed": "8364032", - "neuronMemoryTotal": "4125425664", - "ekuiperRunningTime": "6332", - "ekuiperStatus": "0", - "ekuiperMemoryUsed": "84316160", - "ekuiperMemoryTotal": "4125425664", - "submoduleStatus": { - "alert": false, - "monitor": false, - "syslog": false - }, - "hwToken": "m/djk5abRRToVTyBBCXkUVyMumgbYmo2PdwdjnVeqn8=", - "os": "Debian GNU/Linux 11", - "kernel": "5.10.124-linuxkit", - "arch": "x86_64", - "clib": "glibc-2.31" - } - } - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "$ref": "#/components/schemas/VersionResp" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "version": "3.1.0-beta.3" - } - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719069-run" - } - }, - "/api/management/cancel": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "management" - ], - "summary": "Cancel being Managed by ECP", - "x-apifox-folder": "NeuronEX/management", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "CancelManagement", - "responses": { - "200": { - "description": "", - "schema": {} - } - } - } - }, - "/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" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "enabled": false, - "network": "udp4", - "addr": "", - "priority": 6, - "tag": "neuronex" - } - } - } - } - } - } - } - }, - "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": { - "enabled": true, - "addr": "localhost:10514", - "priority": 6, - "tag": "neuronex" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - } - } - }, - "/api/liveness/report": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "liveness" - ], - "summary": "Query liveness info", - "x-apifox-folder": "NeuronEX/liveness", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "GetLivenessConfig", - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LivenessReq" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "endpointUrl": "", - "serviceId": "", - "interval": 0 - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "liveness" - ], - "summary": "Liveness configuration", - "x-apifox-folder": "NeuronEX/liveness", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "livenessConfigHandler", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LivenessReq" - }, - "example": { - "endpointUrl": "127.0.0.1:1456", - "serviceId": "123456", - "interval": 10 - } - } - } - }, - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/log": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Get NeuronEX log level configuration", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "LoglevelGetting", - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/responseLogData" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "level": "info" - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Set NeuronEX log level configuration", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "LoglevelSetting", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoglevelSettingReqData" - }, - "example": { - "level": "info" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/log/ekuiper": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download data processing engine log", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadEkuiperLog", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/api/log/neuron": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download data collection engine log", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadNeuronLog", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/api/log/neuron/{nodeName}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download the log of data collection engine driver node", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadNeuronLogByNodeName", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/api/log/neuronex": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "log" - ], - "summary": "Download NeuronEX log", - "x-apifox-folder": "NeuronEX/log", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DownloadNeuronexLog", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "log ..." - } - } - } - } - } - } - } - }, - "/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" - } - }, - { - "name": "nodes", - "in": "query", - "description": "List of nodes to be queried", - "required": false, - "example": "south1,south3", - "schema": { - "type": "string" - } - }, - { - "name": "rules", - "in": "query", - "description": "List of rules to be queried", - "required": false, - "example": "rule1,rule2", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "query neuron template sueccess", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "streams": { - "type": "object", - "properties": { - "neuronStream": { - "type": "string" - } - }, - "required": [ - "neuronStream" - ], - "x-apifox-orders": [ - "neuronStream" - ] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "uploads": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "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" - ] - }, - "examples": { - "1": { - "summary": "ekuiper success", - "value": { - "streams": { - "neuronStream": "CREATE STREAM neuronStream() WITH (TYPE=\"neuron\",FORMAT=\"json\",CONF_KEY=\"default\",SHARED=\"TRUE\");" - }, - "tables": {}, - "rules": {}, - "nativePlugins": {}, - "portablePlugins": {}, - "sourceConfig": {}, - "sinkConfig": {}, - "connectionConfig": {}, - "Service": {}, - "Schema": {}, - "uploads": {} - } - } - } - } - } - }, - "x-200:query ekuiper template sueccess": { - "description": "query ekuiper template sueccess", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "plugin": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "x-apifox-orders": [ - "plugin", - "name" - ] - } - }, - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "subscriptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "settings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "node": { - "type": "string" - }, - "params": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer" - } - }, - "required": [ - "host", - "port" - ], - "x-apifox-orders": [ - "host", - "port" - ] - } - }, - "x-apifox-orders": [ - "node", - "params" - ] - } - } - }, - "required": [ - "nodes", - "groups", - "tags", - "subscriptions", - "settings" - ], - "x-apifox-orders": [ - "nodes", - "groups", - "tags", - "subscriptions", - "settings" - ] - }, - "examples": { - "1": { - "summary": "query ekuiper template sueccess", - "value": { - "nodes": [ - { - "plugin": "eKuiper", - "name": "Processing" - } - ], - "groups": [], - "tags": [], - "subscriptions": [], - "settings": [ - { - "node": "Processing", - "params": { - "host": "127.0.0.1", - "port": 7081 - } - } - ] - } - } - } - } - } - } - }, - "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 ", - "required": true, - "example": "", - "schema": { - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "template": { - "type": "string", - "description": "optional, Node data to be deliver if category is 1, or rule data to be deliver if category is 2 " - }, - "ruleData": { - "type": "string", - "description": "optional, Rule data to be deliver " - }, - "NodeData": { - "type": "string", - "description": "optional, Node data to be deliver " - }, - "operationId": { - "type": "integer", - "description": "optional,if operationId > 0, The operation will be logged and pushed" - } - }, - "required": [ - ] - }, - "example": { - "template": "{\n \"streams\": {\n \"neuronStream\": \"CREATE STREAM neuronStream() WITH (TYPE=\\\"neuron\\\",FORMAT=\\\"json\\\",CONF_KEY=\\\"default\\\",SHARED=\\\"TRUE\\\");\"\n },\n \"tables\": {},\n \"rules\": {},\n \"nativePlugins\": {},\n \"portablePlugins\": {},\n \"sourceConfig\": {},\n \"sinkConfig\": {},\n \"connectionConfig\": {},\n \"Service\": {},\n \"Schema\": {},\n \"uploads\": {}\n}" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "400": { - "description": "Deliver failed", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "failed reason message" - } - }, - "required": [ - "message" - ], - "x-apifox-orders": [ - "message" - ] - }, - "examples": { - "1": { - "summary": "Json format err", - "value": { - "message": "Json format err" - } - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719073-run" - } - }, - "/api/process/ekuiper/start": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Start ekuiper process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StartKuiper", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/ekuiper/stop": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Stop ekuiper process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StopKuiper", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/neuron/start": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Start neuron process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StartNeuron", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/neuron/stop": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "Stop neuron process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StopNeuron", - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/process/status": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "process_control" - ], - "summary": "The status of Ekuiper and Neuron process", - "x-apifox-folder": "NeuronEX/process_control", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "KuiperNeuronStatus", - "responses": { - "200": { - "description": "", - "schema": {} - } - } - } - }, - "/api/status/liveness": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "status" - ], - "summary": "Get NeuronEX liveness status", - "x-apifox-folder": "NeuronEX/status", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "LiveStatusGetting", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "liveness": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - } - }, - "required": [ - "liveness" - ], - "x-apifox-orders": [ - "liveness" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "liveness": { - "in": 853, - "out": 0 - } - } - } - } - } - } - } - } - } - }, - "/api/status/log": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "status" - ], - "summary": "Get NeuronEX syslog status", - "x-apifox-folder": "NeuronEX/status", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "SyslogStatusGetting", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "server": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "outSend": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "sse": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - }, - "neuron": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "neuronex": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "ekuiper": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "others": { - "type": "object", - "properties": { - "in": { - "type": "integer" - }, - "out": { - "type": "integer" - } - }, - "required": [ - "in", - "out" - ], - "x-apifox-orders": [ - "in", - "out" - ] - }, - "clientNumber": { - "type": "integer" - } - }, - "required": [ - "in", - "out", - "neuron", - "neuronex", - "ekuiper", - "others", - "clientNumber" - ], - "x-apifox-orders": [ - "in", - "out", - "neuron", - "neuronex", - "ekuiper", - "others", - "clientNumber" - ] - } - }, - "required": [ - "server", - "outSend", - "sse" - ], - "x-apifox-orders": [ - "server", - "outSend", - "sse" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "server": { - "in": 75668145, - "out": 75668144 - }, - "outSend": { - "in": 75668145, - "out": 2513 - }, - "sse": { - "in": 75668145, - "out": 75668144, - "neuron": { - "in": 464, - "out": 464 - }, - "neuronex": { - "in": 75665075, - "out": 75665074 - }, - "ekuiper": { - "in": 93, - "out": 93 - }, - "others": { - "in": 2513, - "out": 2513 - }, - "clientNumber": 0 - } - } - } - } - } - } - } - } - } - }, - "/api/status/ecp_tunnel": { - "get": { - "summary": "Get ecp tunnel status", - "x-apifox-folder": "NeuronEX/status", - "x-apifox-status": "released", - "deprecated": false, - "description": "Get ecp tunnel status", - "tags": [ - "status" - ], - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "tunnel status,value can be init,idle,subscribe serviceId,subscribe revoke serviceId,activating,subscribe configuration,revoke serviceId,ECP config modified." - } - }, - "required": [ - "status" - ], - "x-apifox-orders": [ - "status" - ], - "x-apifox-ignore-properties": [] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "status": "init" - } - } - } - } - } - } - } - } - }, - "/api/stream/log": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "sse" - ], - "summary": "Get NeuronEX streaming log", - "x-apifox-folder": "NeuronEX/sse", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "StreamingLog", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": "0", - "x-go-name": "Type", - "name": "type", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": "10", - "x-go-name": "Priority", - "name": "priority", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/event-stream": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "2023-12-20T07:55:49Z neuronex[1]: level=error msg=\"forward syslog to server error [&{0x174ba08 true 0xc00054e000 neuronex neuronex-231220 6 localhost:10514}][failed to get connection]\" file=\"syslog/out_send.go:113\" func=\"internal/syslog.(*SendOut).Process\"" - } - } - } - } - } - } - } - }, - "/api/stream/clients": { - "get": { - "summary": "Get stream client status", - "x-apifox-folder": "NeuronEX/sse", - "x-apifox-status": "released", - "deprecated": false, - "description": "Get stream client status", - "tags": [ - "sse" - ], - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "clientAddress": { - "type": "string" - } - }, - "x-apifox-orders": [ - "clientAddress" - ], - "x-apifox-ignore-properties": [] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "clientAddress": "127.0.0.1:9081" - } - ] - } - } - } - } - } - } - } - }, - "/api/sso": { - "get": { - "summary": "Get all SSO configurations", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "QuerySSOConfigs", - "tags": [ - "sso" - ], - "parameters": [ - { - "name": "enabled", - "in": "query", - "description": "Optional, query configurations by 'enabled' field", - "required": false, - "example": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "clientId": { - "type": "string" - }, - "clientSecret": { - "type": "string" - }, - "type": { - "type": "string" - }, - "enabled": { - "type": "boolean", - "default": false - } - }, - "required": [ - "name", - "url", - "clientId", - "clientSecret", - "type", - "enabled" - ], - "x-apifox-orders": [ - "name", - "url", - "clientId", - "clientSecret", - "type", - "enabled" - ] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "8I744Myxxxx", - "clientSecret": "5jMnFyxxxx", - "type": "oauth2", - "enabled": true - }, - { - "name": "sso2", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0uxxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": false - } - ] - } - } - } - } - }, - "400": { - "description": "@ErrorInfo(1003,\"Request param invalid\")\n@ErrorInfo(19002,\"Configuration name not found in the query\")\n)" - } - } - }, - "post": { - "summary": "Add a new SSO configuration", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "SSOConfigHandler", - "tags": [ - "sso" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SSOConfigBody" - }, - "example": { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0usxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": false - } - } - } - }, - "responses": { - "200": { - "description": "", - "schema": {} - }, - "400": { - "description": "@ErrorInfo(1002,\"Request body invalid\")\n@ErrorInfo(19000,\"Add ssoConfiguration failed\")\n@ErrorInfo(19004,\"Configuration already exists\")\n" - } - } - } - }, - "/api/sso/{serverName}": { - "get": { - "summary": "Get an SSO configuration", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "QuerySSOConfig", - "tags": [ - "sso" - ], - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SSOConfigBody" - }, - "example": { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0usxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": false - } - } - } - }, - "400": { - "description": "@ErrorInfo(19002,\"Configuration name not found in the query\")\n" - } - } - }, - "put": { - "summary": "Update an SSO configuration", - "x-apifox-folder": "NeuronEX/server", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "UpdateSSOConfig", - "tags": [ - "sso" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSSOConfigBody" - }, - "example": { - "name": "sso1", - "url": "https://iamnew.ctwing.cn", - "clientId": "VDx2v0usxxx", - "clientSecret": "1uu9c5xxxx", - "type": "oauth2", - "enabled": true - } - } - } - }, - "responses": { - "200": { - "description": "", - "schema": {} - }, - "400": { - "description": "@ErrorInfo(1002,\"Request body invalid\")\n@ErrorInfo(19001,\"Update ssoConfiguration failed\")\n@ErrorInfo(19002,\"Configuration name not found in the query\")\n" - } - } - }, - "delete": { - "summary": "Delete an SSO configuration", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "DeleteSSOConfig", - "tags": [ - "sso" - ], - "responses": { - "200": { - "description": "", - "schema": {} - }, - "400": { - "description": "@ErrorInfo(19003,\"Delete ssoConfiguration failed\")\n" - } - } - } - }, - "/sso/{serverName}/oauth2": { - "get": { - "summary": "SSO Handling", - "x-apifox-folder": "NeuronEX/sso", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "operationId": "OAuth2Handler", - "tags": [ - "sso" - ], - "parameters": [ - { - "name": "code", - "in": "query", - "description": "", - "required": true, - "example": "5068471130381875", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-token" - }, - "example": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzcyODcxNjMsImlhdCI6MTYzNzIwMDc2MywiaXNzIjoiRU1RIFRlY2hub2xvZ2llcyBDby4sIEx0ZCBBbGwgcmlnaHRzIHJlc2VydmVkLiIsInBhc3MiOiIwMDAwIiwidXNlciI6ImFkbWluIn0.2EZzPC9djErrCeYNrK2av0smh-eKxDYeyu7cW4MyknI" - } - } - } - }, - "400": { - "description": "@ErrorInfo(19002,\"Configuration name not found in the query\")\n" - } - } - } - }, - "/api/monitor/alert": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Alert types currently supported by NeuronEX", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "AlertRuleConfig", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": [ - "ruleId", - "name", - "desc" - ], - "x-apifox-orders": [ - "ruleId", - "name", - "desc" - ] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "ruleId": "1", - "name": "node_exception_alert", - "desc": "Data collection node exception alert" - }, - { - "ruleId": "2", - "name": "rule_exception_alert", - "desc": "Data processing rule exception alert" - }, - { - "ruleId": "3", - "name": "restart_alert", - "desc": "neuronex restart alert" - } - ] - } - } - } - } - } - } - } - }, - "/api/monitor/alert_config": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Query the current alert rule-related settings", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "QueryAlertRuleConfig", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "webhookUrl": { - "type": "string" - }, - "interval": { - "type": "integer" - }, - "fireChecks": { - "type": "integer" - }, - "resolveChecks": { - "type": "integer" - }, - "alertsConfig": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ], - "x-apifox-orders": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "enabled": true, - "webhookUrl": "https://www.baidu.com", - "interval": 15, - "fireChecks": 0, - "resolveChecks": 0, - "alertsConfig": [ - { - "ruleId": "3", - "fireChecks": 1, - "resolveChecks": -1, - "ruleName": "restart_alert" - }, - { - "ruleId": "1", - "fireChecks": 3, - "resolveChecks": 3, - "ruleName": "node_exception_alert" - }, - { - "ruleId": "2", - "fireChecks": 1, - "resolveChecks": 1, - "ruleName": "rule_exception_alert" - } - ] - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Configure Alert rule-related settings.", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DistributeAlertRuleConfig", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "false: disabled, true: enabled ,If the value is false, the other fields are non-required" - }, - "webhookUrl": { - "type": "string", - "description": "required if enabled is true,the webhook that alert events are pushed to" - }, - "interval": { - "type": "integer", - "description": "required if enabled is true" - }, - "fireChecks": { - "type": "integer", - "description": "required if alertsConfig is empty, the default fireChecks for all rules in alertsConfig" - }, - "resolveChecks": { - "type": "integer", - "description": "required if alertsConfig is empty, the default resolveChecks for all rules in alertsConfig" - }, - "alertsConfig": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "fireChecks": { - "type": "integer", - "description": "how many consecutive monitoring times will trigger an alarm,means that N.Value must be greater than 0 unless ruleId=3, value can be -1" - }, - "resolveChecks": { - "type": "integer", - "description": "how many times to monitor continuously, the alarm will be resumed,means that P.Value must be greater than 0 unless ruleId=3, value can be -1" - } - }, - "x-apifox-orders": [ - "ruleId", - "fireChecks", - "resolveChecks" - ] - }, - "description": "optional, the setting of the rule alerts to be pushed,if it is empty, it means that requires all alert types." - } - }, - "required": [ - "enabled", - "webhookUrl", - "interval" - ], - "x-apifox-orders": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ] - }, - "example": { - "enabled": true, - "webhookUrl": "https://www.baidu.com", - "interval": 15, - "fireChecks": 0, - "resolveChecks": 0, - "alertsConfig": [ - { - "ruleId": "3", - "fireChecks": 1, - "resolveChecks": -1 - }, - { - "ruleId": "1", - "fireChecks": 3, - "resolveChecks": 3 - }, - { - "ruleId": "2", - "fireChecks": 1, - "resolveChecks": 1 - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "schema": {} - }, - "500": { - "description": "" - } - } - } - }, - "/api/monitor/alert_result": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Query recently generated alert events", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "QueryAlertResult", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "firing": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "labels:": { - "type": "object", - "properties": { - "driver": { - "type": "string" - } - }, - "required": [ - "driver" - ], - "x-apifox-orders": [ - "driver" - ] - } - }, - "x-apifox-orders": [ - "ruleId", - "labels:" - ] - }, - "description": "alert fire event array" - }, - "resolved": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ruleId": { - "type": "string" - }, - "labels:": { - "type": "object", - "properties": { - "rule": { - "type": "string" - } - }, - "required": [ - "rule" - ], - "x-apifox-orders": [ - "rule" - ] - } - }, - "x-apifox-orders": [ - "ruleId", - "labels:" - ] - }, - "description": "alert resolved event array" - }, - "timestamp": { - "type": "string" - } - }, - "required": [ - "firing", - "resolved", - "timestamp" - ], - "x-apifox-orders": [ - "firing", - "resolved", - "timestamp" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "firing": [ - { - "ruleId": "xxx", - "labels:": { - "driver": "xxx" - } - } - ], - "resolved": [ - { - "ruleId": "xxx", - "labels:": { - "rule": "xxx" - } - } - ], - "timestamp": "2024-01-01T09:52:26.739266876+08:00" - } - } - } - } - } - } - } - } - }, - "/api/monitor/metric": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Metrics currently supported by NeuronEX", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "MetricConfig", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "metricId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": [ - "metricId", - "name", - "desc" - ], - "x-apifox-orders": [ - "metricId", - "name", - "desc" - ] - } - }, - "examples": { - "1": { - "summary": "Success", - "value": [ - { - "metricId": "1", - "name": "os_info", - "desc": "OS distro and kernel version" - }, - { - "metricId": "2", - "name": "cpu_percent", - "desc": "Total CPU utilisation percentage" - }, - { - "metricId": "3", - "name": "cpu_cores", - "desc": "Number of CPU cores" - }, - { - "metricId": "4", - "name": "mem_total_bytes", - "desc": "Total installed memory in bytes" - } - ] - } - } - } - } - } - } - } - }, - "/api/monitor/metric_config": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Query the current metric-related settings", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "QueryMetricConfig", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "prometheusUrl": { - "type": "string" - }, - "interval": { - "type": "integer" - }, - "labels": { - "type": "object", - "properties": { - "instance": { - "type": "string" - }, - "org_id": { - "type": "string" - }, - "project_id": { - "type": "string" - }, - "service_id": { - "type": "string" - } - }, - "required": [ - "instance", - "org_id", - "project_id", - "service_id" - ], - "x-apifox-orders": [ - "instance", - "org_id", - "project_id", - "service_id" - ] - }, - "metrics": { - "type": "array", - "items": { - "type": "object", - "properties": { - "metricId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": [ - "metricId", - "name", - "desc" - ], - "x-apifox-orders": [ - "metricId", - "name", - "desc" - ] - } - } - }, - "required": [ - "enabled", - "prometheusUrl", - "interval", - "labels", - "metrics" - ], - "x-apifox-orders": [ - "enabled", - "prometheusUrl", - "interval", - "labels", - "metrics" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "enabled": true, - "prometheusUrl": "http://127.0.0.1:9091", - "interval": 15, - "labels": { - "instance": "127.0.0.1:8111", - "org_id": "76995af8", - "project_id": "c1c69f9d", - "service_id": "55f20f8b" - }, - "metrics": [ - { - "metricId": "13", - "name": "north_nodes_total", - "desc": "Number of north nodes" - }, - { - "metricId": "14", - "name": "north_running_nodes_total", - "desc": "Number of north nodes in running state" - }, - { - "metricId": "15", - "name": "north_disconnected_nodes_total", - "desc": "Number of north nodes disconnected" - }, - { - "metricId": "16", - "name": "south_nodes_total", - "desc": "Number of south nodes" - }, - { - "metricId": "17", - "name": "south_running_nodes_total", - "desc": "Number of south nodes in running state" - }, - { - "metricId": "20", - "name": "license_max_tags", - "desc": "License tags limit" - }, - { - "metricId": "21", - "name": "license_used_tags", - "desc": "License total used tags" - }, - { - "metricId": "1031", - "name": "kuiper_op_records_in_total", - "desc": "Total number of messages received by the operation of kuiper_op" - }, - { - "metricId": "1032", - "name": "kuiper_op_records_out_total", - "desc": "Total number of messages published by the operation of kuiper_op" - }, - { - "metricId": "2000", - "name": "running_nodes_total", - "desc": "Number of nodes in running state" - }, - { - "metricId": "2001", - "name": "exception_nodes_total", - "desc": "Number of nodes in running state" - }, - { - "metricId": "2002", - "name": "south_connected_nodes_total", - "desc": "Number of south nodes connected" - }, - { - "metricId": "2003", - "name": "south_exception_nodes_total", - "desc": "Number of south in exception state" - }, - { - "metricId": "2004", - "name": "north_connected_nodes_total", - "desc": "Number of north nodes connected" - }, - { - "metricId": "2005", - "name": "north_exception_nodes_total", - "desc": "Number of north in exception state" - }, - { - "metricId": "2006", - "name": "running_rules_total", - "desc": "Number of rules in running state" - }, - { - "metricId": "2007", - "name": "stopped_rules_total", - "desc": "Number of rules in stopped state" - }, - { - "metricId": "2008", - "name": "not_running_node", - "desc": "Node not in running state" - }, - { - "metricId": "2009", - "name": "exception_node", - "desc": "Node in exception state" - }, - { - "metricId": "3000", - "name": "not_running_rule", - "desc": "Rule not in running state" - } - ] - } - } - } - } - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "monitor" - ], - "summary": "Configure Metric-related settings.", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "DistributeMetricConfig", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "required,false: disabled, true: enabled ,If the value is false, the other fields are non-required" - }, - "prometheusUrl": { - "type": "string", - "description": " required if enabled is true, the url of pushgateway,like http://localhost:9091" - }, - "prometheusUsername": { - "type": "string", - "description": "optional, the url of username for pushgateway" - }, - "prometheusPassword": { - "type": "string", - "description": " optional, the url of password for pushgateway" - }, - "metricIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "optional, metric id array,a value of null means push all metric data." - }, - "interval": { - "type": "integer", - "description": "required if enabled is true, the interval of generating metrics data,unit is second" - }, - "labels": { - "type": "object", - "properties": { - "key1": { - "type": "string" - } - }, - "x-apifox-orders": [ - "key1" - ], - "description": "optional, additional labels needed for metric, will be pushed to pushgateway along with the metrics data for grouping of metrics,key: label name,value: label value" - } - }, - "required": [ - "enabled", - "prometheusUrl", - "interval" - ], - "x-apifox-orders": [ - "enabled", - "prometheusUrl", - "prometheusUsername", - "prometheusPassword", - "metricIds", - "interval", - "labels" - ] - }, - "example": { - "enabled": false, - "prometheusUrl": "http://127.0.0.1:9091", - "prometheusUsername": "", - "prometheusPassword": "", - "metricIds": [ - "13", - "14", - "15", - "16", - "17", - "20", - "21", - "1031", - "1032", - "2000", - "2001", - "2002", - "2003", - "2004", - "2005", - "2006", - "2007", - "2008", - "2009", - "3000" - ], - "interval": 15, - "labels": { - "category": "4", - "org_id": "ef5f285a", - "project_id": "c46ffe05", - "service_id": "25a967f3", - "type": "4" - } - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "500": { - "description": "500", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - } - } - }, - "/api/monitor/metric_contents": { - "get": { - "tags": [ - "monitor" - ], - "summary": "Query the most recent metric data", - "x-apifox-folder": "NeuronEX/monitor", - "x-apifox-status": "released", - "deprecated": false, - "operationId": "MetricContents", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "license_max_tags 30\nlicense_used_tags 0\nnorth_nodes_total 1\nnorth_running_nodes_total 1\nnorth_disconnected_nodes_total 1\nsouth_nodes_total 0\nsouth_running_nodes_total 0\nrunning_nodes_total 1\nexception_nodes_total 1\nsouth_connected_nodes_total 0\nsouth_exception_nodes_total 0\nnorth_connected_nodes_total 0\nnorth_exception_nodes_total 1\nrunning_rules_total 0\nstopped_rules_total 0\n" - } - } - } - } - } - } - } - }, - "/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": "node name", - "type": "string", - "title": "node name" - }, - "plugin": { - "type": "string", - "title": "plugin name" - }, - "params": { - "type": "array", - "title": "setting (optional)", - "items": { - "type": "object", - "properties": { - "param1": { - "type": "integer", - "description": "" - }, - "param2": { - "type": "string", - "description": "" - }, - "param3": { - "type": "bool", - "description": "" - }, - "param4": { - "type": "integer", - "description": "" - } - }, - "x-apifox-orders": [ - "name", - "plugin", - "params" - ] - } - } - }, - "required": [ - "name", - "plugin" - ], - "x-apifox-orders": [ - "name", - "plugin" - ] - }, - "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(2001)": { - "description": "node type invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "node type invalid", - "value": { - "error": 2001 - } - } - } - } - } - }, - "400(2004)": { - "description": "node setting invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "node setting invalid", - "value": { - "error": 2004 - } - } - } - } - } - }, - "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": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "node name" - } - }, - "required": [ - "name" - ], - "x-apifox-orders": [ - "name", - "node" - ] - }, - "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": [ - { - "name": "type", - "in": "query", - "description": "Type of the node,type=1 means southbound node,type=2 means northbound node", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "plugin", - "in": "query", - "description": "Plugin type of the node", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "node", - "in": "query", - "description": "Name of the node", - "required": false, - "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": "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" - ] - }, - "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-orders": [ - "node", - "params" - ], - "description": "//The parameter fields in json fill in different fields according to different plugins" - }, - "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](https://docs.emqx.com/zh/neuronex/latest/api/plugin-setting.html) 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" - } - }, - "required": [ - "node", - "params" - ], - "x-apifox-orders": [ - "node", - "params" - ] - }, - "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": {} - }, - "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" - ] - }, - "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-orders": [ - "states" - ] - }, - "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": { - "group": { - "type": "string", - "description": "group name" - }, - "node": { - "type": "string", - "description": "node name" - }, - "interval": { - "type": "integer", - "description": "read/upload interval(ms)" - } - }, - "x-apifox-orders": [ - "group", - "node", - "interval" - ] - }, - "example": { - "group": "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": {} - }, - "examples": { - "1": { - "summary": "node not exist", - "value": { - "error": 2003 - } - } - } - } - } - }, - "409": { - "description": "group not allow", - "content": { - "application/json": { - "schema": { - "type": "object", - "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": { - "group": { - "type": "string", - "description": "group name" - }, - "node": { - "type": "string", - "description": "node name" - } - }, - "x-apifox-orders": [ - "group", - "node" - ] - }, - "example": { - "group": "gconfig1", - "node": "modbus-node" - } - } - } - }, - "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" - ] - }, - "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-orders": [ - "groups" - ] - }, - "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" - } - }, - "x-apifox-orders": [ - "name", - "address", - "attribute", - "type", - "precision", - "decimal", - "description" - ], - "required": [ - "name", - "address", - "attribute", - "type" - ] - } - } - }, - "x-apifox-orders": [ - "node", - "group", - "tags" - ], - "required": [ - "node", - "group" - ] - }, - "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" - ] - }, - "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", - "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" - ] - } - } - }, - "required": [ - "tags" - ], - "x-apifox-orders": [ - "tags" - ] - }, - "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" - } - }, - "required": [ - "name", - "type", - "attribute", - "address", - "description", - "decimal", - "precision" - ], - "x-apifox-orders": [ - "name", - "type", - "attribute", - "address", - "description", - "precision", - "decimal" - ] - } - } - }, - "required": [ - "node", - "group", - "tags" - ], - "x-apifox-orders": [ - "node", - "group", - "tags" - ] - }, - "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" - ] - }, - "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" - ] - }, - "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" - }, - "schema_file": { - "type": "string", - "format": "binary", - "description": "plugin schema file" - }, - "so_file": { - "type": "string", - "format": "binary", - "description": "plugin so file" - } - }, - "required": [ - "library", - "schema_file", - "so_file" - ], - "x-apifox-orders": [ - "library", - "schema_file", - "so_file" - ] - } - } - } - }, - "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" - ] - } - } - } - }, - "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" - ] - } - } - }, - "required": [ - "plugins" - ], - "x-apifox-orders": [ - "plugins" - ] - }, - "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" - ] - } - }, - "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" - ] - } - } - }, - "required": [ - "map" - ], - "x-apifox-orders": [ - "map" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - }, - "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" - ] - } - }, - "required": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ], - "x-apifox-orders": [ - "name", - "name_zh", - "description", - "description_zh", - "attribute", - "type", - "default", - "valid" - ] - } - }, - "required": [ - "tag_regex", - "group_interval", - "connection_mode", - "interval", - "host", - "port", - "timeout" - ], - "x-apifox-orders": [ - "tag_regex", - "group_interval", - "connection_mode", - "interval", - "host", - "port", - "timeout" - ] - }, - "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": "substring match against driver name", - "type": "string" - }, - "group": { - "description": "substring match against 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" - ] - } - }, - "required": [ - "app", - "driver", - "group" - ], - "x-apifox-orders": [ - "app", - "driver", - "group", - "params" - ] - }, - "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" - ] - } - }, - "required": [ - "app", - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "app", - "driver", - "group", - "params" - ] - } - } - } - }, - "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" - ] - } - }, - "required": [ - "app", - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "app", - "driver", - "group", - "params" - ] - }, - "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" - ] - } - }, - "required": [ - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "driver", - "group", - "params" - ] - } - } - }, - "required": [ - "groups" - ], - "x-apifox-orders": [ - "groups" - ] - }, - "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" - ] - } - }, - "required": [ - "driver", - "group", - "params" - ], - "x-apifox-orders": [ - "driver", - "group", - "params" - ] - } - } - }, - "required": [ - "app", - "groups" - ], - "x-apifox-orders": [ - "app", - "groups" - ] - }, - "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" - ] - }, - "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/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": { - "type": "string", - "description": "node name" - }, - "level": { - "type": "string", - "description": "log level ,could be debug、info、notice、warn、error、fatal" - }, - "core": { - "type": "string", - "description": "whether to switch the core log level.The core field is optional and defaults to true." - } - }, - "required": [ - "node_name", - "level" - ], - "x-apifox-orders": [ - "node_name" - ] - } - } - } - }, - "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/global/drivers": { - "put": { - "summary": "Put Drivers", - "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" - }, - "params": { - "type": "object", - "properties": { - "param1": { - "type": "integer", - "description": "" - }, - "param2": { - "type": "string", - "description": "" - }, - "param3": { - "type": "bool", - "description": "" - }, - "param4": { - "type": "integer", - "description": "" - } - }, - "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-orders": [ - "name", - "interval", - "tags" - ] - } - } - }, - "required": [ - "name", - "plugin", - "params", - "groups" - ], - "x-apifox-orders": [ - "name", - "plugin", - "params", - "groups" - ] - }, - "example": { - "nodes": [ - { - "name": "rtu template", - "plugin": "Modbus RTU", - "params": { - "param1": 1, - "param2": "1.1.1.1", - "param3": true, - "param4": 11.22 - }, - "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": "request body invalid", - "value": { - "error": 1002 - } - }, - "2": { - "summary": "node name too long", - "value": { - "error": 2010 - } - }, - "3": { - "summary": "node not allow delete", - "value": { - "error": 2011 - } - }, - "4": { - "summary": "group parameter invalid", - "value": { - "error": 2105 - } - }, - "5": { - "summary": "group name too long", - "value": { - "error": 2107 - } - }, - "6": { - "summary": "reach max number of groups", - "value": { - "error": 2108 - } - }, - "7": { - "summary": "reach max number of groups", - "value": { - "error": 2108 - } - }, - "8": { - "summary": " library failed to open", - "value": { - "error": 2304 - } - }, - "9": { - "summary": "plugin name too long", - "value": { - "error": 3013 - } - }, - "10": { - "summary": "plugin does not support requested operation", - "value": { - "error": 3019 - } - } - } - } - } - }, - "404": { - "description": "plugin not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "plugin not found", - "value": { - "error": 3014 - } - }, - "2": { - "summary": "library not found", - "value": { - "error": 2301 - } - } - } - } - } - }, - "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": "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-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" - }, - "get": { - "summary": "Get Drivers", - "x-apifox-folder": "Neuron/configuration", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "configuration" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": " Optional, list of names to filter out driver nodes (separated by ',')", - "required": false, - "example": "", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "If success, returns the list of drivers", - "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" - ] - } - } - }, - "required": [ - "templates" - ], - "x-apifox-orders": [ - "templates" - ], - "description": "" - }, - "examples": { - "1": { - "summary": "success", - "value": { - "nodes": [ - { - "name": "rtu template", - "plugin": "Modbus RTU", - "params": { - "param1": 1, - "param2": "1.1.1.1", - "param3": true, - "param4": 11.22 - }, - "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": "node not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/neuron-error" - }, - "examples": { - "1": { - "summary": "node not exist", - "value": { - "error": 2003 - } - } - } - } - } - }, - "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/metrics": { - "get": { - "summary": "Get Metrics", - "x-apifox-folder": "Neuron/metrics", - "x-apifox-status": "released", - "deprecated": false, - "description": "", - "tags": [ - "data collection 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": {} - }, - "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" - }, - "name": { - "type": "string", - "description": "tag name substring match" - }, - "desc": { - "type": "string", - "description": "tag description substring match" - }, - "sync": { - "type": "string", - "description": "synchronous read ,default false" - } - }, - "required": [ - "node", - "group" - ], - "x-apifox-orders": [ - "node", - "group" - ] - }, - "example": { - "node": "modbus-tcp-1", - "group": "group1", - "sync": false - } - } - } - }, - "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" - ] - } - } - }, - "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-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" - ] - }, - "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" - ] - } - } - }, - "required": [ - "node", - "group", - "tags" - ], - "x-apifox-orders": [ - "node", - "group", - "tags" - ] - }, - "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" - ] - }, - "default": { - "type": "object", - "properties": { - "qos": { - "type": "integer" - }, - "server": { - "type": "string" - } - }, - "required": [ - "qos", - "server" - ], - "x-apifox-orders": [ - "qos", - "server" - ] - }, - "demo_conf": { - "type": "object", - "properties": { - "qos": { - "type": "integer" - }, - "server": { - "type": "string" - } - }, - "required": [ - "qos", - "server" - ], - "x-apifox-orders": [ - "qos", - "server" - ] - } - }, - "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." - }, - "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" - ] - }, - "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" - ] - } - }, - "required": [ - "demo_conf" - ], - "x-apifox-orders": [ - "demo_conf" - ] - }, - "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, 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" - ] - }, - "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/stop": { - "post": { - "summary": "Shutdown eKuiper", - "x-apifox-folder": "Ekuiper/configs", - "x-apifox-status": "released", - "deprecated": false, - "description": "Shut down eKuiper through rest api.", - "tags": [ - "configs" - ], - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-133392280-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" - ] - }, - "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": [] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "required": [ - "streams", - "tables", - "rules", - "nativePlugins", - "portablePlugins", - "sourceConfig", - "sinkConfig", - "connectionConfig", - "Service", - "Schema" - ], - "x-apifox-orders": [ - "streams", - "tables", - "rules", - "nativePlugins", - "portablePlugins", - "sourceConfig", - "sinkConfig", - "connectionConfig", - "Service", - "Schema" - ] - } - }, - "required": [ - "ErrorMsg", - "ConfigResponse" - ], - "x-apifox-orders": [ - "ErrorMsg", - "ConfigResponse" - ] - }, - "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": [] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "uploads": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "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" - ] - }, - "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": {} - }, - "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-orders": [] - }, - "tables": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "rules": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "nativePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "portablePlugins": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sourceConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "sinkConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "connectionConfig": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Service": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - }, - "Schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - }, - "required": [ - "streams", - "tables", - "rules", - "nativePlugins", - "portablePlugins", - "sourceConfig", - "sinkConfig", - "connectionConfig", - "Service", - "Schema" - ], - "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" - ] - }, - "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.\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" - ] - }, - "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" - ] - }, - "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" - ] - }, - "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-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-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" - ] - }, - "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" - ] - }, - "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" - ] - } - } - } - }, - "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" - ] - }, - "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-orders": [ - "log" - ] - } - } - }, - "required": [ - "id", - "sql", - "actions" - ], - "x-apifox-orders": [ - "id", - "sql", - "actions" - ] - }, - "example": { - "id": "rule1", - "sql": "SELECT * FROM demo", - "actions": [ - { - "log": {} - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - } - }, - "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": [] - }, - "mqtt": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "topic": { - "type": "string" - } - }, - "required": [ - "server", - "topic" - ], - "x-apifox-orders": [ - "server", - "topic" - ] - } - }, - "x-apifox-orders": [ - "log", - "mqtt" - ] - } - } - }, - "required": [ - "sql", - "actions" - ], - "x-apifox-orders": [ - "sql", - "actions" - ] - }, - "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-orders": [ - "log" - ] - } - } - }, - "required": [ - "id", - "sql", - "actions" - ], - "x-apifox-orders": [ - "id", - "sql", - "actions" - ] - }, - "example": { - "id": "rule1", - "sql": "SELECT * FROM demo", - "actions": [ - { - "log": {} - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-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-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-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-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" - ] - }, - "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" - ] - } - }, - "required": [ - "sources", - "edges" - ], - "x-apifox-orders": [ - "sources", - "edges" - ] - } - } - } - } - }, - "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-orders": [ - "log" - ] - } - } - }, - "required": [ - "id", - "sql", - "actions" - ], - "x-apifox-orders": [ - "id", - "sql", - "actions" - ] - }, - "example": { - "id": "rule1", - "sql": "SELECT * FROM demo", - "actions": [ - { - "log": {} - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "example": { - "file": "file:///tmp/a.json" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-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.", - "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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "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-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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "example": { - "name": "random", - "file": "http://127.0.0.1/services/sample.zip" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-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-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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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" - ] - }, - "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.\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" - ] - }, - "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-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" - ] - } - }, - "required": [ - "Name", - "FieldType" - ], - "x-apifox-orders": [ - "Name", - "FieldType" - ] - } - }, - "Options": { - "type": "object", - "properties": { - "DATASOURCE": { - "type": "string" - }, - "FORMAT": { - "type": "string" - } - }, - "required": [ - "DATASOURCE", - "FORMAT" - ], - "x-apifox-orders": [ - "DATASOURCE", - "FORMAT" - ] - } - }, - "required": [ - "Name", - "StreamFields", - "Options" - ], - "x-apifox-orders": [ - "Name", - "StreamFields", - "Options" - ] - }, - "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" - ] - }, - "name": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "x-apifox-orders": [ - "type" - ] - }, - "age": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "x-apifox-orders": [ - "type" - ] - }, - "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" - ] - } - }, - "required": [ - "type", - "items" - ], - "x-apifox-orders": [ - "type", - "items" - ] - }, - "outdoor": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "x-apifox-orders": [ - "type" - ] - } - }, - "required": [ - "type", - "items" - ], - "x-apifox-orders": [ - "type", - "items" - ] - } - }, - "required": [ - "indoor", - "outdoor" - ], - "x-apifox-orders": [ - "indoor", - "outdoor" - ] - } - }, - "required": [ - "type", - "properties" - ], - "x-apifox-orders": [ - "type", - "properties" - ] - } - }, - "required": [ - "id", - "name", - "age", - "hobbies" - ], - "x-apifox-orders": [ - "id", - "name", - "age", - "hobbies" - ] - }, - "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" - ] - }, - "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-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-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.\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" - ] - }, - "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-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" - ] - } - }, - "required": [ - "Name", - "FieldType" - ], - "x-apifox-orders": [ - "Name", - "FieldType" - ] - } - }, - "Options": { - "type": "object", - "properties": { - "DATASOURCE": { - "type": "string" - }, - "FORMAT": { - "type": "string" - } - }, - "required": [ - "DATASOURCE", - "FORMAT" - ], - "x-apifox-orders": [ - "DATASOURCE", - "FORMAT" - ] - } - }, - "required": [ - "Name", - "StreamFields", - "Options" - ], - "x-apifox-orders": [ - "Name", - "StreamFields", - "Options" - ] - }, - "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-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" - ] - }, - "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-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" - ] - }, - "example": { - "name": "my.json", - "content": "{\"hello\":\"world\"}" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "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-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-121119036-run" - } - }, - "/api/ekuiper/rules/{id}/explain": { - "get": { - "summary": "Query Rule Plan", - "x-apifox-folder": "Ekuiper/rules", - "x-apifox-status": "released", - "deprecated": false, - "description": "The API is used to get the plan of the SQL.", - "tags": [ - "rules" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "rule id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "info": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "children": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": [ - "type", - "info", - "id", - "children" - ], - "x-apifox-orders": [ - "type", - "info", - "id", - "children" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "type": "ProjectPlan", - "info": "Fields:[ * ]", - "id": 0, - "children": [ - 1 - ] - } - } - } - } - } - } - } - } - }, - "/api/ekuiper/metrics": { - "get": { - "summary": "Get Metrics information of the data stream processing", - "x-apifox-folder": "Ekuiper/metrics", - "x-apifox-status": "released", - "deprecated": false, - "description": "Query the raw metrics information of the data stream processing, after the normal operation of the rules, you can see the metrics information in the api similar to kuiper_sink_records_in_total .", - "tags": [ - "data processing metrics" - ], - "parameters": [], - "responses": { - "200": { - "description": "success", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "success", - "value": "# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.000185937\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.000342795\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.000369361\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.000391542\ngo_gc_duration_seconds{quantile=\"1\"} 0.000391542\ngo_gc_duration_seconds_sum 0.001289635\ngo_gc_duration_seconds_count 4\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 15\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.20.2\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 6.983208e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.1783664e+07\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.451727e+06\n# HELP go_memstats_frees_total Total number of frees.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 62815\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 8.595544e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 6.983208e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 6.209536e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 9.91232e+06\n# HELP go_memstats_heap_objects Number of allocated objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 38478\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.58752e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 1.6121856e+07\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7001045398775318e+09\n# HELP go_memstats_lookups_total Total number of pointer lookups.\n# TYPE go_memstats_lookups_total counter\ngo_memstats_lookups_total 0\n# HELP go_memstats_mallocs_total Total number of mallocs.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 101293\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 4800\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15600\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 177280\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 179520\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 1.4275312e+07\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 895921\n# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 655360\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 655360\n# HELP go_memstats_sys_bytes Number of bytes obtained from system.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 2.7915528e+07\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.38\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.048576e+06\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 14\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 7.012352e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.7001045391e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.327280128e+09\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\nprocess_virtual_memory_max_bytes 1.8446744073709552e+19\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0" - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-120511756-run" - } - }, - "/api/ekuiper/ruletest": { - "post": { - "summary": "Create a Test Rule", - "x-apifox-folder": "Ekuiper/Test Rule", - "x-apifox-status": "released", - "deprecated": false, - "description": "Create a trial run rule, wait for it to run. This API can check syntax, ensuring the creation of an executable trial run rule.After the rule is created successfully, the websocket endpoint starts. Users can listen to the websocket address http://locahost:10081/test/uuid to get the result output. Among them, the port and id are the above return values.", - "tags": [ - "test rule" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": [ - "string", - "null" - ], - "description": "The id of the test rule, required, used for subsequent test rule management. Ensure uniqueness, it cannot be repeated with other test rules, otherwise the original test rule will be overwritten. This id has no association with the id of ordinary rules." - }, - "sql": { - "type": [ - "string", - "null" - ], - "description": "The sql statement of the test rule, required, used to define the syntax of the test rule." - }, - "mockSource": { - "type": [ - "object", - "null" - ], - "properties": { - "demo": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "a": { - "type": "integer" - }, - "b": { - "type": "integer" - } - }, - "x-apifox-orders": [ - "a", - "b" - ] - } - }, - "interval": { - "type": "integer" - }, - "loop": { - "type": "boolean" - } - }, - "required": [ - "data", - "interval", - "loop" - ], - "x-apifox-orders": [ - "data", - "interval", - "loop" - ] - }, - "demo1": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "n": { - "type": "integer" - } - }, - "required": [ - "n" - ], - "x-apifox-orders": [ - "n" - ] - } - }, - "interval": { - "type": "integer" - }, - "loop": { - "type": "boolean" - } - }, - "required": [ - "data", - "interval", - "loop" - ], - "x-apifox-orders": [ - "data", - "interval", - "loop" - ] - } - }, - "required": [ - "demo", - "demo1" - ], - "x-apifox-orders": [ - "demo", - "demo1" - ], - "description": "The mock rule definition of the data source of the test rule, optional, used to define the input data of the test rule. If not defined, the real data source in SQL will be used." - }, - "sinkProps": { - "type": [ - "object", - "null" - ], - "properties": { - "dataTemplate": { - "type": "string" - }, - "fields": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "dataTemplate", - "fields" - ], - "x-apifox-orders": [ - "dataTemplate", - "fields" - ], - "description": "The definition of the sink parameters of the test rule, optional. Most of the common parameters of the sink can be used, such as dataTemplate and fields. If not defined, the default sink parameters will be used." - } - }, - "required": [ - "id", - "sql", - "mockSource", - "sinkProps" - ], - "x-apifox-orders": [ - "id", - "sql", - "mockSource", - "sinkProps" - ] - }, - "example": { - "id": "uuid", - "sql": "select * from demo", - "mockSource": { - "demo": { - "data": [ - { - "a": 2 - }, - { - "b": 3 - } - ], - "interval": 100, - "loop": true - }, - "demo1": { - "data": [ - { - "n": 2 - }, - { - "n": 3 - } - ], - "interval": 200, - "loop": true - } - }, - "sinkProps": { - "dataTemplate": "xxx", - "fields": [ - "abc", - "test" - ] - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "port": { - "type": "integer" - } - }, - "required": [ - "id", - "port" - ], - "x-apifox-orders": [ - "id", - "port" - ] - }, - "examples": { - "1": { - "summary": "Success", - "value": { - "id": "uuid", - "port": 10081 - } - } - } - } - } - }, - "400": { - "description": "error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "msg": { - "type": "string" - } - }, - "required": [ - "msg" - ], - "x-apifox-orders": [ - "msg" - ] - }, - "examples": { - "1": { - "summary": "Exception", - "value": { - "msg": "error message here" - } - } - } - } - } - } - } - } - }, - "/api/ekuiper/ruletest/{id}/start": { - "post": { - "summary": "Start the Test Rule", - "x-apifox-folder": "Ekuiper/Test Rule", - "x-apifox-status": "released", - "deprecated": false, - "description": "Start the trial run rule, WebSocket will be able to receive the data output after the rule runs.", - "tags": [ - "test rule" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "Test rule uuid was started" - } - } - } - } - } - } - } - }, - "/api/ekuiper/ruletest/{id}": { - "delete": { - "summary": "Delete the Test Rule", - "x-apifox-folder": "Ekuiper/Test Rule", - "x-apifox-status": "released", - "deprecated": false, - "description": "Delete the trial run rule, WebSocket will stop the service.", - "tags": [ - "test rule" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object", - "properties": {} - }, - "examples": { - "1": { - "summary": "Success", - "value": "Test rule uuid was stopped" - } - } - } - } - } - }, - "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-133383197-run" - } - }, - "/api/ekuiper/udf/javascript": { - "post": { - "summary": "Create a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Besides defining function in plugins, user-defined functions (UDF) are also supported independently. Currently, we only support JavaScript UDF. We can use REST API or CLI to manage JavaScript functions. \n\nUse this endpoint to create a new function.", - "tags": [ - "udf" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": " A unique name for the function. This name must also be defined as a function in the script field." - }, - "description": { - "type": "string", - "description": "A brief description of the function." - }, - "script": { - "type": "string", - "description": "The function implementation in JavaScript." - }, - "isAgg": { - "type": "boolean", - "description": "A boolean indicating whether the function is an aggregate function." - } - }, - "required": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-orders": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-ignore-properties": [] - }, - "example": { - "id": "area", - "description": "calculate area", - "script": "function area(x, y) { return x * y; }", - "isAgg": false - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - } - } - } - } - }, - "get": { - "summary": "List UDFs", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Use this endpoint to display all JavaScript functions defined in the server.The response will be a list of function names. ", - "tags": [ - "udf" - ], - "parameters": [], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "examples": { - "1": { - "summary": "success", - "value": [ - "area" - ] - } - } - } - } - } - } - } - }, - "/api/ekuiper/udf/javascript/{id}": { - "get": { - "summary": "Describe a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Use this endpoint to get the detailed definition of a function.Replace {id} with the name of the function you want to describe. The response will be a JSON object with the function's details.", - "tags": [ - "udf" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "script": { - "type": "string" - }, - "isAgg": { - "type": "boolean" - } - }, - "required": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-orders": [ - "id", - "description", - "script", - "isAgg" - ], - "x-apifox-ignore-properties": [] - }, - "examples": { - "1": { - "summary": "success", - "value": { - "id": "area", - "description": "calculate area", - "script": "function area(x, y) { return x * y; }", - "isAgg": false - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "released", - "deprecated": false, - "description": "Use this endpoint to delete a function.Replace {id} with the name of the function you want to delete. Note that you need to manually stop or delete any rules using the UDF before deleting it. A running rule will not be affected by the deletion of a UDF.", - "tags": [ - "udf" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - } - } - } - } - }, - "put": { - "summary": "Update a UDF", - "x-apifox-folder": "Ekuiper/udf", - "x-apifox-status": "developing", - "deprecated": false, - "description": "The JavaScript UDF can be updated and hot reload. Notice that, a running rule must be restarted to load the updated function.Replace {id} with the name of the function you want to update. The request body should be the same as when creating a UDF. If the function of the id does not exist, it will be created. Otherwise, it will be updated.", - "tags": [ - "udf" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "x-apifox-orders": [] - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "neuron-error": { - "type": "object", - "properties": { - "error": { - "type": "integer" - } - }, - "required": [ - "error" - ], - "x-apifox-orders": [ - "error" - ], - "x-apifox-folder": "Data-schemas" - }, - "neuron-0": { - "type": "object", - "properties": { - "error": { - "type": "integer" - } - }, - "required": [ - "error" - ], - "x-apifox-orders": [ - "error" - ], - "x-apifox-folder": "Data-schemas" - }, - "neuron-token": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - }, - "required": [ - "token" - ], - "x-apifox-orders": [ - "token" - ], - "x-apifox-folder": "Data-schemas" - }, - "VersionResp": { - "type": "object", - "properties": { - "version": { - "type": "string" - } - }, - "required": [ - "version" - ], - "x-apifox-orders": [ - "version" - ], - "x-apifox-folder": "Data-schemas" - }, - "DeliverBody": { - "type": "object", - "required": [ - "template" - ], - "properties": { - "template": { - "type": "string", - "x-go-name": "Template" - } - }, - "x-apifox-orders": [ - "template" - ], - "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-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-folder": "Schemas" - }, - "LivenessReq": { - "type": "object", - "required": [ - "endpointUrl", - "serviceId", - "interval" - ], - "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": [ - "endpointUrl", - "serviceId", - "interval" - ], - "x-apifox-folder": "Schemas" - }, - "LoglevelRsqData": { - "type": "object", - "required": [ - "level" - ], - "properties": { - "level": { - "description": "log level ,could be debug、info、notice、warn、error、fatal", - "type": "string", - "x-go-name": "LoglevelStr" - } - } - }, - "LoglevelSettingReqData": { - "type": "object", - "required": [ - "level" - ], - "properties": { - "level": { - "description": "log level ,could be debug、info、notice、warn、error、fatal", - "type": "string", - "x-go-name": "LoglevelStr" - } - } - }, - "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:stop", - "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:stop", - "type": "string", - "x-go-name": "NeuronStatus" - }, - "os": { - "type": "string", - "x-go-name": "Os" - }, - "systemStatus": { - "description": " 0:normal 1:stop", - "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-folder": "Schemas" - }, - "responseData": { - "type": "object", - "required": [ - "token" - ], - "properties": { - "token": { - "type": "string", - "x-go-name": "Token" - } - }, - "x-apifox-orders": [ - "token" - ], - "x-apifox-folder": "Schemas" - }, - "responseLogData": { - "type": "object", - "required": [ - "level" - ], - "properties": { - "level": { - "type": "string", - "x-go-name": "level" - } - }, - "x-apifox-orders": [ - "level" - ], - "x-apifox-folder": "Schemas" - }, - "LoginBody": { - "type": "object", - "required": [ - "name", - "password" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "password": { - "type": "string", - "x-go-name": "Password" - } - }, - "x-apifox-orders": [ - "name", - "password" - ], - "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-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-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-folder": "Schemas" - }, - "SendActivationCodeReqData": { - "type": "object", - "required": [ - "activationCode" - ], - "properties": { - "activationCode": { - "type": "string", - "x-go-name": "ActivationCode" - } - }, - "x-apifox-orders": [ - "activationCode" - ], - "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-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-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-folder": "Schemas" - }, - "LivenessBody": { - "type": "object", - "required": [ - "endpointUrl", - "serviceId", - "interval" - ], - "properties": { - "endpointUrl": { - "type": "string", - "x-go-name": "EndpointUrl" - }, - "interval": { - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "serviceId": { - "type": "string", - "x-go-name": "ServiceID" - } - } - }, - "AlertConfig": { - "type": "object", - "required": [ - "enabled", - "webhookUrl", - "interval", - "fireChecks", - "resolveChecks", - "alertsConfig" - ], - "properties": { - "alertsConfig": { - "description": " optional, the setting of the rule alerts to be pushed,if it is empty, it means that requires all alert types.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AlertRuleConfig" - }, - "x-go-name": "AlertsConfig" - }, - "enabled": { - "description": " false: disabled, true: enabled ,If the value is false, the other fields are non-required", - "type": "boolean", - "x-go-name": "Enable" - }, - "fireChecks": { - "description": " required if alertsConfig is empty, the default fireChecks for all rules in alertsConfig", - "type": "integer", - "format": "int64", - "x-go-name": "FireChecks" - }, - "interval": { - "description": "\trequired if enabled is true", - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "resolveChecks": { - "description": " required if alertsConfig is empty, the default resolveChecks for all rules in alertsConfig", - "type": "integer", - "format": "int64", - "x-go-name": "ResolveChecks" - }, - "webhookUrl": { - "description": "\toptional,the webhook that alert events are pushed to", - "type": "string", - "x-go-name": "WebhookUrl" - } - } - }, - "AlertRuleConfig": { - "type": "object", - "required": [ - "ruleId", - "fireChecks", - "resolveChecks", - "ruleName" - ], - "properties": { - "fireChecks": { - "description": "how many consecutive monitoring times will trigger an alarm,means that N.", - "type": "integer", - "format": "int64", - "x-go-name": "FireChecks" - }, - "resolveChecks": { - "description": "how many times to monitor continuously, the alarm will be resumed,means that P.", - "type": "integer", - "format": "int64", - "x-go-name": "ResolveChecks" - }, - "ruleId": { - "type": "string", - "x-go-name": "RuleId" - }, - "ruleName": { - "type": "string", - "x-go-name": "RuleName" - } - } - }, - "MetricConfig": { - "type": "object", - "required": [ - "enabled", - "prometheusUrl", - "prometheusUsername", - "prometheusPassword", - "interval", - "metricIds", - "labels" - ], - "properties": { - "enabled": { - "description": "required,false: disabled, true: enabled ,If the value is false, the other fields are non-required", - "type": "boolean", - "x-go-name": "Enable" - }, - "interval": { - "description": " optional, the interval of generating metrics data,unit is second", - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "labels": { - "description": "optional, additional labels needed for metric, will be pushed to pushgateway along with the metrics data for grouping of metrics,key: label name,value: label value", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "Labels" - }, - "metricIds": { - "description": "optional, metric id array,a value of null means push all metric data.", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MetricIds" - }, - "prometheusPassword": { - "description": " optional, the url of password for pushgateway", - "type": "string", - "x-go-name": "PrometheusPassword" - }, - "prometheusUrl": { - "description": " optional, the url of pushgateway,like http://localhost:9091", - "type": "string", - "x-go-name": "PrometheusUrl" - }, - "prometheusUsername": { - "description": " optional, the url of username for pushgateway", - "type": "string", - "x-go-name": "PrometheusUsername" - } - } - }, - "PasswordChangeBody": { - "type": "object", - "required": [ - "name", - "old_password", - "new_password" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "new_password": { - "type": "string", - "x-go-name": "NewPassword" - }, - "old_password": { - "type": "string", - "x-go-name": "OldPassword" - } - } - }, - "NewUserRequestBody": { - "type": "object", - "required": [ - "name", - "password", - "role" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "password": { - "type": "string", - "x-go-name": "Password" - }, - "description": { - "type": "string", - "x-go-name": "UserDescription" - }, - "role": { - "type": "string", - "x-go-name": "Role" - } - } - }, - "UserRoleChangeBody": { - "type": "object", - "required": [ - "name", - "role" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Username" - }, - "description": { - "type": "string", - "x-go-name": "UserDescription" - }, - "role": { - "type": "string", - "x-go-name": "Role" - } - } - }, - "SSOConfigBody": { - "type": "object", - "required": [ - "name", - "url", - "clientId", - "clientSecret", - "type" - ], - "properties": { - "name": { - "type": "string", - "x-go-name": "Name" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "clientId": { - "type": "string", - "x-go-name": "ClientID" - }, - "clientSecret": { - "type": "string", - "x-go-name": "ClientSecret" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "enabled": { - "type": "boolean", - "default": false, - "x-go-name": "Enabled" - } - } - }, - "UpdateSSOConfigBody": { - "type": "object", - "required": [ - "url", - "clientId", - "clientSecret", - "type", - "enabled" - ], - "properties": { - "url": { - "type": "string", - "x-go-name": "URL" - }, - "clientId": { - "type": "string", - "x-go-name": "ClientID" - }, - "clientSecret": { - "type": "string", - "x-go-name": "ClientSecret" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - } - } - } - } - }, - "servers": [] -} -} \ No newline at end of file diff --git a/redocly/api-swagger.json b/redocly/api-swagger.json new file mode 100644 index 0000000..15607eb --- /dev/null +++ b/redocly/api-swagger.json @@ -0,0 +1,8318 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "NeuronEX-swagger-zh", + "description": "", + "version": "1.0.0" + }, + "tags": [ + { + "name": "NeuronEX" + }, + { + "name": "NeuronEX/license" + }, + { + "name": "NeuronEX/ekuiper_plugin" + }, + { + "name": "NeuronEX/tunnel" + }, + { + "name": "NeuronEX/server" + }, + { + "name": "NeuronEX/management" + }, + { + "name": "NeuronEX/liveness" + }, + { + "name": "NeuronEX/log" + }, + { + "name": "NeuronEX/template" + }, + { + "name": "NeuronEX/process_control" + }, + { + "name": "NeuronEX/status" + }, + { + "name": "NeuronEX/sse" + }, + { + "name": "NeuronEX/sso" + }, + { + "name": "NeuronEX/monitor" + }, + { + "name": "Neuron" + }, + { + "name": "Neuron/configuration" + } + ], + "paths": { + "/api/license": { + "get": { + "summary": "Get License Information", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "GetLicenseInfo", + "tags": [ + "NeuronEX/license" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "licenseType": "TRIAL", + "customerName": "EMQ Technologies Inc.", + "customerContact": "support@emqx.io", + "startDate": "2023-12-06 03:28:25", + "expiredDate": "2123-12-06 03:28:25", + "expired": false, + "totalTagCount": 30, + "usedTagCount": 0, + "enabledPlugins": [ + "ABB COMLI", + "Allen-Bradley ControlLogix 5500", + "Allen-Bradley DF1", + "Allen-Bradley MicroLogix 1400", + "BACnet/IP", + "Beckhoff ADS", + "DLT645-1997", + "DLT645-2007", + "EtherNet/IP(CIP)", + "GE SRTP", + "HJ212-2017", + "HOSTLINK CMODE", + "IEC60870-5-104", + "IEC61850", + "Inovance Modbus TCP", + "KNXnet/IP", + "KUKA ETHERNET KRL TCP", + "Mitsubishi 1E", + "Mitsubishi 3E", + "Mitsubishi FX", + "Modbus RTU", + "Modbus TCP", + "Modbus TCP QH", + "NON A11", + "OPC UA", + "Omron FINS TCP", + "Omron FINS UDP", + "Panasonic Mewtocol", + "Profinet IO", + "SECS GEM HSMS", + "Siemens FetchWrite", + "Siemens RK512", + "Siemens S7 ISOTCP", + "Siemens S7 ISOTCP for 300/400", + "SparkPlugB", + "WebSocket" + ], + "hardwareToken": "FdVCScD63F5gGcB0eO5OuwQsxg5jJoa+YOxyOub9c5g=", + "ekuiperOn": true, + "officialEmail": "support@emqx.io" + } + } + } + } + } + }, + "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/5225015/apis/api-219076715-run" + }, + "post": { + "summary": "Upload License", + "x-apifox-folder": "NeuronEX/license", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "UploadLicense", + "tags": [ + "NeuronEX/license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "license": "CAIaFUVNUSBUZWNobm9s..." + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "type": "TRIAL", + "customerName": "EMQ Technologies Inc.", + "customerContact": "support@emqx.io", + "startDate": "2023-12-06", + "expiredDate": "2123-12-06", + "expired": false, + "totalTagCount": 1000, + "usedTagCount": 1, + "enabledPlugins": [ + "ABB COMLI", + "Allen-Bradley ControlLogix 5500", + "Allen-Bradley DF1", + "Allen-Bradley MicroLogix 1400", + "BACnet/IP", + "Beckhoff ADS", + "DLT645-1997", + "DLT645-2007", + "EtherNet/IP(CIP)", + "GE SRTP", + "HJ212-2017", + "HOSTLINK CMODE", + "IEC60870-5-104", + "IEC61850", + "Inovance Modbus TCP", + "KNXnet/IP", + "KUKA ETHERNET KRL TCP", + "Mitsubishi 1E", + "Mitsubishi 3E", + "Mitsubishi FX", + "Modbus RTU", + "Modbus TCP", + "Modbus TCP QH", + "NON A11", + "OPC UA", + "Omron FINS TCP", + "Omron FINS UDP", + "Panasonic Mewtocol", + "Profinet IO", + "SECS GEM HSMS", + "Siemens FetchWrite", + "Siemens RK512", + "Siemens S7 ISOTCP", + "Siemens S7 ISOTCP for 300/400", + "SparkPlugB", + "WebSocket" + ], + "hardwareToken": "", + "ekuiperOn": true, + "officialEmail": "support@emqx.io" + } + } + } + } + } + }, + "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/5225015/apis/api-219076716-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": [ + "NeuronEX/license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "activationCode": "6YnJBVBOcL2pBQgwnPdtdtW..." + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + }, + "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/5225015/apis/api-219076717-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": [ + "NeuronEX/license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "license": "CAIaFUVNUSBUZWNobm9s..." + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + }, + "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/5225015/apis/api-219076718-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": [ + "NeuronEX/license" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + }, + "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/5225015/apis/api-219076719-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": [ + "NeuronEX/license" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "license": "CAIaFUVNUSBUZWNobm9s..." + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + } + } + } + }, + "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/5225015/apis/api-219076720-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": [ + "NeuronEX/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/5225015/apis/api-219076721-run" + } + }, + "/api/plugin/portable": { + "post": { + "summary": "Create ekuiper plugin ", + "x-apifox-folder": "NeuronEX/ekuiper_plugin", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "NeuronEX/ekuiper_plugin" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "operationId": { + "type": "integer" + } + }, + "required": [ + "address", + "name", + "operationId" + ], + "x-apifox-orders": [ + "address", + "name", + "operationId" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "address": "http://127.0.0.1:9081", + "name": "123456", + "operationId": 10 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "" + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076722-run" + } + }, + "/api/ek_service": { + "post": { + "summary": "Create external service", + "x-apifox-folder": "NeuronEX/ekuiper_plugin", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "NeuronEX/ekuiper_plugin" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "headers": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "name", + "address", + "headers" + ], + "x-apifox-orders": [ + "name", + "address", + "headers" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "test", + "address": "http://127.0.0.1:9081", + "headers": {} + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "" + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076723-run" + } + }, + "/api/ek_service/%24{serviceName}": { + "delete": { + "summary": "Delete external service ", + "x-apifox-folder": "NeuronEX/ekuiper_plugin", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "NeuronEX/ekuiper_plugin" + ], + "parameters": [ + { + "name": "serviceName", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "" + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076724-run" + } + }, + "/api/tunnel": { + "get": { + "summary": "Get ECP Tunnel Config info", + "x-apifox-folder": "NeuronEX/tunnel", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "NeuronEX/tunnel" + ], + "parameters": [], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "enableSSL": { + "type": "boolean" + }, + "registerId": { + "type": "string" + } + }, + "required": [ + "enable", + "enableSSL", + "registerId" + ], + "x-apifox-orders": [ + "enable", + "enableSSL", + "registerId" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "enable": false, + "enableSSL": false, + "registerId": "dc3e97118e33-1115b9328bfb58948407" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076725-run" + }, + "post": { + "summary": "ECP Tunnel configuration", + "x-apifox-folder": "NeuronEX/tunnel", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "NeuronEX/tunnel" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "enableSSL": { + "type": "boolean" + }, + "address": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "description": { + "type": "string" + }, + "certificationRaw": { + "type": "string" + }, + "privateKeyRaw": { + "type": "string" + }, + "rootCARaw": { + "type": "string" + }, + "registerId": { + "type": "string" + } + }, + "required": [ + "enable", + "enableSSL", + "address", + "username", + "password", + "description", + "certificationRaw", + "privateKeyRaw", + "rootCARaw", + "registerId" + ], + "x-apifox-orders": [ + "enable", + "enableSSL", + "address", + "username", + "password", + "description", + "certificationRaw", + "privateKeyRaw", + "rootCARaw", + "registerId" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "enable": false, + "enableSSL": false, + "address": "tcp://127.0.0.1:1883", + "username": "admin", + "password": "password", + "description": "test", + "certificationRaw": "cert_base64", + "privateKeyRaw": "key_base64", + "rootCARaw": "ca_base64", + "registerId": "1234567890" + } + } + } + }, + "responses": { + "200": { + "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/5225015/apis/api-219076726-run" + } + }, + "/api/login": { + "post": { + "summary": "Login", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "loginHandler", + "tags": [ + "NeuronEX/server" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "name": "admin", + "password": "0000" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "token": "eyJhbGciOiJ....", + "role": "Administrator" + } + } + } + } + } + }, + "401": { + "description": "Username or Password incorrect!", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076727-run" + } + }, + "/api/users/password/{name}": { + "put": { + "summary": "Change password", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "passwordChangeHandler", + "tags": [ + "NeuronEX/server" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "username to be deleted", + "required": true, + "example": "test", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "name": "test", + "old_password": "0000", + "new_password": "1111" + } + } + } + }, + "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/5225015/apis/api-219076728-run" + } + }, + "/api/users": { + "post": { + "summary": "Creat New User", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "newUserHandler", + "tags": [ + "NeuronEX/server" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "name": "test", + "password": "test", + "role": "Viewer", + "description": "create new user test and set him to viewer" + } + } + } + }, + "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/5225015/apis/api-219076729-run" + } + }, + "/api/users/role/{name}": { + "put": { + "summary": "Change role", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "roleChangeHandler", + "tags": [ + "NeuronEX/server" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "username to be deleted", + "required": true, + "example": "test", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "name": "test", + "role": "Viewer", + "description": "change user test's role to viewer" + } + } + } + }, + "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/5225015/apis/api-219076730-run" + } + }, + "/api/users/{name}": { + "delete": { + "summary": "Delete User", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "deleteUserHandler", + "tags": [ + "NeuronEX/server" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "username to be deleted", + "required": true, + "example": "test", + "schema": { + "type": "string" + } + } + ], + "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/5225015/apis/api-219076731-run" + } + }, + "/api/system": { + "get": { + "summary": "Get system information", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "querySystemInfo", + "tags": [ + "NeuronEX/server" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "version": "3.1.0-beta.3", + "systemStatus": "0", + "neuronRunningTime": "6332", + "neuronStatus": "0", + "neuronMemoryUsed": "8364032", + "neuronMemoryTotal": "4125425664", + "ekuiperRunningTime": "6332", + "ekuiperStatus": "0", + "ekuiperMemoryUsed": "84316160", + "ekuiperMemoryTotal": "4125425664", + "submoduleStatus": { + "alert": false, + "monitor": false, + "syslog": false + }, + "hwToken": "m/djk5abRRToVTyBBCXkUVyMumgbYmo2PdwdjnVeqn8=", + "os": "Debian GNU/Linux 11", + "kernel": "5.10.124-linuxkit", + "arch": "x86_64", + "clib": "glibc-2.31" + } + } + } + } + } + }, + "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/5225015/apis/api-219076732-run" + } + }, + "/api/version": { + "get": { + "summary": "Gett NeuronEX version information", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "queryVersion", + "tags": [ + "NeuronEX/server" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "version": "3.1.0-beta.3" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076733-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": [ + "NeuronEX/server" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "enabled": false, + "network": "udp4", + "addr": "", + "priority": 6, + "tag": "neuronex" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076734-run" + }, + "post": { + "summary": "Update NeuronEX Log Remote Forwarding Configuration", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "syslogWebHook", + "tags": [ + "NeuronEX/server" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "enabled": true, + "addr": "localhost:10514", + "priority": 6, + "tag": "neuronex" + } + } + } + }, + "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/5225015/apis/api-219076735-run" + } + }, + "/api/sso/{serverName}": { + "put": { + "summary": "Update an SSO configuration", + "x-apifox-folder": "NeuronEX/server", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "UpdateSSOConfig", + "tags": [ + "NeuronEX/server" + ], + "parameters": [ + { + "name": "serverName", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "name": "sso1", + "url": "https://iamnew.ctwing.cn", + "clientId": "VDx2v0usxxx", + "clientSecret": "1uu9c5xxxx", + "type": "oauth2", + "enabled": true + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "400": { + "description": "@ErrorInfo(1002,\"Request body invalid\")\n@ErrorInfo(19001,\"Update ssoConfiguration failed\")\n@ErrorInfo(19002,\"Configuration name not found in the query\")\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076736-run" + }, + "get": { + "summary": "Get an SSO configuration", + "x-apifox-folder": "NeuronEX/sso", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "QuerySSOConfig", + "tags": [ + "NeuronEX/sso" + ], + "parameters": [ + { + "name": "serverName", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "name": "sso1", + "url": "https://iamnew.ctwing.cn", + "clientId": "VDx2v0usxxx", + "clientSecret": "1uu9c5xxxx", + "type": "oauth2", + "enabled": false + } + } + } + } + } + }, + "400": { + "description": "@ErrorInfo(19002,\"Configuration name not found in the query\")\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076760-run" + }, + "delete": { + "summary": "Delete an SSO configuration", + "x-apifox-folder": "NeuronEX/sso", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DeleteSSOConfig", + "tags": [ + "NeuronEX/sso" + ], + "parameters": [ + { + "name": "serverName", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "400": { + "description": "@ErrorInfo(19003,\"Delete ssoConfiguration failed\")\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076761-run" + } + }, + "/api/management/cancel": { + "post": { + "summary": "Cancel being Managed by ECP", + "x-apifox-folder": "NeuronEX/management", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "CancelManagement", + "tags": [ + "NeuronEX/management" + ], + "parameters": [], + "responses": { + "200": { + "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/5225015/apis/api-219076737-run" + } + }, + "/api/liveness/report": { + "get": { + "summary": "Query liveness info", + "x-apifox-folder": "NeuronEX/liveness", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "GetLivenessConfig", + "tags": [ + "NeuronEX/liveness" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "endpointUrl": "", + "serviceId": "", + "interval": 0 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076738-run" + }, + "post": { + "summary": "Liveness configuration", + "x-apifox-folder": "NeuronEX/liveness", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "livenessConfigHandler", + "tags": [ + "NeuronEX/liveness" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "endpointUrl": "127.0.0.1:1456", + "serviceId": "123456", + "interval": 10 + } + } + } + }, + "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/5225015/apis/api-219076739-run" + } + }, + "/api/log": { + "get": { + "summary": "Get NeuronEX log level configuration", + "x-apifox-folder": "NeuronEX/log", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "LoglevelGetting", + "tags": [ + "NeuronEX/log" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "level": "info" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076740-run" + }, + "post": { + "summary": "Set NeuronEX log level configuration", + "x-apifox-folder": "NeuronEX/log", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "LoglevelSetting", + "tags": [ + "NeuronEX/log" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "level": "info" + } + } + } + }, + "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/5225015/apis/api-219076741-run" + } + }, + "/api/log/ekuiper": { + "get": { + "summary": "Download data processing engine log", + "x-apifox-folder": "NeuronEX/log", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DownloadEkuiperLog", + "tags": [ + "NeuronEX/log" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "log ..." + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076742-run" + } + }, + "/api/log/neuron": { + "get": { + "summary": "Download data collection engine log", + "x-apifox-folder": "NeuronEX/log", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DownloadNeuronLog", + "tags": [ + "NeuronEX/log" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "log ..." + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076743-run" + } + }, + "/api/log/neuron/{nodeName}": { + "get": { + "summary": "Download the log of data collection engine driver node", + "x-apifox-folder": "NeuronEX/log", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DownloadNeuronLogByNodeName", + "tags": [ + "NeuronEX/log" + ], + "parameters": [ + { + "name": "nodeName", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "log ..." + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076744-run" + } + }, + "/api/log/neuronex": { + "get": { + "summary": "Download NeuronEX log", + "x-apifox-folder": "NeuronEX/log", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DownloadNeuronexLog", + "tags": [ + "NeuronEX/log" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "log ..." + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076745-run" + } + }, + "/api/template": { + "get": { + "summary": "Export Global Configuration Template", + "x-apifox-folder": "NeuronEX/template", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "Export", + "tags": [ + "NeuronEX/template" + ], + "parameters": [ + { + "name": "category", + "in": "query", + "description": "Category 1: ekuiper, 2: neuron", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "nodes", + "in": "query", + "description": "List of nodes to be queried", + "required": false, + "example": "south1,south3", + "schema": { + "type": "string" + } + }, + { + "name": "rules", + "in": "query", + "description": "List of rules to be queried", + "required": false, + "example": "rule1,rule2", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "query neuron template sueccess", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "streams": { + "type": "object", + "properties": { + "neuronStream": { + "type": "string" + } + }, + "required": [ + "neuronStream" + ], + "x-apifox-orders": [ + "neuronStream" + ], + "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": "ekuiper success", + "value": { + "streams": { + "neuronStream": "CREATE STREAM neuronStream() WITH (TYPE=\"neuron\",FORMAT=\"json\",CONF_KEY=\"default\",SHARED=\"TRUE\");" + }, + "tables": {}, + "rules": {}, + "nativePlugins": {}, + "portablePlugins": {}, + "sourceConfig": {}, + "sinkConfig": {}, + "connectionConfig": {}, + "Service": {}, + "Schema": {}, + "uploads": {} + } + } + } + } + } + }, + "x-200:query ekuiper template sueccess": { + "description": "query ekuiper template sueccess", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "plugin": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "x-apifox-orders": [ + "plugin", + "name" + ], + "x-apifox-ignore-properties": [] + } + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "subscriptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "settings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "node": { + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "x-apifox-orders": [ + "host", + "port" + ], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "node", + "params" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "nodes", + "groups", + "tags", + "subscriptions", + "settings" + ], + "x-apifox-orders": [ + "nodes", + "groups", + "tags", + "subscriptions", + "settings" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "query ekuiper template sueccess", + "value": { + "nodes": [ + { + "plugin": "eKuiper", + "name": "Processing" + } + ], + "groups": [], + "tags": [], + "subscriptions": [], + "settings": [ + { + "node": "Processing", + "params": { + "host": "127.0.0.1", + "port": 7081 + } + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076746-run" + }, + "post": { + "summary": "Deliver Global Configuration Template", + "x-apifox-folder": "NeuronEX/template", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "Deliver", + "tags": [ + "NeuronEX/template" + ], + "parameters": [ + { + "name": "category", + "in": "query", + "description": "Category 1: ekuiper, 2: neuron ", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "type": "string", + "description": "optional, Node data to be deliver if category is 1, or rule data to be deliver if category is 2 " + }, + "ruleData": { + "type": "string", + "description": "optional, Rule data to be deliver " + }, + "NodeData": { + "type": "string", + "description": "optional, Node data to be deliver " + }, + "operationId": { + "type": "integer", + "description": "optional,if operationId > 0, The operation will be logged and pushed" + } + }, + "x-apifox-orders": [ + "template", + "ruleData", + "NodeData", + "operationId" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "template": "{\n \"streams\": {\n \"neuronStream\": \"CREATE STREAM neuronStream() WITH (TYPE=\\\"neuron\\\",FORMAT=\\\"json\\\",CONF_KEY=\\\"default\\\",SHARED=\\\"TRUE\\\");\"\n },\n \"tables\": {},\n \"rules\": {},\n \"nativePlugins\": {},\n \"portablePlugins\": {},\n \"sourceConfig\": {},\n \"sinkConfig\": {},\n \"connectionConfig\": {},\n \"Service\": {},\n \"Schema\": {},\n \"uploads\": {}\n}" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "400": { + "description": "Deliver failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "failed reason message" + } + }, + "required": [ + "message" + ], + "x-apifox-orders": [ + "message" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Json format err", + "value": { + "message": "Json format err" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076747-run" + } + }, + "/api/process/ekuiper/start": { + "get": { + "summary": "Start ekuiper process", + "x-apifox-folder": "NeuronEX/process_control", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "StartKuiper", + "tags": [ + "NeuronEX/process_control" + ], + "parameters": [], + "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/5225015/apis/api-219076748-run" + } + }, + "/api/process/ekuiper/stop": { + "get": { + "summary": "Stop ekuiper process", + "x-apifox-folder": "NeuronEX/process_control", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "StopKuiper", + "tags": [ + "NeuronEX/process_control" + ], + "parameters": [], + "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/5225015/apis/api-219076749-run" + } + }, + "/api/process/neuron/start": { + "get": { + "summary": "Start neuron process", + "x-apifox-folder": "NeuronEX/process_control", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "StartNeuron", + "tags": [ + "NeuronEX/process_control" + ], + "parameters": [], + "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/5225015/apis/api-219076750-run" + } + }, + "/api/process/neuron/stop": { + "get": { + "summary": "Stop neuron process", + "x-apifox-folder": "NeuronEX/process_control", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "StopNeuron", + "tags": [ + "NeuronEX/process_control" + ], + "parameters": [], + "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/5225015/apis/api-219076751-run" + } + }, + "/api/process/status": { + "get": { + "summary": "The status of Ekuiper and Neuron process", + "x-apifox-folder": "NeuronEX/process_control", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "KuiperNeuronStatus", + "tags": [ + "NeuronEX/process_control" + ], + "parameters": [], + "responses": { + "200": { + "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/5225015/apis/api-219076752-run" + } + }, + "/api/status/liveness": { + "get": { + "summary": "Get NeuronEX liveness status", + "x-apifox-folder": "NeuronEX/status", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "LiveStatusGetting", + "tags": [ + "NeuronEX/status" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "liveness": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "liveness" + ], + "x-apifox-orders": [ + "liveness" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "liveness": { + "in": 853, + "out": 0 + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076753-run" + } + }, + "/api/status/log": { + "get": { + "summary": "Get NeuronEX syslog status", + "x-apifox-folder": "NeuronEX/status", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "SyslogStatusGetting", + "tags": [ + "NeuronEX/status" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "server": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + }, + "outSend": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + }, + "sse": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + }, + "neuron": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + }, + "neuronex": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + }, + "ekuiper": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + }, + "others": { + "type": "object", + "properties": { + "in": { + "type": "integer" + }, + "out": { + "type": "integer" + } + }, + "required": [ + "in", + "out" + ], + "x-apifox-orders": [ + "in", + "out" + ], + "x-apifox-ignore-properties": [] + }, + "clientNumber": { + "type": "integer" + } + }, + "required": [ + "in", + "out", + "neuron", + "neuronex", + "ekuiper", + "others", + "clientNumber" + ], + "x-apifox-orders": [ + "in", + "out", + "neuron", + "neuronex", + "ekuiper", + "others", + "clientNumber" + ], + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "server", + "outSend", + "sse" + ], + "x-apifox-orders": [ + "server", + "outSend", + "sse" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "server": { + "in": 75668145, + "out": 75668144 + }, + "outSend": { + "in": 75668145, + "out": 2513 + }, + "sse": { + "in": 75668145, + "out": 75668144, + "neuron": { + "in": 464, + "out": 464 + }, + "neuronex": { + "in": 75665075, + "out": 75665074 + }, + "ekuiper": { + "in": 93, + "out": 93 + }, + "others": { + "in": 2513, + "out": 2513 + }, + "clientNumber": 0 + } + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076754-run" + } + }, + "/api/status/ecp_tunnel": { + "get": { + "summary": "Get ecp tunnel status", + "x-apifox-folder": "NeuronEX/status", + "x-apifox-status": "released", + "deprecated": false, + "description": "Get ecp tunnel status", + "tags": [ + "NeuronEX/status" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "tunnel status,value can be init,idle,subscribe serviceId,subscribe revoke serviceId,activating,subscribe configuration,revoke serviceId,ECP config modified." + } + }, + "required": [ + "status" + ], + "x-apifox-orders": [ + "status" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "status": "init" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076755-run" + } + }, + "/api/stream/log": { + "get": { + "summary": "Get NeuronEX streaming log", + "x-apifox-folder": "NeuronEX/sse", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "StreamingLog", + "tags": [ + "NeuronEX/sse" + ], + "parameters": [ + { + "name": "type", + "in": "query", + "description": "", + "required": false, + "example": "0", + "schema": { + "type": "string" + } + }, + { + "name": "priority", + "in": "query", + "description": "", + "required": false, + "example": "10", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "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/5225015/apis/api-219076756-run" + } + }, + "/api/stream/clients": { + "get": { + "summary": "Get stream client status", + "x-apifox-folder": "NeuronEX/sse", + "x-apifox-status": "released", + "deprecated": false, + "description": "Get stream client status", + "tags": [ + "NeuronEX/sse" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientAddress": { + "type": "string" + } + }, + "x-apifox-orders": [ + "clientAddress" + ], + "x-apifox-ignore-properties": [] + } + }, + "examples": { + "1": { + "summary": "Success", + "value": [ + { + "clientAddress": "127.0.0.1:9081" + } + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076757-run" + } + }, + "/api/sso": { + "get": { + "summary": "Get all SSO configurations", + "x-apifox-folder": "NeuronEX/sso", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "QuerySSOConfigs", + "tags": [ + "NeuronEX/sso" + ], + "parameters": [ + { + "name": "enabled", + "in": "query", + "description": "Optional, query configurations by 'enabled' field", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "type": { + "type": "string" + }, + "enabled": { + "type": "boolean", + "default": false + } + }, + "required": [ + "name", + "url", + "clientId", + "clientSecret", + "type", + "enabled" + ], + "x-apifox-orders": [ + "name", + "url", + "clientId", + "clientSecret", + "type", + "enabled" + ], + "x-apifox-ignore-properties": [] + } + }, + "examples": { + "1": { + "summary": "Success", + "value": [ + { + "name": "sso1", + "url": "https://iamnew.ctwing.cn", + "clientId": "8I744Myxxxx", + "clientSecret": "5jMnFyxxxx", + "type": "oauth2", + "enabled": true + }, + { + "name": "sso2", + "url": "https://iamnew.ctwing.cn", + "clientId": "VDx2v0uxxxx", + "clientSecret": "1uu9c5xxxx", + "type": "oauth2", + "enabled": false + } + ] + } + } + } + } + }, + "400": { + "description": "@ErrorInfo(1003,\"Request param invalid\")\n@ErrorInfo(19002,\"Configuration name not found in the query\")\n)", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076758-run" + }, + "post": { + "summary": "Add a new SSO configuration", + "x-apifox-folder": "NeuronEX/sso", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "SSOConfigHandler", + "tags": [ + "NeuronEX/sso" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "example": { + "name": "sso1", + "url": "https://iamnew.ctwing.cn", + "clientId": "VDx2v0usxxx", + "clientSecret": "1uu9c5xxxx", + "type": "oauth2", + "enabled": false + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + }, + "400": { + "description": "@ErrorInfo(1002,\"Request body invalid\")\n@ErrorInfo(19000,\"Add ssoConfiguration failed\")\n@ErrorInfo(19004,\"Configuration already exists\")\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076759-run" + } + }, + "/sso/{serverName}/oauth2": { + "get": { + "summary": "SSO Handling", + "x-apifox-folder": "NeuronEX/sso", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "OAuth2Handler", + "tags": [ + "NeuronEX/sso" + ], + "parameters": [ + { + "name": "serverName", + "in": "path", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "code", + "in": "query", + "description": "", + "required": true, + "example": "5068471130381875", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzcyODcxNjMsImlhdCI6MTYzNzIwMDc2MywiaXNzIjoiRU1RIFRlY2hub2xvZ2llcyBDby4sIEx0ZCBBbGwgcmlnaHRzIHJlc2VydmVkLiIsInBhc3MiOiIwMDAwIiwidXNlciI6ImFkbWluIn0.2EZzPC9djErrCeYNrK2av0smh-eKxDYeyu7cW4MyknI" + } + } + } + } + } + }, + "400": { + "description": "@ErrorInfo(19002,\"Configuration name not found in the query\")\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076762-run" + } + }, + "/api/monitor/alert": { + "get": { + "summary": "Alert types currently supported by NeuronEX", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "AlertRuleConfig", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ruleId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + }, + "required": [ + "ruleId", + "name", + "desc" + ], + "x-apifox-orders": [ + "ruleId", + "name", + "desc" + ], + "x-apifox-ignore-properties": [] + } + }, + "examples": { + "1": { + "summary": "Success", + "value": [ + { + "ruleId": "1", + "name": "node_exception_alert", + "desc": "Data collection node exception alert" + }, + { + "ruleId": "2", + "name": "rule_exception_alert", + "desc": "Data processing rule exception alert" + }, + { + "ruleId": "3", + "name": "restart_alert", + "desc": "neuronex restart alert" + } + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076763-run" + } + }, + "/api/monitor/alert_config": { + "get": { + "summary": "Query the current alert rule-related settings", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "QueryAlertRuleConfig", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "webhookUrl": { + "type": "string" + }, + "interval": { + "type": "integer" + }, + "fireChecks": { + "type": "integer" + }, + "resolveChecks": { + "type": "integer" + }, + "alertsConfig": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "webhookUrl", + "interval", + "fireChecks", + "resolveChecks", + "alertsConfig" + ], + "x-apifox-orders": [ + "enabled", + "webhookUrl", + "interval", + "fireChecks", + "resolveChecks", + "alertsConfig" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "enabled": true, + "webhookUrl": "https://www.baidu.com", + "interval": 15, + "fireChecks": 0, + "resolveChecks": 0, + "alertsConfig": [ + { + "ruleId": "3", + "fireChecks": 1, + "resolveChecks": -1, + "ruleName": "restart_alert" + }, + { + "ruleId": "1", + "fireChecks": 3, + "resolveChecks": 3, + "ruleName": "node_exception_alert" + }, + { + "ruleId": "2", + "fireChecks": 1, + "resolveChecks": 1, + "ruleName": "rule_exception_alert" + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076764-run" + }, + "post": { + "summary": "Configure Alert rule-related settings.", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DistributeAlertRuleConfig", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "false: disabled, true: enabled ,If the value is false, the other fields are non-required" + }, + "webhookUrl": { + "type": "string", + "description": "required if enabled is true,the webhook that alert events are pushed to" + }, + "interval": { + "type": "integer", + "description": "required if enabled is true" + }, + "fireChecks": { + "type": "integer", + "description": "required if alertsConfig is empty, the default fireChecks for all rules in alertsConfig" + }, + "resolveChecks": { + "type": "integer", + "description": "required if alertsConfig is empty, the default resolveChecks for all rules in alertsConfig" + }, + "alertsConfig": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ruleId": { + "type": "string" + }, + "fireChecks": { + "type": "integer", + "description": "how many consecutive monitoring times will trigger an alarm,means that N.Value must be greater than 0 unless ruleId=3, value can be -1" + }, + "resolveChecks": { + "type": "integer", + "description": "how many times to monitor continuously, the alarm will be resumed,means that P.Value must be greater than 0 unless ruleId=3, value can be -1" + } + }, + "x-apifox-orders": [ + "ruleId", + "fireChecks", + "resolveChecks" + ], + "x-apifox-ignore-properties": [] + }, + "description": "optional, the setting of the rule alerts to be pushed,if it is empty, it means that requires all alert types." + } + }, + "required": [ + "enabled", + "webhookUrl", + "interval" + ], + "x-apifox-orders": [ + "enabled", + "webhookUrl", + "interval", + "fireChecks", + "resolveChecks", + "alertsConfig" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "enabled": true, + "webhookUrl": "https://www.baidu.com", + "interval": 15, + "fireChecks": 0, + "resolveChecks": 0, + "alertsConfig": [ + { + "ruleId": "3", + "fireChecks": 1, + "resolveChecks": -1 + }, + { + "ruleId": "1", + "fireChecks": 3, + "resolveChecks": 3 + }, + { + "ruleId": "2", + "fireChecks": 1, + "resolveChecks": 1 + } + ] + } + } + } + }, + "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/5225015/apis/api-219076765-run" + } + }, + "/api/monitor/alert_result": { + "get": { + "summary": "Query recently generated alert events", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "QueryAlertResult", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "firing": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ruleId": { + "type": "string" + }, + "labels:": { + "type": "object", + "properties": { + "driver": { + "type": "string" + } + }, + "required": [ + "driver" + ], + "x-apifox-orders": [ + "driver" + ], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "ruleId", + "labels:" + ], + "x-apifox-ignore-properties": [] + }, + "description": "alert fire event array" + }, + "resolved": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ruleId": { + "type": "string" + }, + "labels:": { + "type": "object", + "properties": { + "rule": { + "type": "string" + } + }, + "required": [ + "rule" + ], + "x-apifox-orders": [ + "rule" + ], + "x-apifox-ignore-properties": [] + } + }, + "x-apifox-orders": [ + "ruleId", + "labels:" + ], + "x-apifox-ignore-properties": [] + }, + "description": "alert resolved event array" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "firing", + "resolved", + "timestamp" + ], + "x-apifox-orders": [ + "firing", + "resolved", + "timestamp" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "firing": [ + { + "ruleId": "xxx", + "labels:": { + "driver": "xxx" + } + } + ], + "resolved": [ + { + "ruleId": "xxx", + "labels:": { + "rule": "xxx" + } + } + ], + "timestamp": "2024-01-01T09:52:26.739266876+08:00" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076766-run" + } + }, + "/api/monitor/metric": { + "get": { + "summary": "Metrics currently supported by NeuronEX", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "MetricConfig", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "metricId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + }, + "required": [ + "metricId", + "name", + "desc" + ], + "x-apifox-orders": [ + "metricId", + "name", + "desc" + ], + "x-apifox-ignore-properties": [] + } + }, + "examples": { + "1": { + "summary": "Success", + "value": [ + { + "metricId": "1", + "name": "os_info", + "desc": "OS distro and kernel version" + }, + { + "metricId": "2", + "name": "cpu_percent", + "desc": "Total CPU utilisation percentage" + }, + { + "metricId": "3", + "name": "cpu_cores", + "desc": "Number of CPU cores" + }, + { + "metricId": "4", + "name": "mem_total_bytes", + "desc": "Total installed memory in bytes" + } + ] + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076767-run" + } + }, + "/api/monitor/metric_config": { + "get": { + "summary": "Query the current metric-related settings", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "QueryMetricConfig", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "prometheusUrl": { + "type": "string" + }, + "interval": { + "type": "integer" + }, + "labels": { + "type": "object", + "properties": { + "instance": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "project_id": { + "type": "string" + }, + "service_id": { + "type": "string" + } + }, + "required": [ + "instance", + "org_id", + "project_id", + "service_id" + ], + "x-apifox-orders": [ + "instance", + "org_id", + "project_id", + "service_id" + ], + "x-apifox-ignore-properties": [] + }, + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "metricId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + }, + "required": [ + "metricId", + "name", + "desc" + ], + "x-apifox-orders": [ + "metricId", + "name", + "desc" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "enabled", + "prometheusUrl", + "interval", + "labels", + "metrics" + ], + "x-apifox-orders": [ + "enabled", + "prometheusUrl", + "interval", + "labels", + "metrics" + ], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": { + "enabled": true, + "prometheusUrl": "http://127.0.0.1:9091", + "interval": 15, + "labels": { + "instance": "127.0.0.1:8111", + "org_id": "76995af8", + "project_id": "c1c69f9d", + "service_id": "55f20f8b" + }, + "metrics": [ + { + "metricId": "13", + "name": "north_nodes_total", + "desc": "Number of north nodes" + }, + { + "metricId": "14", + "name": "north_running_nodes_total", + "desc": "Number of north nodes in running state" + }, + { + "metricId": "15", + "name": "north_disconnected_nodes_total", + "desc": "Number of north nodes disconnected" + }, + { + "metricId": "16", + "name": "south_nodes_total", + "desc": "Number of south nodes" + }, + { + "metricId": "17", + "name": "south_running_nodes_total", + "desc": "Number of south nodes in running state" + }, + { + "metricId": "20", + "name": "license_max_tags", + "desc": "License tags limit" + }, + { + "metricId": "21", + "name": "license_used_tags", + "desc": "License total used tags" + }, + { + "metricId": "1031", + "name": "kuiper_op_records_in_total", + "desc": "Total number of messages received by the operation of kuiper_op" + }, + { + "metricId": "1032", + "name": "kuiper_op_records_out_total", + "desc": "Total number of messages published by the operation of kuiper_op" + }, + { + "metricId": "2000", + "name": "running_nodes_total", + "desc": "Number of nodes in running state" + }, + { + "metricId": "2001", + "name": "exception_nodes_total", + "desc": "Number of nodes in running state" + }, + { + "metricId": "2002", + "name": "south_connected_nodes_total", + "desc": "Number of south nodes connected" + }, + { + "metricId": "2003", + "name": "south_exception_nodes_total", + "desc": "Number of south in exception state" + }, + { + "metricId": "2004", + "name": "north_connected_nodes_total", + "desc": "Number of north nodes connected" + }, + { + "metricId": "2005", + "name": "north_exception_nodes_total", + "desc": "Number of north in exception state" + }, + { + "metricId": "2006", + "name": "running_rules_total", + "desc": "Number of rules in running state" + }, + { + "metricId": "2007", + "name": "stopped_rules_total", + "desc": "Number of rules in stopped state" + }, + { + "metricId": "2008", + "name": "not_running_node", + "desc": "Node not in running state" + }, + { + "metricId": "2009", + "name": "exception_node", + "desc": "Node in exception state" + }, + { + "metricId": "3000", + "name": "not_running_rule", + "desc": "Rule not in running state" + } + ] + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076768-run" + }, + "post": { + "summary": "Configure Metric-related settings.", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "DistributeMetricConfig", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "required,false: disabled, true: enabled ,If the value is false, the other fields are non-required" + }, + "prometheusUrl": { + "type": "string", + "description": " required if enabled is true, the url of pushgateway,like http://localhost:9091" + }, + "prometheusUsername": { + "type": "string", + "description": "optional, the url of username for pushgateway" + }, + "prometheusPassword": { + "type": "string", + "description": " optional, the url of password for pushgateway" + }, + "metricIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "optional, metric id array,a value of null means push all metric data." + }, + "interval": { + "type": "integer", + "description": "required if enabled is true, the interval of generating metrics data,unit is second" + }, + "labels": { + "type": "object", + "properties": { + "key1": { + "type": "string" + } + }, + "x-apifox-orders": [ + "key1" + ], + "description": "optional, additional labels needed for metric, will be pushed to pushgateway along with the metrics data for grouping of metrics,key: label name,value: label value", + "x-apifox-ignore-properties": [] + } + }, + "required": [ + "enabled", + "prometheusUrl", + "interval" + ], + "x-apifox-orders": [ + "enabled", + "prometheusUrl", + "prometheusUsername", + "prometheusPassword", + "metricIds", + "interval", + "labels" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "enabled": false, + "prometheusUrl": "http://127.0.0.1:9091", + "prometheusUsername": "", + "prometheusPassword": "", + "metricIds": [ + "13", + "14", + "15", + "16", + "17", + "20", + "21", + "1031", + "1032", + "2000", + "2001", + "2002", + "2003", + "2004", + "2005", + "2006", + "2007", + "2008", + "2009", + "3000" + ], + "interval": 15, + "labels": { + "category": "4", + "org_id": "ef5f285a", + "project_id": "c46ffe05", + "service_id": "25a967f3", + "type": "4" + } + } + } + } + }, + "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/5225015/apis/api-219076769-run" + } + }, + "/api/monitor/metric_contents": { + "get": { + "summary": "Query the most recent metric data", + "x-apifox-folder": "NeuronEX/monitor", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "operationId": "MetricContents", + "tags": [ + "NeuronEX/monitor" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-orders": [], + "x-apifox-ignore-properties": [] + }, + "examples": { + "1": { + "summary": "Success", + "value": "license_max_tags 30\nlicense_used_tags 0\nnorth_nodes_total 1\nnorth_running_nodes_total 1\nnorth_disconnected_nodes_total 1\nsouth_nodes_total 0\nsouth_running_nodes_total 0\nrunning_nodes_total 1\nexception_nodes_total 1\nsouth_connected_nodes_total 0\nsouth_exception_nodes_total 0\nnorth_connected_nodes_total 0\nnorth_exception_nodes_total 1\nrunning_rules_total 0\nstopped_rules_total 0\n" + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076770-run" + } + }, + "/api/neuron/node": { + "post": { + "summary": "Add Node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Add Node", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "node name", + "type": "string", + "title": "node name" + }, + "plugin": { + "type": "string", + "title": "plugin name" + }, + "params": { + "type": "array", + "title": "setting (optional)", + "items": { + "type": "object", + "properties": { + "param1": { + "type": "integer", + "description": "" + }, + "param2": { + "type": "string", + "description": "" + }, + "param3": { + "type": "bool", + "description": "" + }, + "param4": { + "type": "integer", + "description": "" + } + }, + "x-apifox-orders": [ + "param1", + "param2", + "param3", + "param4" + ], + "x-apifox-ignore-properties": [] + } + } + }, + "required": [ + "name", + "plugin" + ], + "x-apifox-orders": [ + "name", + "plugin", + "params" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "name": "modbus-tcp-node", + "plugin": "Modbus TCP" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "node type invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node type invalid", + "value": { + "error": 2001 + } + } + } + } + } + }, + "404": { + "description": "library not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "library not found", + "value": { + "error": 2301 + } + } + } + } + } + }, + "409": { + "description": "node exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node exist", + "value": { + "error": 2002 + } + } + } + } + } + }, + "x-400:node setting invalid": { + "description": "node setting invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node setting invalid", + "value": { + "error": 2004 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076771-run" + }, + "delete": { + "summary": "Del node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Delete node", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076772-run" + }, + "get": { + "summary": "Get node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Get node", + "tags": [ + "Neuron/configuration" + ], + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Type of the node,type=1 means southbound node,type=2 means northbound node", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "plugin", + "in": "query", + "description": "Plugin type of the node", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "node", + "in": "query", + "description": "Name of the node", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076773-run" + }, + "put": { + "summary": "Update node", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Update node", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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" + ], + "x-apifox-ignore-properties": [] + }, + "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" + ], + "x-apifox-ignore-properties": [] + }, + "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" + ], + "x-apifox-ignore-properties": [] + }, + "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" + ], + "x-apifox-ignore-properties": [] + }, + "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/5225015/apis/api-219076774-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": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076775-run" + }, + "post": { + "summary": "Node Setting", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "Please refer to [Plugin Setting](https://docs.emqx.com/zh/neuronex/latest/api/plugin-setting.html) for the configuration parameters of each plugin.", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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/5225015/apis/api-219076776-run" + } + }, + "/api/neuron/node/ctl": { + "post": { + "summary": "Node CTL", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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/5225015/apis/api-219076777-run" + } + }, + "/api/neuron/node/state": { + "get": { + "summary": "Get Node State", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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/5225015/apis/api-219076778-run" + } + }, + "/api/neuron/group": { + "post": { + "summary": "Add Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "group": { + "type": "string", + "description": "group name" + }, + "node": { + "type": "string", + "description": "node name" + }, + "interval": { + "type": "integer", + "description": "read/upload interval(ms)" + } + }, + "x-apifox-orders": [ + "group", + "node", + "interval" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "group": "gconfig1", + "node": "modbus-node", + "interval": 10000 + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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/5225015/apis/api-219076779-run" + }, + "delete": { + "summary": "Del Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "group": { + "type": "string", + "description": "group name" + }, + "node": { + "type": "string", + "description": "node name" + } + }, + "x-apifox-orders": [ + "group", + "node" + ], + "x-apifox-ignore-properties": [] + }, + "example": { + "group": "gconfig1", + "node": "modbus-node" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "group already subscribed", + "value": { + "error": 2101 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076780-run" + }, + "put": { + "summary": "Update Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "group exist", + "value": { + "error": 2104 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076781-run" + }, + "get": { + "summary": "Get Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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/5225015/apis/api-219076782-run" + } + }, + "/api/neuron/tags": { + "post": { + "summary": "Add Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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" + } + }, + "x-apifox-orders": [ + "name", + "address", + "attribute", + "type", + "precision", + "decimal", + "description" + ], + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076783-run" + }, + "get": { + "summary": "Get Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [ + { + "name": "node", + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076784-run" + }, + "put": { + "summary": "Update Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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" + } + }, + "required": [ + "name", + "type", + "attribute", + "address", + "description", + "decimal", + "precision" + ], + "x-apifox-orders": [ + "name", + "type", + "attribute", + "address", + "description", + "precision", + "decimal" + ], + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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" + ], + "x-apifox-ignore-properties": [] + }, + "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/5225015/apis/api-219076785-run" + }, + "delete": { + "summary": "Del Tag", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "node not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076786-run" + } + }, + "/api/neuron/plugin": { + "post": { + "summary": "Add Plugin", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "library": { + "type": "string", + "description": "plugin library name" + }, + "schema_file": { + "type": "string", + "format": "binary", + "description": "plugin schema file" + }, + "so_file": { + "type": "string", + "format": "binary", + "description": "plugin so file" + } + }, + "required": [ + "library", + "schema_file", + "so_file" + ], + "x-apifox-orders": [ + "library", + "schema_file", + "so_file" + ], + "x-apifox-ignore-properties": [] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "400": { + "description": "library info invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "library info invalid", + "value": { + "error": 2302 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076787-run" + }, + "delete": { + "summary": "Del Plugin", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": [] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076788-run" + }, + "get": { + "summary": "Get Plugin", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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/5225015/apis/api-219076789-run" + } + }, + "/api/neuron/schema": { + "get": { + "summary": "Get Plugin Schema", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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/5225015/apis/api-219076790-run" + } + }, + "/api/neuron/subscribe": { + "post": { + "summary": "Subscribe", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "app": { + "description": "app name", + "type": "string" + }, + "driver": { + "description": "substring match against driver name", + "type": "string" + }, + "group": { + "description": "substring match against 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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "group not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076791-run" + }, + "put": { + "summary": "Update Subscribe Parameters", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": [] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "group not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076792-run" + }, + "delete": { + "summary": "UnSubscribe", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "group not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076793-run" + }, + "get": { + "summary": "Get Subscribe Group", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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/5225015/apis/api-219076794-run" + } + }, + "/api/neuron/subscribes": { + "post": { + "summary": "Subscribe Multiple Groups", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "group not exist", + "value": { + "error": 2106 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076795-run" + } + }, + "/api/neuron/version": { + "get": { + "summary": "Get Version", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076796-run" + } + }, + "/api/neuron/logs": { + "get": { + "summary": "Download log files", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "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": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "internal error", + "value": { + "error": 1001 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076797-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": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "type": "string", + "description": "node name" + }, + "level": { + "type": "string", + "description": "log level ,could be debug、info、notice、warn、error、fatal" + }, + "core": { + "type": "string", + "description": "whether to switch the core log level.The core field is optional and defaults to true." + } + }, + "required": [ + "level" + ], + "x-apifox-orders": [ + "node", + "level", + "core" + ], + "x-apifox-ignore-properties": [] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + }, + "404": { + "description": "Record does not exist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "node not exist", + "value": { + "error": 2003 + } + } + } + } + } + }, + "500": { + "description": "server is busy", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "x-apifox-ignore-properties": [], + "x-apifox-orders": [] + }, + "examples": { + "1": { + "summary": "server is busy", + "value": { + "error": 1010 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/5225015/apis/api-219076798-run" + } + }, + "/api/neuron/global/drivers": { + "put": { + "summary": "Put Drivers", + "x-apifox-folder": "Neuron/configuration", + "x-apifox-status": "released", + "deprecated": false, + "description": "", + "tags": [ + "Neuron/configuration" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "param1": { + "type": "integer", + "description": "" + }, + "param2": { + "type": "string", + "description": "" + }, + "param3": { + "type": "bool", + "description": "" + }, + "param4": { + "type": "integer", + "description": "" + } + }, + "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-orders": [ + "name", + "interval", + "tags" + ] + } + }, + "x-apifox-orders": [ + "param1", + "param2", + "param3", + "param4" + ], + "x-apifox-ignore-properties": [] + }, + "required": { + "type": "string" + }, + "x-apifox-orders": { + "type": "string" + } + }, + "x-apifox-orders": [ + "name", + "plugin", + "params", + "required", + "x-apifox-orders" + ], + "examples": [ + { + "nodes": [ + { + "name": "rtu template", + "plugin": "Modbus RTU", + "params": { + "param1": 1, + "param2": "1.1.1.1", + "param3": true, + "param4": 11.22 + }, + "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 + } + ] + } + ] + } + ] + } + ], + "x-apifox-ignore-properties": [] + }, + "example": "" + } + } + }, + "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/5225015/apis/api-219076799-run" + } + } + }, + "components": { + "schemas": {} + }, + "servers": [] +} \ No newline at end of file From 0bd60bc7f02ef05293aa4c817a332f116fd2c1f1 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Fri, 27 Sep 2024 10:08:35 +0800 Subject: [PATCH 4/7] feat: delete template content --- .github/workflows/deploy_docs.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index a425c5c..b143a57 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -107,15 +107,10 @@ jobs: set -x LANGS=(zh en) for lang in "${LANGS[@]}"; do - npx @redocly/cli build-docs redoc/api-swagger.json -t redoc/template.hbs \ + npx @redocly/cli build-docs redoc/api-swagger.json \ --output docs/.vitepress/dist/${lang}/neuronex/${VERSION}/api/api-docs.html \ - --options.theme.colors.primary.main=#00b173 \ - --options.theme.typography.headings.fontFamily='Roboto, sans-serif' \ - --options.hide-hostname --templateOptions.title "NeuronEX ${VERSION} API Documentation" \ - --templateOptions.description "NeuronEX ${VERSION} API Documentation" \ - --templateOptions.version "${VERSION}" \ - --templateOptions.neuronex \ - $(if [ "${lang}" == "zh" ]; then echo "--templateOptions.langZH \"zh\""; fi) + --theme.openapi.theme.colors.primary.main=#00b173 \ + --theme.openapi.theme.typography.headings.fontFamily='Roboto, sans-serif' done - name: set aws credentials From ae8c2449c4300929a90d24adbe951a8d73a68558 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Fri, 27 Sep 2024 10:20:37 +0800 Subject: [PATCH 5/7] feat: add version log --- .github/workflows/deploy_docs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index b143a57..ebad3ce 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -105,6 +105,7 @@ jobs: cd frontend yarn global add redoc-cli set -x + cat ${VERSION} LANGS=(zh en) for lang in "${LANGS[@]}"; do npx @redocly/cli build-docs redoc/api-swagger.json \ From 0e26a0866b3bbc9c2cb4f45b8ad0e1f8193721a4 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Fri, 27 Sep 2024 10:41:17 +0800 Subject: [PATCH 6/7] feat: use cat version --- .github/workflows/deploy_docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index ebad3ce..98db172 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -105,7 +105,7 @@ jobs: cd frontend yarn global add redoc-cli set -x - cat ${VERSION} + echo ${VERSION} LANGS=(zh en) for lang in "${LANGS[@]}"; do npx @redocly/cli build-docs redoc/api-swagger.json \ From bd082418691bb3aeaf44c6b2dbc76fe429a53b06 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Fri, 27 Sep 2024 10:58:27 +0800 Subject: [PATCH 7/7] chore: delete npm add --- .github/workflows/deploy_docs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index 78a66ca..0dbdb2d 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -103,7 +103,6 @@ jobs: - name: build redoc run: | cd frontend - yarn global add redoc-cli set -x echo ${VERSION} LANGS=(zh en)