Remove Role from User

Overview

This operation removes one or more existing roles from one or more users.

ACL Authorization Flow

The user making this request must be assigned with admin or spatial-admin roles.

HTTP POST URL Format

The following format is used for HTTP POST request:

POST DATA: 

{
"users": ["user1", "user2"],
"roles": ["role1", "role2"]
}

POST HEADER: Content-Type:application/json

Parameters

Parameter Type Required Description
users String Yes Specifies a list of users.
roles String Yes Specifies a list of roles.

Returns

Removes specified role(s) from the specified user(s).

Example for POST

The following request removes “spatial-user” and “spatial-sub-admin” roles from both “user1” and “user2”

Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/roles/users/delete

Request Body

{
    "users": ["user1", "user2"],
    "roles": ["spatial-user", "spatial-sub-admin"]
}

Response

200 OK
Note: It returns only 200 OK if the role(s) was revoked successfully from the user(s). Only existing roles and users must be provided in the request. If after removal of roles, user is left with no role, they still will have a "user" role assigned.