接口说明:

    获取项目中的角色列表或行级权限列表。

    权限说明:

    使用 token 访问,只有超管和在项目中的用户才能调用该接口。

    基本信息:

    属性
    API /api/dash/role/list
    Method GET

    请求参数:

    字段名称 参数类型 参数说明
    token String 鉴权 token,该用户必须是超管或在项目中的用户
    projectId Int 项目 id
    type String 'ROLE'为角色;'ROW_PERMISSION'为行级权限
    sort String(Optional) 角色列表排序默认为'name:1',按照名字升序排列

    输入URL示例: https://demo.xxx.com/api/dash/role/list?projectId=1&type=ROLE&token=1564644553413e707fada60f1c72d500322c9

    返回结果示例:

    {
        "code": 200,
        "result": {
            "folders": [
                {
                    "id": 35,
                    "type": "ROLE",
                    "name": "name1",
                    "isFolder": 1,
                    "projectId": 1,
                    "parentId": 0,
                    "modifyTime": "2019-05-08T07:32:35.000Z",
                    "items": [
                        {
                            "id": 2682,
                            "projectId": 1,
                            "type": 0,
                            "name": "2",
                            "description": "",
                            "isAdminCreate": true,
                            "creatorName": "Jack",
                            "creatorId": 15,
                            "folderId": 35,
                            "isFolder": 0
                        },
                        {
                            "id": 2720,
                            "projectId": 1,
                            "type": 0,
                            "name": "xxa",
                            "description": "xxxxxx",
                            "isAdminCreate": true,
                            "creatorName": "Amy",
                            "creatorId": 282,
                            "folderId": 35,
                            "isFolder": 0
                        }
                    ],
                    "folders": []
                },
                {
                    "id": 21,
                    "type": "ROLE",
                    "name": "name2",
                    "isFolder": 1,
                    "projectId": 1,
                    "parentId": 0,
                    "modifyTime": "2019-04-28T02:46:23.000Z",
                    "items": [],
                    "folders": []
                }
            ],
            "items": [
                {
                    "id": 2665,
                    "projectId": 1,
                    "type": 3,
                    "name": "1",
                    "description": "",
                    "isAdminCreate": true,
                    "creatorName": "admin",
                    "creatorId": 15,
                    "folderId": 0,
                    "isFolder": 0
                },
                {
                    "id": 2570,
                    "projectId": 1,
                    "type": 0,
                    "name": "111",
                    "description": "uu",
                    "creatorName": "admin",
                    "creatorId": 1,
                    "folderId": 0,
                    "isFolder": 0
                }
            ]
        },
        "logPath": "http://127.0.0.1:8009/operation/log/vGxKzd6w1rX34wHky9i6Zb"
    }