Skip to content

链接权限

链接权限说明

在链接上设置用于控制被授权用户所能看到的数据范围

链接权限的定义

链接权限结构说明

字段类型描述
idLONG权限条目的 id
titleSTRING权限条目的标题
typeSTRING规则类型,分为:ROW(行规则),COLUMN(列规则)
connectionIdLONG权限条目所属的链接id
prioritySTRING权限条目的权限级别
nodeTypeSTRING权限条目作用的节点类型
pathSTRING数组权限条目作用的具体路径
optionsOBJECT权限条目的配置信息
options.filterOBJECT权限条目的过滤条件相关信息
options.filter.whereHE 数组行过滤条件
options.filter.excludeColumnsHE 数组列过滤条件
options.filter.filterTypeSTRING过滤条件类型
priority值说明
字段值描述
LS表示用户仅可见权限条目作用节点的名称,如:用户只能看到链接下某些表的名称或某个目录下所有表的名称。但是对表的结构和数据一律不可见
SC表示用户可见权限条目作用的某张表或某个目录下所有表的结构信息(表头)
RO表示用户可见权限条目作用的某张表或某个目录下所有表的结构信息和具体数据
RW表示用户对权限条目作用的某张表或某个目录下所有表拥有完整权限,包括对表结构和数据的可见以及可以将表作为数据集成的输出目的地
权限级别关系:RW>RO>SC>LS
nodeType值说明
字段值描述
PATH表示对权限条目作用于链接中的某个目录,用户对该目录下的所有表持有特定权限
TABLE表示对权限条目作用于链接中的某张表,用户对该表持有特定权限,当对权限条目作用于表并且权限为RO时,owner可添加针对该表的行过滤条件
CONNECTION表示权限条目作用于整个链接,其效果与之前版本的协作类似,被对权限条目包含的用户/用户组对整个链接下的所有资源持有特定权限
多条权限条目间的关系

多条权限条目作用于同一个表时,规则间为"或"关系。用户被多条规则选中时,看到的是多条权限条目的并集过滤后的数据

接口说明

新增权限条目

请求URL

http
POST /api/connections/{connectionId}/auths HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数

Request Body 参数
字段类型是否必须描述
titleSTRING权限条目的标题
connectionIdNUMBER权限条目所属的链接id
typeSTRING规则类型,可选值:ROW(行权限) & COLUMN(列权限)
prioritySTRING权限条目的权限级别,type为COlUMN时固定为LS
nodeTypeSTRING权限条目作用的节点类型
pathSTRING数组nodeType不是CONNECTION时必须权限条目作用的具体路径
options.filter.whereHE数组行过滤条件
options.filter.excludeColumnsHE数组列过滤条件
usersOBJECT数组权限条目所选用户
organizationsOBJECT数组权限条目所选用户组
orgOBJECT数组权限条目所选组织架构
tenantsOBJECT数组权限条目所选租户(行权限仅在priority为RO时有效)

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
dataOBJECT笔记结构说明

接口示例1(新增行权限)

http
POST /api/connections/{connectionId}/auths HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

