Add User

Overview

This operation allows you to add a new user.

ACL Authorization Flow

The user must be admin (users with admin or spatial-admin role) to be able to add a new user.

HTTP PUT URL Format

The following format is used for HTTP PUT requests to add a user:

PUT DATA:

{
   "name": "GuestUser",
   "password": "test@123",
   "roles": ["spatial-admin", "spatial-dataset-editor"],
   "description": "this is a guest user",
   "emailAddress": "guest@pb.com"
}

PUT HEADER: Content-Type:application/json

Parameters

Parameter Type Required Description
name String Yes Specifies the name of the user
password String Yes Specifies a password for the user
roles String Yes Specifies a list of roles
description String No Specifies a short description about the user
emailAddress String No Specifies the email address of the user

Returns

Returns 200 OK if the user was added successfully.

Example for PUT

Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/user

Request Body

{
   "name": "GuestUser12",
   "password": "test@123",
   "roles": ["spatial-admin", "spatial-dataset-editor"],
   "description": "this is a guest user",
   "emailAddress": "guest@pb.com"
}

Response

200 OK
Note: It returns only 200 OK if the user was created successfully. If the user already exists, the response marks it as a bad request.