Get permission information by space

Call Instructions:

  1. This interface is to obtain the permission information of all users/groups and anonymous users in this space by space

  2. This interface can only be invoked by system administrators and administrators of a specified space


Interface Information

Interface Information

Name

Get all permission information by space key

Address

/rest/tools/1.0/api/spacePermission/getSpacePermissionByKey

Method

GET

Return Type

Json

Authentication

Basic,token

Parameters

Parameter name

Required

Parameter type

Description

key

Y

String

space key

return value format

Field

Type

Description

code

int

msg

String

data

String

{

"anonymous":[{

            "permissionsBeans": [{

                    "id": Id of the owning permission,

                    "type": "Type of the owning permission"

                },{

                    "id": 1638443,

                    "type": "REMOVEBLOG"

                }]

        }],

“user”:[{

            "name": "username",

            "userInfo":{

                 "name":username,

                 "key":user key,

                 "fullName":display name

              }

            "permissionsBeans": [{

                    "id": Id of the owning permission,

                    "type": "Type of the owning permission"

                },{

                    "id": 1638443,

                    "type": "REMOVEBLOG"

                }]

        }],

“group”:[{

            "name": "group name",

            "permissionsBeans": [{

                    "id": Id of the owning permission,

                    "type": "Type of the owning permission"

                },{

                    "id": 1638443,

                    "type": "REMOVEBLOG"

                }]

        }]

}


Example Postman call

 


Example return value

{ "code": 0, "msg": "Success", "data": { "anonymous": [ { "permissionsBeans": [ { "id": 950308, "type": "VIEWSPACE" } ] } ], "user": [ { "name": "admin", "userInfo": { "name": "admin", "key": "2c9d829d6e61f011016e61f143ff0000", "fullName": "admin", "email": "admin@example.com" }, "permissionsBeans": [ { "id": 950344, "type": "SETSPACEPERMISSIONS" }, { "id": 950332, "type": "VIEWSPACE" }, { "id": 950336, "type": "EDITSPACE" } ] }, { "name": "tt-david", "userInfo": { "name": "tt-david", "key": "4028d025818a2ae201818a896b380000", "fullName": "David", "email": "david@shdsd.com" }, "permissionsBeans": [ { "id": 950331, "type": "SETSPACEPERMISSIONS" }, { "id": 950330, "type": "VIEWSPACE" } ] } ], "group": [ { "name": "confluence-users", "permissionsBeans": [ { "id": 950288, "type": "COMMENT" }, { "id": 950290, "type": "EXPORTSPACE" }, { "id": 950293, "type": "CREATEATTACHMENT" }, { "id": 950292, "type": "REMOVEOWNCONTENT" }, { "id": 950287, "type": "EDITBLOG" }, { "id": 950289, "type": "EDITSPACE" }, { "id": 950291, "type": "VIEWSPACE" } ] } ] } }