rulego-ipaas
  1. 规则链管理
rulego-ipaas
  • 用户中心
    • 登录
      POST
  • 规则链管理
    • 获取规则链列表
      GET
    • 获取规则链详情
      GET
    • 获取最近修改的规则链详情
      GET
    • 保存基础信息
      POST
    • 保存规则链
      POST
    • 删除规则链
      DELETE
    • 部署规则链
      POST
    • 下线规则链
      POST
    • 执行规则链(同步)
      POST
    • 触发规则链(异步)
      POST
  • 运行日志
    • 历史运行日志
      GET
    • 删除日志
      DELETE
    • 历史调试日志
      GET
    • 实时运行日志-ws
      GET
  • 共享节点管理
    • 获取共享节点列表
      GET
    • 获取共享节点详情
      GET
    • 保存共享节点
      POST
    • 删除共享节点
      DELETE
  • 动态组件管理
    • 获取动态组件列表
      GET
    • 获取动态组件详情
      GET
    • 安装动态组件
      POST
    • 卸载动态组件
      DELETE
  • 节点组件管理
    • 可用组件列表
      GET
    • 获取节点表单国际化
      GET
    • 保存节点表单国际化
      POST
  • 组件市场
    • 获取组件市场组件列表
  • 设置
    • 应用集成
      • 设置成系统规则链
  1. 规则链管理

保存规则链

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/api/v1/rules/{id}

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Path 参数
id
string 
流程ID
必需
Body 参数application/json
ruleChain
object (流程基础信息) 
规则链基础信息
可选
id
string 
ID
必需
name
string 
名称
必需
debugMode
boolean 
调试模式
可选
root
boolean 
根节点
必需
disabled
boolean 
停用
可选
true:上线,false:停用
configuration
object 
配置
可选
可自定义字段
additionalInfo
object 
扩展信息
可选
保存前端可视化额外信息
metadata
object 
节点列表
可选
firstNodeIndex
integer 
第一个节点索引
必需
默认0
endpoints
array[object (输入端节点配置) {8}] 
输入端列表
可选
nodes
array[object (流程节点配置) {6}] 
规则链节点列表
必需
connections
array[object (节点连接) {3}] 
节点连接列表
必需
示例
{
  "ruleChain": {
    "id": "string",
    "name": "string",
    "debugMode": true,
    "root": true,
    "disabled": true,
    "configuration": {
      "vars": {},
      "secrets": "string"
    },
    "additionalInfo": {
      "description": "string",
      "layoutX": "string",
      "layoutY": "string",
      "createTime": "string",
      "updateTime": "string",
      "icon": "string",
      "background": "string"
    }
  },
  "metadata": {
    "firstNodeIndex": 0,
    "endpoints": [
      {
        "id": "string",
        "type": "string",
        "name": "string",
        "debugMode": true,
        "configuration": {},
        "additionalInfo": {
          "description": "string",
          "layoutX": 0,
          "layoutY": 0
        },
        "processors": null,
        "routers": [
          {
            "id": "string",
            "params": [
              "string"
            ],
            "from": {
              "path": "string",
              "configuration": null,
              "processors": [
                "string"
              ]
            },
            "to": {
              "path": "string",
              "configuration": null,
              "wait": true,
              "processors": [
                "string"
              ]
            }
          }
        ]
      }
    ],
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "name": "string",
        "debugMode": true,
        "configuration": {},
        "additionalInfo": {
          "description": "string",
          "layoutX": 0,
          "layoutY": 0,
          "icon": "string",
          "background": "string"
        }
      }
    ],
    "connections": [
      {
        "fromId": "string",
        "toId": "string",
        "type": "string"
      }
    ]
  }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/api/v1/rules/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ruleChain": {
        "id": "string",
        "name": "string",
        "debugMode": true,
        "root": true,
        "disabled": true,
        "configuration": {
            "vars": {},
            "secrets": "string"
        },
        "additionalInfo": {
            "description": "string",
            "layoutX": "string",
            "layoutY": "string",
            "createTime": "string",
            "updateTime": "string",
            "icon": "string",
            "background": "string"
        }
    },
    "metadata": {
        "firstNodeIndex": 0,
        "endpoints": [
            {
                "id": "string",
                "type": "string",
                "name": "string",
                "debugMode": true,
                "configuration": {},
                "additionalInfo": {
                    "description": "string",
                    "layoutX": 0,
                    "layoutY": 0
                },
                "processors": null,
                "routers": [
                    {
                        "id": "string",
                        "params": [
                            "string"
                        ],
                        "from": {
                            "path": "string",
                            "configuration": null,
                            "processors": [
                                "string"
                            ]
                        },
                        "to": {
                            "path": "string",
                            "configuration": null,
                            "wait": true,
                            "processors": [
                                "string"
                            ]
                        }
                    }
                ]
            }
        ],
        "nodes": [
            {
                "id": "string",
                "type": "string",
                "name": "string",
                "debugMode": true,
                "configuration": {},
                "additionalInfo": {
                    "description": "string",
                    "layoutX": 0,
                    "layoutY": 0,
                    "icon": "string",
                    "background": "string"
                }
            }
        ],
        "connections": [
            {
                "fromId": "string",
                "toId": "string",
                "type": "string"
            }
        ]
    }
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
上一页
保存基础信息
下一页
删除规则链
Built with