// Request Body:
{
  "title": "规则1",
  "connectionId": 1,
  "type": "ROW",
  "nodeType": "TABLE",
  "priority": "RO",
  "path": [
    "public",
    "A_IVT_MOVIE"
  ],
  "users": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ],
  "organizations": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ],
  "org": [
      {
        "id": 1
      },
      {
        "id": 2
      }
  ],
  "tenants": [
      {
        "id": 10001
      },
      {
        "id": 10002
      }
  ],
  "options": {
    "filter": {
      "columns": [],
      "where": [
        {
          "kind": "function",
          "op": "and",
          "args": [
            {
              "kind": "function",
              "op": "<",
              "args": [
                {
                  "kind": "field",
                  "op": "id",
                  "type": "number"
                },
                {
                  "kind": "constant",
                  "op": 5,
                  "type": "number"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": {
    "id": 1,
    "title": "规则1",
    "type" : "ROW",
    "connectionId": 8,
    "priority": "RO",
    "nodeType": "TABLE",
    "path": [
      "public",
      "A_IVT_MOVIE"
    ],
    "options": {
      "filter": {
        "columns": [],
        "where": [
          {
            "kind": "function",
            "op": "and",
            "args": [
              {
                "kind": "function",
                "op": "<",
                "args": [
                  {
                    "kind": "field",
                    "op": "id",
                    "type": "number"
                  },
                  {
                    "kind": "constant",
                    "op": 5,
                    "type": "number"
                  }
                ]
              }
            ]
          }
        ],
        "filterType": "CONNECTION"
      }
    },
    "createdBy": 1,
    "createdAt": "2020-05-28 12:21:31",
    "updatedBy": 1,
    "updatedAt": "2020-05-28 14:26:11",
    "visible": true,
    "users": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "organizations": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "org": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "tenants": [
      {
        "id": 10001
      },
      {
        "id": 10002
      }
    ],
    "editable": true,
    "delete": false
  }
}

接口示例2(新增列权限)

http
POST /api/connections/{connectionId}/auths HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

// Request Body:
{
    "title": "规则1",
    "connectionId": 1,
    "type": "COLUMN",
    "nodeType": "TABLE",
    "priority": "LS",
    "path": [
        "public",
        "A_IVT_MOVIE"
    ],
    "users": [
        {
            "id": 1
        },
        {
            "id": 2
        }
    ],
    "organizations": [
        {
            "id": 1
        },
        {
            "id": 2
        }
    ],
    "org": [
        {
            "id": 1
        },
        {
            "id": 2
        }
    ],
    "tenants": [
        {
            "id": 10001
        },
        {
            "id": 10002
        }
    ],
    "options": {
        "filter": {
            "excludeColumns": [
                {
                    "fieldName": "id"
                },
                {
                    "fieldName": "name"
                }
            ]
        }
    }
}
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
    "version": "version@9a5e106#6730f0d",
    "code": 0,
    "msg": "success",
    "data": {
        "id": 1,
        "title": "规则1",
        "type": "COLUMN",
        "connectionId": 8,
        "priority": "LS",
        "nodeType": "TABLE",
        "path": [
            "public",
            "A_IVT_MOVIE"
        ],
        "options": {
            "filter": {
                "excludeColumns": [
                    {
                        "fieldName": "id"
                    },
                    {
                        "fieldName": "name"
                    }
                ],
                "where": [],
                "filterType": "CONNECTION"
            }
        },
        "createdBy": 1,
        "createdAt": "2020-05-28 12:21:31",
        "updatedBy": 1,
        "updatedAt": "2020-05-28 14:26:11",
        "visible": true,
        "users": [
            {
                "id": 1
            },
            {
                "id": 2
            }
        ],
        "organizations": [
            {
                "id": 1
            },
            {
                "id": 2
            }
        ],
        "org": [
            {
                "id": 1
            },
            {
                "id": 2
            }
        ],
        "tenants": [
            {
                "id": 10001
            },
            {
                "id": 10002
            }
        ],
        "editable": true,
        "delete": false
    }
}

更新权限条目

请求URL

http
PUT /api/connections/{connectionId}/auths/{authId} HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数

Request Body 参数
字段类型是否必须描述
titleSTRING权限条目的标题
connectionIdNUMBER权限条目所属的链接id
typeSTRING规则类型,可选值:ROW(行权限) & COLUMN(列权限)
prioritySTRING权限条目的权限级别,type为COlUMN时固定为LS
nodeTypeSTRING权限条目作用的节点类型
pathSTRING数组nodeType不是CONNECTION时必须权限条目作用的具体路径
options.filter.whereHE数组行过滤条件
options.filter.excludeColumnsHE数组列过滤条件
usersOBJECT数组权限条目所选用户
organizationsOBJECT数组权限条目所选用户组
orgOBJECT数组权限条目所选组织架构
tenantsOBJECT数组权限条目所选租户(行权限仅在priority为RO时有效)

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
dataOBJECT笔记结构说明

接口示例1

http
PUT /api/connections/{connectionId}/auths/{authId} HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

// Request Body:
{
  "title": "规则1",
  "connectionId": 1,
  "id": 1,
  "type": "ROW",
  "nodeType": "TABLE",
  "priority": "RO",
  "path": [
    "public",
    "A_IVT_MOVIE"
  ],
  "users": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ],
  "organizations": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ],
  "org": [
      {
        "id": 1
      },
      {
        "id": 2
      }
  ],
  "tenants": [
      {
        "id": 10001
      },
      {
        "id": 10002
      }
  ],
  "options": {
    "filter": {
      "columns": [],
      "where": [
        {
          "kind": "function",
          "op": "and",
          "args": [
            {
              "kind": "function",
              "op": "<",
              "args": [
                {
                  "kind": "field",
                  "op": "id",
                  "type": "number"
                },
                {
                  "kind": "constant",
                  "op": 5,
                  "type": "number"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": {
    "id": 1,
    "title": "规则1",
    "type" : "ROW",
    "connectionId": 8,
    "priority": "RO",
    "nodeType": "TABLE",
    "path": [
      "public",
      "A_IVT_MOVIE"
    ],
    "options": {
      "filter": {
        "columns": [],
        "where": [
          {
            "kind": "function",
            "op": "and",
            "args": [
              {
                "kind": "function",
                "op": "<",
                "args": [
                  {
                    "kind": "field",
                    "op": "id",
                    "type": "number"
                  },
                  {
                    "kind": "constant",
                    "op": 5,
                    "type": "number"
                  }
                ]
              }
            ]
          }
        ],
        "filterType": "CONNECTION"
      }
    },
    "createdBy": 1,
    "createdAt": "2020-05-28 12:21:31",
    "updatedBy": 1,
    "updatedAt": "2020-05-28 14:26:11",
    "visible": true,
    "users": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "organizations": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "org": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "tenants": [
      {
        "id": 10001
      },
      {
        "id": 10002
      }
    ],
    "editable": true,
    "delete": false
  }
}

接口示例2(更新列权限)

http
PUT /api/connections/{connectionId}/auths/{authId} HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

// Request Body:
{
    "title": "规则1",
    "id": 1
    "connectionId": 1,
    "type": "COLUMN",
    "nodeType": "TABLE",
    "priority": "LS",
    "path": [
        "public",
        "A_IVT_MOVIE"
    ],
    "users": [
        {
            "id": 1
        },
        {
            "id": 2
        }
    ],
    "organizations": [
        {
            "id": 1
        },
        {
            "id": 2
        }
    ],
    "org": [
        {
            "id": 1
        },
        {
            "id": 2
        }
    ],
    "tenants": [
        {
            "id": 10001
        },
        {
            "id": 10002
        }
    ],
    "options": {
        "filter": {
            "excludeColumns": [
                {
                    "fieldName": "code"
                },
                {
                    "fieldName": "name"
                }
            ]
        }
    }
}
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
    "version": "version@9a5e106#6730f0d",
    "code": 0,
    "msg": "success",
    "data": {
        "id": 1,
        "title": "规则1",
        "type": "COLUMN",
        "connectionId": 8,
        "priority": "LS",
        "nodeType": "TABLE",
        "path": [
            "public",
            "A_IVT_MOVIE"
        ],
        "options": {
            "filter": {
                "excludeColumns": [
                    {
                        "fieldName": "code"
                    },
                    {
                        "fieldName": "name"
                    }
                ],
                "where": [],
                "filterType": "CONNECTION"
            }
        },
        "createdBy": 1,
        "createdAt": "2020-05-28 12:21:31",
        "updatedBy": 1,
        "updatedAt": "2020-05-28 14:26:11",
        "visible": true,
        "users": [
            {
                "id": 1
            },
            {
                "id": 2
            }
        ],
        "organizations": [
            {
                "id": 1
            },
            {
                "id": 2
            }
        ],
        "org": [
            {
                "id": 1
            },
            {
                "id": 2
            }
        ],
        "tenants": [
            {
                "id": 10001
            },
            {
                "id": 10002
            }
        ],
        "editable": true,
        "delete": false
    }
}

根据ID获取权限条目

请求URL

http
GET /api/connections/{connectionId}/auths/{authId} HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数

Request Body 参数

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
dataOBJECT笔记结构说明

接口示例1

http
GET /api/connections/{connectionId}/auths/{authId} HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": {
    "id": 1,
    "title": "规则1",
    "type": "ROW",
    "connectionId": 8,
    "priority": "RO",
    "nodeType": "TABLE",
    "path": [
      "public",
      "A_IVT_MOVIE"
    ],
    "options": {
      "filter": {
        "columns": [],
        "where": [
          {
            "kind": "function",
            "op": "and",
            "args": [
              {
                "kind": "function",
                "op": "<",
                "args": [
                  {
                    "kind": "field",
                    "op": "id",
                    "type": "number"
                  },
                  {
                    "kind": "constant",
                    "op": 5,
                    "type": "number"
                  }
                ]
              }
            ]
          }
        ],
        "filterType": "CONNECTION"
      }
    },
    "createdBy": 1,
    "createdAt": "2020-05-28 12:21:31",
    "updatedBy": 1,
    "updatedAt": "2020-05-28 14:26:11",
    "visible": true,
    "users": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "organizations": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ],
    "editable": true,
    "delete": false
  }
}

根据ID删除权限条目

请求URL

http
DELETE /api/connections/{connectionId}/auths/{authId} HTTP/1.1

请求参数

URL 参数

Request Body 参数

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值

接口示例1

http
DELETE /api/connections/{connectionId}/auths/{authId} HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success"
}

获取指定路径下的连接权限

请求URL

http
POST /api/connections/{connectionId}/auths/path HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数

Request Body 参数
字段类型是否必须描述
pathSTRING数组否(为空表示查询CONNECTION级权限)权限条目作用的具体路径

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
dataOBJECT笔记结构说明

接口示例1

http
POST /api/connections/{connectionId}/auths/path HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

// Request Body:
{
  "path": [
    "public",
    "A_IVT_MOVIE"
  ]
}
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": [
    {
      "id": 3,
      "title": "规则2",
      "type": "ROW",
      "connectionId": 8,
      "priority": "LS",
      "nodeType": "TABLE",
      "path": [
        "public",
        "A_IVT_MOVIE"
      ],
      "options": {
        "filter": {
          "columns": [],
          "where": []
        }
      },
      "createdBy": 1,
      "createdAt": "2020-05-28 14:25:19",
      "updatedBy": 1,
      "updatedAt": "2020-05-28 14:25:19",
      "visible": true,
      "editable": true,
      "delete": false
    },
    {
      "id": 2,
      "title": "规则1",
      "connectionId": 8,
      "type": "ROW",
      "priority": "RO",
      "nodeType": "TABLE",
      "path": [
        "public",
        "A_IVT_MOVIE"
      ],
      "options": {
        "filter": {
          "columns": [],
          "where": [
            {
              "op": "and",
              "args": [
                {
                  "op": "<",
                  "args": [
                    {
                      "op": "id",
                      "kind": "field",
                      "type": "number"
                    },
                    {
                      "op": 5,
                      "kind": "constant",
                      "type": "number"
                    }
                  ],
                  "kind": "function"
                }
              ],
              "kind": "function"
            }
          ],
          "filterType": "CONNECTION"
        }
      },
      "createdBy": 1,
      "createdAt": "2020-05-28 12:21:31",
      "updatedBy": 1,
      "updatedAt": "2020-05-28 14:50:31",
      "visible": true,
      "users": [
        {
          "id": 2,
          "name": "test2"
        }
      ],
      "editable": true,
      "delete": false
    },
    {
      "id": 5,
      "title": "规则3",
      "connectionId": 8,
      "priority": "LS",
      "nodeType": "TABLE",
      "path": [
        "public",
        "A_IVT_MOVIE"
      ],
      "options": {
        "filter": {
          "columns": [],
          "where": []
        }
      },
      "createdBy": 1,
      "createdAt": "2020-05-28 14:55:00",
      "updatedBy": 1,
      "updatedAt": "2020-05-28 14:55:00",
      "visible": true,
      "editable": true,
      "delete": false
    }
  ],
  "totalHits": 3,
  "offset": 0
}

批量添加链接规则

请求URL

http
POST /api/connections/{connectionId}/auths/batch-add HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数

Request Body 参数
  1. 根据paths添加
json
{
    "priority": "RO",
    "type": "ROW",
    "connnectionId": 3,
    "nodeType": "TABLE",
    "paths": [
        [
            "public",
            "A_IVT_MOVIE"
        ],
        [
            "public",
            "a_ivt_college"
        ],
        [
            "public",
            "a_ivt_countries"
        ],
        [
            "public",
            "a_ivt_employee"
        ]
    ],
    "type": "ROW",
    "title": "批量添加",
    "users": [
        {
            "id": 2
        },
        {
            "id": 3
        },
        {
            "id": 7
        }
    ],
    "organizations": [
        {
            "id": 2
        },
        {
            "id": 3
        },
        {
            "id": 4
        }
    ],
    "tenants": [
        {
            "id": 10001
        },
        {
            "id": 10002
        },
        {
            "id": 10003
        }
    ],
    "options": {
        "filter": {
            "where": [],
            "excludeColumns": []
        }
    }
}
  1. 根据ConnectionAuthDtos添加
json
{
    "connectionAuthDtos": [
        {
            "priority": "RO",
            "connnectionId": 3,
            "nodeType": "TABLE",
            "path": [
                "public",
                "A_IVT_MOVIE"
            ],
            "type": "ROW",
            "title": "分别添加1",
            "users": [
                {
                    "id": 2
                }
            ],
            "organizations": [
                {
                    "id": 2
                },
                {
                    "id": 3
                }
            ],
            "tenants": [
                {
                    "id": 10001
                }
            ],
            "options": {
                "filter": {
                    "where": [],
                    "excludeColumns": []
                }
            }
        },
        {
            "priority": "RO",
            "connnectionId": 3,
            "nodeType": "TABLE",
            "path": [
                "public",
                "a_ivt_college"
            ],
            "type": "ROW",
            "title": "分别添加2",
            "users": [
                {
                    "id": 2
                },
                {
                    "id": 3
                }
            ],
            "organizations": [
                {
                    "id": 4
                },
                {
                    "id": 3
                }
            ],
            "tenants": [
                {
                    "id": 10001
                },
                {
                    "id": 10003
                }
            ],
            "options": {
                "filter": {
                    "where": [],
                    "excludeColumns": []
                }
            }
        },
        {
            "priority": "RO",
            "connnectionId": 3,
            "nodeType": "TABLE",
            "path": [
                "public",
                "A_IVT_MOVIE"
            ],
            "type": "ROW",
            "title": "分别添加3",
            "users": [
                {
                    "id": 2
                },
                {
                    "id": 3
                },
                {
                    "id": 7
                }
            ],
            "organizations": [
                {
                    "id": 2
                },
                {
                    "id": 3
                },
                {
                    "id": 4
                }
            ],
            "tenants": [
                {
                    "id": 10001
                },
                {
                    "id": 10002
                },
                {
                    "id": 10003
                }
            ],
            "options": {
                "filter": {
                    "where": [],
                    "excludeColumns": []
                }
            }
        }
    ]
}

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
dataOBJECT笔记结构说明

接口示例1

http
POST /api/connections/{connectionId}/auths/batch-add HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

// Request Body:
{
    "priority": "RO",
    "connnectionId": 3,
    "nodeType": "TABLE",
    "paths": [
        [
            "public",
            "A_IVT_MOVIE"
        ],
        [
            "public",
            "a_ivt_college"
        ],
        [
            "public",
            "a_ivt_countries"
        ],
        [
            "public",
            "a_ivt_employee"
        ]
    ],
    "type": "ROW",
    "title": "批量添加",
    "users": [
        {
            "id": 2
        },
        {
            "id": 3
        },
        {
            "id": 7
        }
    ],
    "organizations": [
        {
            "id": 2
        },
        {
            "id": 3
        },
        {
            "id": 4
        }
    ],
    "tenants": [
        {
            "id": 10001
        },
        {
            "id": 10002
        },
        {
            "id": 10003
        }
    ],
    "options": {
        "filter": {
            "where": [],
            "excludeColumns": []
        }
    }
}
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
    "version": "version@9a5e106#6730f0d",
    "code": 0,
    "msg": "success",
    "data": [
        {
            "id": 12,
            "title": "分别添加1",
            "connectionId": 3,
            "priority": "RO",
            "type": "ROW",
            "nodeType": "TABLE",
            "path": [
                "public",
                "A_IVT_MOVIE"
            ],
            "options": {
                "filter": {
                    "excludeColumns": [],
                    "where": [],
                    "ruleType": "ROW"
                }
            },
            "createdBy": 2,
            "updatedBy": 2,
            "visible": true,
            "users": [
                {
                    "id": 2
                }
            ],
            "organizations": [
                {
                    "id": 2
                },
                {
                    "id": 3
                }
            ],
            "tenants": [
                {
                    "id": 10001
                }
            ]
        },
        {
            "id": 13,
            "title": "分别添加2",
            "connectionId": 3,
            "priority": "RO",
            "type": "ROW",
            "nodeType": "TABLE",
            "path": [
                "public",
                "a_ivt_college"
            ],
            "options": {
                "filter": {
                    "excludeColumns": [],
                    "where": [],
                    "ruleType": "ROW"
                }
            },
            "createdBy": 2,
            "updatedBy": 2,
            "visible": true,
            "users": [
                {
                    "id": 2
                },
                {
                    "id": 3
                }
            ],
            "organizations": [
                {
                    "id": 4
                },
                {
                    "id": 3
                }
            ],
            "tenants": [
                {
                    "id": 10001
                },
                {
                    "id": 10003
                }
            ]
        },
        {
            "id": 14,
            "title": "分别添加3",
            "connectionId": 3,
            "priority": "RO",
            "type": "ROW",
            "nodeType": "TABLE",
            "path": [
                "public",
                "A_IVT_MOVIE"
            ],
            "options": {
                "filter": {
                    "excludeColumns": [],
                    "where": [],
                    "ruleType": "ROW"
                }
            },
            "createdBy": 2,
            "updatedBy": 2,
            "visible": true,
            "users": [
                {
                    "id": 2
                },
                {
                    "id": 3
                },
                {
                    "id": 7
                }
            ],
            "organizations": [
                {
                    "id": 2
                },
                {
                    "id": 3
                },
                {
                    "id": 4
                }
            ],
            "tenants": [
                {
                    "id": 10001
                },
                {
                    "id": 10002
                },
                {
                    "id": 10003
                }
            ]
        }
    ]
}

获取链接级规则

请求URL

http
GET /api/connections/{connectionId}/auths/priority-connection HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数

Request Body 参数

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
dataOBJECT笔记结构说明

接口示例1

http
GET /api/connections/{connectionId}/auths/priority-connection HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
http
HTTP/1.1 200 Ok
Content-Type: application/json

{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": [
    {
      "id": 6,
      "title": "规则1 (1)",
      "connectionId": 8,
      "priority": "LS",
      "nodeType": "CONNECTION",
      "options": {},
      "createdBy": 1,
      "createdAt": "2020-05-28 15:05:40",
      "updatedBy": 1,
      "updatedAt": "2020-05-28 15:05:40",
      "visible": true,
      "editable": true,
      "delete": false
    }
  ],
  "totalHits": 1,
  "offset": 0
}

HENGSHI SENSE API 使用手册