获取角色树列表

更新时间:2022-05-12 16:21:49

接口说明

根据租户code获取角色树列表

基本信息

请求方式: GET

请求路径:

https://prod.open-api.mysre.cn/m/Organization/open-api/role-tree-list

请求参数

参数名 参数位置 参数类型 必填 默认值 示例 描述

请求示例

get /m/Organization/open-api/role-tree-list?tenantCode=betatest

返回成功示例

{
    "errcode": 0,
    "errmsg": "success",
    "data": [
        {
            "id": "03b48c40-47e3-11ea-83fc-506b4bff40b4",
            "name": "建设单位",
            "parentId": "",
            "roleList": [
                {
                    "id": "39d358cd-7f03-060a-d802-0690baf6f64b",
                    "name": "运营专员",
                    "groupId": "03b48c40-47e3-11ea-83fc-506b4bff40b4"
                },
                {
                    "id": "3a0265f0-6b37-35c3-748d-7b8f15a75c35",
                    "name": "0304角色A",
                    "groupId": "03b48c40-47e3-11ea-83fc-506b4bff40b4"
                }
            ],
            "childList": [
                {
                    "id": "3a0264f5-1f3b-1d88-0a9f-906c5545b79a",
                    "name": "分组1",
                    "parentId": "03b49a30-47e3-11ea-83fc-506b4bff40b4",
                    "roleList": [
                        {
                            "id": "3a02665c-ba51-9d8e-7a71-955952d7cadb",
                            "name": "分组1角色1",
                            "groupId": "3a0264f5-1f3b-1d88-0a9f-906c5545b79a"
                        },
                        {
                            "id": "3a02665c-ba51-9d8e-7a71-955952d7cadb",
                            "name": "分组1角色2",
                            "groupId": "3a0264f5-1f3b-1d88-0a9f-906c5545b79a"
                        }
                    ]
                }
            ]
        },
        {
            "id": "1772d704-6d2a-11ec-90e5-ec0d9a46a456",
            "name": "成本协同公司管理员",
            "parentId": "",
            "roleList": [
                {
                    "id": "649d3cdd-6d2a-11ec-90e5-ec0d9a46a456",
                    "name": "成本协同公司管理员",
                    "groupId": "1772d704-6d2a-11ec-90e5-ec0d9a46a456"
                },
                {
                    "id": "3a02389d-de2f-f73a-e21b-29b3b647d8c2",
                    "name": "新增角色测试",
                    "groupId": "1772d704-6d2a-11ec-90e5-ec0d9a46a456"
                }
            ],
            "childList": []
        },
        {
            "id": "03b4961e-47e3-11ea-83fc-506b4bff40b4",
            "name": "监理单位",
            "parentId": "",
            "roleList": [
                {
                    "id": "3a023df4-3a72-88fc-f352-2fbaff0ab0a6",
                    "name": "监理单位新增角色",
                    "groupId": "03b4961e-47e3-11ea-83fc-506b4bff40b4"
                },
                {
                    "id": "b75ba432-39fe-11e7-80b0-005056a65fd7",
                    "name": "APP监理单位",
                    "groupId": "03b4961e-47e3-11ea-83fc-506b4bff40b4"
                }
            ],
            "childList": []
        },
        {
            "id": "03b49709-47e3-11ea-83fc-506b4bff40b4",
            "name": "施工单位",
            "parentId": "",
            "roleList": [
                {
                    "id": "b75ba431-39fe-11e7-80b0-005056a65fd7",
                    "name": "APP施工单位",
                    "groupId": "03b49709-47e3-11ea-83fc-506b4bff40b4"
                },
                {
                    "id": "3a023dd0-ceed-1b4d-c969-0acddb6ce6e1",
                    "name": "施工单位新增角色",
                    "groupId": "03b49709-47e3-11ea-83fc-506b4bff40b4"
                }
            ],
            "childList": []
        },
        {
            "id": "03b4981c-47e3-11ea-83fc-506b4bff40b4",
            "name": "咨询单位",
            "parentId": "",
            "roleList": [],
            "childList": []
        },
        {
            "id": "03b498bd-47e3-11ea-83fc-506b4bff40b4",
            "name": "材料供应商",
            "parentId": "",
            "roleList": [
                {
                    "id": "3a0117a5-95da-b167-86d0-3576087fe099",
                    "name": "CWB乙方角色",
                    "groupId": "03b498bd-47e3-11ea-83fc-506b4bff40b4"
                },
                {
                    "id": "3a0117a5-b260-fd45-057f-a3af49758791",
                    "name": "CWB乙方审核角色",
                    "groupId": "03b498bd-47e3-11ea-83fc-506b4bff40b4"
                }
            ],
            "childList": []
        },
        {
            "id": "03b4995d-47e3-11ea-83fc-506b4bff40b4",
            "name": "材料公司",
            "parentId": "",
            "roleList": [],
            "childList": []
        },
        {
            "id": "03b49a30-47e3-11ea-83fc-506b4bff40b4",
            "name": "设计单位",
            "parentId": "",
            "roleList": [
                {
                    "id": "3a0264f5-5092-16f3-6ffb-289414869917",
                    "name": "设计人员",
                    "groupId": "03b49a30-47e3-11ea-83fc-506b4bff40b4"
                }
            ],
            "childList": [
                {
                    "id": "3a0264f5-1f3b-1d88-0a9f-906c5545b79a",
                    "name": "设计单位分组",
                    "parentId": "03b49a30-47e3-11ea-83fc-506b4bff40b4",
                    "roleList": [
                        {
                            "id": "3a02665c-ba51-9d8e-7a71-955952d7cadb",
                            "name": "分组里的角色",
                            "groupId": "3a0264f5-1f3b-1d88-0a9f-906c5545b79a"
                        }
                    ]
                }
            ]
        }
    ]
}

返回参数说明(成功)

参数名 参数类型 描述
errcode number 错误码
errmsg string 错误信息
data array 数据集
data.id string 角色组ID
data.name string 角色组名称
data.parentId string 父级角色组ID
data.roleList array 角色组下的角色
data.roleList.id string 角色ID
data.roleList.name string 角色名称
data.roleList.groupId string 角色组ID
data.childList array 子角色组
data.childList.id string 子角色组ID
data.childList.name string 子角色组名称
data.childList.parentId string 子角色组父级ID
data.childList.roleList string 子角色组下的角色

失败返回示例

{
  "errcode": -1,
  "errmessage": "未知错误",
  "data": []
}

返回参数说明(失败)

参数名 参数类型 描述
errcode number 错误码
errmsg string 错误信息
data array 数据集

results matching ""

    No results matching ""