The following SOAP methods are provided specifically for user interaction.
getByUsername
Find user by username
EvalancheUser getByUsername( string username )
Details
Parameters
- string username: Username of the user to be searched for
Return value
- EvalancheUser: Object with the following attributes:
- int id: Id of the user
- int mandator_id: Id of the client. The value 0 signals a global user
Please note that global users who have switched to a client via the system interface are considered to be client users from that point on, and must set the parameter mandator_id
- string username: Username of the user
- string email: E-mail address of the user
- int salutation: Salutation of the user (0 = empty, 1 = woman, 2 = man)
- string firstname: First name of the user
- string name: Last name of the user
- string description: Description of the user
- int security_guideline_id: Id of the security policy to which the user is assigned
- int[] role_ids: List with IDs of roles to which the user belongs
- bool disabled: true if the user is deactivated
- password: Password of the user, here always the value *SCRAMBLED*
Required rights
Manage users
Use
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="https://scnem.com/soap.php/soap/user"> <soapenv
:Header/> <soapenv
:Body> <user:getByUsername>
<username>USERNAME>/username>
</user:getByUsername> </soapenv:
Body> </soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/user"> <SOAP-ENV
:Body> <ns1:
getByUsernameResponse> <getByUsernameResult>
<id>USER_ID</id>
<mandator_id>MANDATOR</mandator_id>
<username>USER_NAME>/username> <email>USER_EMAIL>/email>
<salutation>SALUTATION>/salutation>
<firstname>FIRSTNAME>/firstname> <name>NAME>/name>
<description>DESCRIPTION>/description>
security_guideline_id>SECURITY_GUIDLINE_ID</security_guideline_id> <role_ids>
<item>ROLE_ID</item>
[.
..]
</role_ids> <disabled>DISABLED>/disabled>
<password>*SCRAMBLED*</password>
</getByUsernameResult> </ns1:
getByUsernameResponse> </SOAP-ENV
:Body> </SOAP-ENV:Envelope>
getAll
Read out list of all users
EvalancheUser[] getAll( int mandator_id )
Details
Parameters
- int mandator_id: Id of the client whose users are to be returned The value 0 returns global users
Please note that global users who have switched to a client via the system interface are considered to be client users from that point on and ignore the mandator_id parameter until the global user has switched back to the "Global Overview" via the system interface.
Return value
- EvalancheUser[]: Find list of objects analogous to user by user name
Required rights
Manage users
Use
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="https://scnem.com/soap.php/soap/user"> <soapenv
:Header/> <soapenv
:Body> <user:getAll> <mandator_id>MANDATOR_ID</mandator_id>
</user:getAll> </soapenv:Body> </soapenv
:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/user"> <SOAP-ENV
:Body> <ns1:
getAllResponse> <getAllResult>
<item> <id>USER_ID</id>
<mandator_id>MANDATOR</mandator_id>
<username>USER_NAME>/username> <email>USER_EMAIL>/email>
<salutation>SALUTATION>/salutation>
<firstname>FIRSTNAME>/firstname> <name>NAME>/name>
<description>DESCRIPTION>/description>
security_guideline_id>SECURITY_GUIDLINE_ID</security_guideline_id> <role_ids>
<item>ROLE_ID</item>
[.
...]
</role_ids> <disabled>DISABLED</disabled>
<password>*SCRAMBLED*</password>
</item> [...] </getAllResult>
</ns1:getAllResponse>
</SOAP-ENV:Body> </SOAP-ENV
:Envelope>
update
Update user data and create users
EvalancheUser update( EvalancheUser user )
Details
Parameters
- EvalancheUser: Find user data analog to the return value under User by means of the user name. If the attribute id is 0, a new user is created. A locally existing security policy must be selected. If necessary, this must first be created.
Return value
- EvalancheUser: Find object analogous to user by user name
Required rights
Manage users
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="https://scnem.com/soap.php/soap/user"> <soapenv
:Header/> <soapenv:
Body> <user:update> <user>
<!
--You may enter the following 12 items in any order--> <id>USER_ID</id>
<mandator_id>MANDATOR_ID</mandator_id>
<username>USERNAME>/username>
<email>USER_EMAIL</email> <salutation>SALUTATION<
/salutation> <firstname>FIRSTNAME>/firstname>
<name>NAME>/name>
<description>DESCRIPTION>/description>
<security_guideline_id>SECURITY_GUIDLINE_ID>/security_guideline_id>
<role_ids> <!
--Zero or more repetitions:--> <item>ROLE_ID</item>
</role_ids> <disabled>DISABLED</disabled>
<password>NEW_PASSWORD</password>
</user> </user:
update> </soapenv
:Body> </soapenv
:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/user"> <SOAP-ENV
:Body> <ns1:
getByUsernameResponse> <getByUsernameResult>
<id>USER_ID</id>
<mandator_id>MANDATOR</mandator_id>
<username>USER_NAME>/username> <email>USER_EMAIL>/email>
<salutation>SALUTATION>/salutation>
<firstname>FIRSTNAME>/firstname> <name>NAME>/name>
<description>DESCRIPTION>/description>
security_guideline_id>SECURITY_GUIDLINE_ID</security_guideline_id> <role_ids>
<item>ROLE_ID</item>
[.
..]
</role_ids> <disabled>DISABLED>/disabled>
<password>*SCRAMBLED*</password>
</getByUsernameResult> </ns1:
getByUsernameResponse> </SOAP-ENV
:Body> </SOAP-ENV:Envelope>