Remove permissions for specified Spaces and user/group

Call Instructions:

  1. This API is used to remove the existing permissions of users/groups in a specified space, that is, to remove the permissions from the permission list

  2. This API can only be called by system administrators and space administrators of a specified space

  3. If the list of permissions to remove includes viewspaces, the API will remove all permissions of the user/group in the specified space


Interface Information

Interface Information

Name

Remove permissions for specified Spaces and user/group

Address

/rest/tools/1.0/api/spacePermission/remove

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

spaceKey

Y

String

Space key

spacePermissions

Y

String[]

An array of permission types

return value format

Field

Type

Description

code

int

msg

String

data

String

{

            "userType": "user type",

            "name": "username/group name",

            "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", "spaceKey":"DEMO", "spacePermissions":["REMOVEOWNCONTENT"] }

Example return value

{ "code": 0, "msg": "Success", "data": { "type": "user", "name": "tt-david", "permissionsBeans": [ { "id": 1278023, "type": "VIEWSPACE" }, ] } }