Get permission information by user/group

Call Instructions:

  1. This interface is based on the specified user/group to obtain his permission information in all Spaces

  2. This interface can be invoked only by system administrators


Interface Information

Interface Information

Name

Get all space permission information by user/group

Address

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

Method

POST

Return Type

Json

Authentication

Basic,token

Header Parameter

Parameter name

Required

Parameter type

Description

ContentType

Y

String

application/json

body Parameters

Parameter name

Required

Parameter type

Description

type

Y

String

Search types: user or group

name

Y

String

user/group: determines the incoming user name or group name based on the value of type

page

N

int

Paging parameter, offset, defaults to 0

pageSize

N

int

Page parameter, number of lines, maximum limit 100, default 10

spaceKeys

N

String[]

An array collection of spatial keys

return value format

Field

Type

Description

code

int

msg

String

total

int

Total data

isMore

bool

true or false

data

String

[{

            "spaceName": "space name",

            "spaceKey": "space key",

            "permissionsBeans": [{

                    "id": Id of the owning permission,

                    "type": "Type of the owning permission"

                },{

                    "id": 1638443,

                    "type": "REMOVEBLOG"

                }]

}]


Example Postman call

 


Example body request parameters:

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

Example return value

{ "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" } ] } ] }