Overview
Creates a user.
The function is available as a Web Service request.
Request
Parameters of the API request:
Parameter | Type | Description | Requirements |
---|
token | String | API authentication token | Mandatory |
user | User | Specifies the user (credentials, type, parameters, roles), the user's extensions (if any), the user's groups (if any) | Mandatory |
Response
Parameters of the API response:
Parameter | Type | Description |
---|
return | CreateOrUpdateUserResponse | Possible return values: - OK
- ERROR_GENERAL
- ERROR_ILLEGAL_ARGUMENT
- ERROR_UNAUTHORIZED
- ERROR_ALREADY_EXISTS
|
Examples
Example CreateUser transaction.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v3="http://v3.provisioning.ws.web.verba.com/">
<soapenv:Header/>
<soapenv:Body>
<v3:createUser>
<token>14ycnUJIuDBAbvO8h1L5GtAcsHZIF5pz</token>
<user>
<agentId></agentId>
<externalId></externalId>
<crmUserId></crmUserId>
<customDateFormat></customDateFormat>
<customTimeFormat></customTimeFormat>
<loginName>verbatest</loginName>
<needChangePassword>0</needChangePassword>
<displayName>Verba Test User</displayName>
<email>verbatest@verbalabs.com</email>
<userType>user_type_verba</userType> <!-- Standard user type -->
<eid>0000</eid>
<!-- Needed if eid is not present
<environmentShortName></environmentShortName>
-->
<!--Zero or more repetitions:-->
<groupMemberships>
<member>1</member>
<primary>1</primary>
<supervisor>1</supervisor>
<admin>1</admin>
<group>
<eid>0000</eid>
<!-- <environmentShortName>?</environmentShortName>-->
<id>2</id> <!-- Valid existing group ID -->
</group>
<uniqueIdUnmodifiable>0</uniqueIdUnmodifiable>
<validFromUnmodifiable>0</validFromUnmodifiable>
<validUntilUnmodifiable>0</validUntilUnmodifiable>
</groupMemberships>
<customs>custom value 1</customs>
<customs>custom value 2</customs>
<customs>custom value 3</customs>
<customs>custom value 4</customs>
<customs>custom value 5</customs>
<customs>custom value 6</customs>
<customs>custom value 7</customs>
<customs>custom value 8</customs>
<customs>custom value 9</customs>
<customs>custom value 10</customs>
<language>en</language>
<timeZone>Europe/Budapest</timeZone>
<locked>0</locked>
<nonModifiable>0</nonModifiable>
<observerGroupId>3</observerGroupId> <!-- Valid existing group ID -->
<observerUserId>1</observerUserId> <!-- Valid existing user ID -->
<passwordExpires>0</passwordExpires>
<passwordHash>MD5HASH("your-password")</passwordHash>
<!-- <recorderLinePIN></recorderLinePIN> -->
<apiAccessOnly>0</apiAccessOnly>
<validFrom>2015-09-03T11:56:00Z</validFrom>
<validTo>2099-12-31T00:00:00Z</validTo>
<!--Zero or more repetitions:-->
<roles>r_standard_user</roles>
<roles>r_system_supervisor</roles>
<roles>r_system_administrator</roles>
</user>
</v3:createUser>
</soapenv:Body>
</soapenv:Envelope>
Response:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:createUserResponse xmlns:ns2="http://v3.provisioning.ws.web.verba.com/">
<return>
<status>
<statusCode>OK</statusCode>
</status>
<user>
<agentId/>
<apiAccessOnly>false</apiAccessOnly>
<customDateFormat/>
<customTimeFormat/>
<customs>custom value 1</customs>
<customs>custom value 2</customs>
<customs>custom value 3</customs>
<customs>custom value 4</customs>
<customs>custom value 5</customs>
<customs>custom value 6</customs>
<customs>custom value 7</customs>
<customs>custom value 8</customs>
<customs>custom value 9</customs>
<customs>custom value 10</customs>
<displayName>Verba Test User</displayName>
<eid>0000</eid>
<email>verbatest@verbalabs.com</email>
<environmentShortName>Ref.</environmentShortName>
<externalId/>
<groupMemberships>
<admin>true</admin>
<group>
<eid>0000</eid>
<environmentShortName>Ref.</environmentShortName>
<id>2</id>
<name>Developers</name>
<nonModifiable>false</nonModifiable>
</group>
<member>true</member>
<primary>true</primary>
<supervisor>true</supervisor>
<uniqueIdUnmodifiable>39</uniqueIdUnmodifiable>
<user>
<agentId/>
<apiAccessOnly>false</apiAccessOnly>
<customDateFormat/>
<customTimeFormat/>
<displayName>Verba Test User</displayName>
<eid>0000</eid>
<email>verbatest@verbalabs.com</email>
<environmentShortName>Ref.</environmentShortName>
<externalId/>
<id>36</id>
<language>en</language>
<locked>false</locked>
<loginName>verbatest</loginName>
<needChangePassword>false</needChangePassword>
<nonModifiable>false</nonModifiable>
<observerGroupId>0</observerGroupId>
<observerUserId>0</observerUserId>
<passwordExpires>false</passwordExpires>
<passwordHash>..........</passwordHash>
<timeZone>Europe/Budapest</timeZone>
<userType>user_type_verba</userType>
<validFrom>2015-09-03T11:56:00Z</validFrom>
<validTo>2099-12-31T00:00:00Z</validTo>
</user>
<validFromUnmodifiable>2015-11-20T16:23:33.887Z</validFromUnmodifiable>
<validUntilUnmodifiable>2099-12-31T00:00:00Z</validUntilUnmodifiable>
</groupMemberships>
<id>36</id>
<language>en</language>
<locked>false</locked>
<loginName>verbatest</loginName>
<needChangePassword>false</needChangePassword>
<nonModifiable>false</nonModifiable>
<observerGroupId>0</observerGroupId>
<observerUserId>0</observerUserId>
<passwordExpires>false</passwordExpires>
<roles>r_standard_user</roles>
<roles>r_system_administrator</roles>
<roles>r_system_supervisor</roles>
<timeZone>Europe/Budapest</timeZone>
<userType>user_type_verba</userType>
<validFrom>2015-09-03T11:56:00Z</validFrom>
<validTo>2099-12-31T00:00:00Z</validTo>
</user>
</return>
</ns2:createUserResponse>
</S:Body>
</S:Envelope>