Show/Hide Toolbars

PerfectApps ® Help Guide

Create User: The CreateUser method allows you to create users.

 

REQUEST ATTRIBUTES

addressLine1

string


addressLine2

string


alternateEmailAddress

string


cellphone

string


countryISO

string


customId

string


directoryServiceUserName

string


emailAddress

string


fax

string


firstName

string


hasOfflineRight

boolean

Indicates if the user has Offline Access or not

isActive

boolean

Indicates if the user is active or not

languageISO

string


lastName

string


password

string


roles

bitfield

Valid options are:

1 = Apps

2 = Reports

4 = Connections

8 = Users

16 = Account

32 = API

64 = External Portal

128 = Folders

256 = Archiving

512 = Publish

1024 = Failed Notification

sendEmail

boolean

If true, the user will be sent an email with a temporary password

skype

string


stateProvince

string


telephone

string


title

string


tokenIn

string

This is the security token that is obtained by the previous API call. See API Security topic for more details

town

string


userType

string

Valid options are:

Basic

Advanced

Limited

zipCode

string


 

 

RETURN ATTRIBUTES

CreateUserResult

int

An integer result indicating success (= 0) or an error (<> 0)

tokenOut

string

This is the new security token that should be used for the next function call after this one. See the API Security topic for more details

userId

int

The ID of the newly created user

 

REST

The following is a sample REST request and response. The placeholders shown need to be replaced with actual values.

 

POST /REST/api/portal/CreateUser HTTP/1.1

Host: <server url>

Content-Type: multipart/form-data

 

Content-Disposition: form-data; name="addressLine1" string

Content-Disposition: form-data; name="addressLine2" string

Content-Disposition: form-data; name="alternateEmailAddress" string

Content-Disposition: form-data; name="cellphone" string

Content-Disposition: form-data; name="countryISO" string

Content-Disposition: form-data; name="customId" string

Content-Disposition: form-data; name="directoryServiceUserName" string

Content-Disposition: form-data; name="emailAddress" string

Content-Disposition: form-data; name="fax" string

Content-Disposition: form-data; name="firstName" string

Content-Disposition: form-data; name="hasOfflineRight" boolean

Content-Disposition: form-data; name="isActive" boolean

Content-Disposition: form-data; name="languageISO" string

Content-Disposition: form-data; name="lastName" string

Content-Disposition: form-data; name="password" string

Content-Disposition: form-data; name="roles" bitfield

Content-Disposition: form-data; name="sendEmail" boolean

Content-Disposition: form-data; name="skype" string

Content-Disposition: form-data; name="stateProvince" string

Content-Disposition: form-data; name="telephone" string

Content-Disposition: form-data; name="title" string

Content-Disposition: form-data; name="tokenIn" string

Content-Disposition: form-data; name="town" string

Content-Disposition: form-data; name="userType" string

Content-Disposition: form-data; name="zipCode" string

 

HTTP/1.1 200 OK

Content-Length: length

Content-Type: application/json; charset=utf-8

{

"CreateUserResult":int,

"tokenOut":string,

"userId":int

}

 

Return to: Account API Methods (REST), Integration