调用须知:

  1. 此接口是根据指定的用户/组来获取祂在所有空间里的权限信息
  2. 此接口仅限系统管理员可以调用


接口信息
名称

根据用户/组获取所有空间权限信息

地址

/rest/tools/1.0/api/spacePermission/screenSpace

请求方式POST
返回类型格式Json
认证方式Basic,token认证
Header参数说明
参数名称是否必须参数类型描述

ContentType

YString

application/json

body参数说明

参数名称

是否必须

类型

描述

type

Y

String

搜索类型;

用户:user

组:group

name

Y

String

用户/组,根据type的值,确定传入用户名或者组名称

page

N

int

分页参数,偏移量,默认为0

pageSize

N

int

分页参数,行数,最大限制100

spaceKeys

N

String[]

空间key的数组集合

返回值格式
返回字段类型描述
codeint附录-码值
msgString附录-码值

total

int数据总量

isMore

booltrue或false
dataString

[{

            "spaceName": "空间名称",

            "spaceKey": "空间key",

            "permissionsBeans": [{

                    "id": 拥有的权限id,

                    "type": "拥有的权限类型"

                },{

                    "id": 1638443,

                    "type": "REMOVEBLOG"

                }]

}]

Postman调用示例


body请求参数示例:

{
    "type":"user",
    "name":"tt-david",
    "page":0,
    "pageSize":100,
    "spaceKeys":["TEAM","DOC","~tt-david"]
}


返回值示例:

{
    "code": 0,
    "msg": "Success",
    "total": 3,
    "isMore": false,
    "data": [
        {
            "spaceName": "TeamSpace",
            "spaceKey": "TEAM",
            "permissionsBeans": [
                {
                    "id": 950331,
                    "type": "SETSPACEPERMISSIONS"
                },
                {
                    "id": 950330,
                    "type": "VIEWSPACE"
                }
            ]
        },
        {
            "spaceName": "David",
            "spaceKey": "~tt-david",
            "permissionsBeans": [
                {
                    "id": 950320,
                    "type": "CREATEATTACHMENT"
                },
                {
                    "id": 950321,
                    "type": "REMOVEATTACHMENT"
                },
                {
                    "id": 950317,
                    "type": "REMOVEPAGE"
                },
                {
                    "id": 950318,
                    "type": "REMOVECOMMENT"
                },
                {
                    "id": 950322,
                    "type": "EDITBLOG"
                },
                {
                    "id": 950325,
                    "type": "SETPAGEPERMISSIONS"
                },
                {
                    "id": 950323,
                    "type": "EXPORTSPACE"
                },
                {
                    "id": 950314,
                    "type": "COMMENT"
                },
                {
                    "id": 950315,
                    "type": "EDITSPACE"
                },
                {
                    "id": 950319,
                    "type": "REMOVEBLOG"
                },
                {
                    "id": 950312,
                    "type": "VIEWSPACE"
                },
                {
                    "id": 950313,
                    "type": "REMOVEOWNCONTENT"
                },
                {
                    "id": 950324,
                    "type": "REMOVEMAIL"
                },
                {
                    "id": 950316,
                    "type": "SETSPACEPERMISSIONS"
                }
            ]
        },
        {
            "spaceName": "DOCSpace",
            "spaceKey": "DOC",
            "permissionsBeans": [
                {
                    "id": 950369,
                    "type": "EDITBLOG"
                },
                {
                    "id": 950370,
                    "type": "REMOVEOWNCONTENT"
                },
                {
                    "id": 950371,
                    "type": "REMOVEPAGE"
                },
                {
                    "id": 950372,
                    "type": "REMOVEBLOG"
                },
                {
                    "id": 950367,
                    "type": "VIEWSPACE"
                },
                {
                    "id": 950368,
                    "type": "EDITSPACE"
                }
            ]
        }
    ]
}