API Reference

Users

Users

findUsers

Query for users

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
LoginNameStringSearch string for a user's login name
AuthServerStringSignature of the authentication server, as given by getAuthServers
NameStringSearch string for the user's name
EmailStringSearch string for the user's email
UsersAllowedToLoginOnlyBooleanFlag to indicate whether to include all users, or only users that have login permissions
SortOrderStringThe sorting order for the users matching the query
IncludeObjectNamesBooleanFlag to indicate whether to include object names or not on the return
BeginIndexIntIndex of the first user to return (for pagination)
NumberOfUsersIntMaximum number of users to return (capped at 1000 per query, use BeginIndex to paginate over the users)

Returns

ReturnTypeDescription
UsersUser[]Array of users matching the query
TotalNumOfUsersIntTotal number of users matching the query

Example

Request

<tns:loginname>admin</tns:loginname>
<tns:authserver></tns:authserver>
<tns:name></tns:name>
<tns:email></tns:email>
<tns:usersallowedtologinonly>true</tns:usersallowedtologinonly>
<tns:sortorder></tns:sortorder>
<tns:beginindex>0</tns:beginindex>
<tns:numberofusers>100</tns:numberofusers>

getUsers

Get users by usernames and authentication servers

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
UsersUser[]Array of usernames and authentication servers

Returns

ReturnTypeDescription
UsersUser[]Array of the requested users

Example

Request

<tns:users>
  <user>
    <loginname>admin</loginname>
    <authserver>timeedit</authserver>
  </user>
</tns:users>

getUserSortOrders

Get available user sort orders

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key

Returns

ReturnTypeDescription
SortOrdersString[]Array of available sort orders for users

Example

Request

-

getAuthServers

Get available authentication servers

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
ActiveOnlyBooleanFlag to indicate whether to only include active authentication servers

Returns

ReturnTypeDescription
AuthServersAuthServer[]Array of available authentication servers

Example

Request

-

getPermissions

Get permissions for the authenticated user

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key

Returns

ReturnTypeDescription
PermissionsPermission[]Array of permissions for the authenticated user

Example

Request

-

validateUsers

Validate new users without importing them

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
UsersUser[]Array of users to validate

Returns

ReturnTypeDescription
StatusStatus[]Array of validation status per user. A status of 0 indicates the user was successfully validated

Example

Request

<tns:users>
    <user>
        <loginname>kalle</loginname>
        <authserver>timeedit</authserver>
        <firstname>Kalle</firstname>
        <lastname>Testsson</lastname>
        <email>[email protected]</email>
        <phone>031-123456</phone>
        <changepassword>true</changepassword>
        <language/>
        <dateformat/>
        <timezone/>
        <dst/>
        <allowlogin>true</allowlogin>
        <standardorganization>timeedit;admin</standardorganization>
        <orgroles>
            <orgrole>timeedit=Admin</orgrole>
        </orgroles>
        <permissions>
            <permission>client</permission>
            <permission>periods</permission>
        </permissions>
        <organizations>
            <organization>timeedit;admin</organization>
        </organizations>
    </user>
</tns:users>

importUsers

Import users

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
UsersUser[]Array of users to import

Returns

ReturnTypeDescription
StatusStatus[]Array of import status per user. A status of 0 indicates the user was successfully imported

Example

Request

<tns:users>
    <user>
        <loginname>anders</loginname>
        <authserver>timeedit</authserver>
        <firstname>Anders</firstname>
        <lastname>Svensson</lastname>
        <email>[email protected]</email>
        <phone/>
        <changepassword>false</changepassword>
        <language/>
        <dateformat/>
        <timezone/>
        <dst/>
        <allowlogin>true</allowlogin>
        <defaultobjects>a467949c-1ced-46f6-b4ba-289a5ee709c6</defaultobjects>
        <standardorganization>all_teachers</standardorganization>
        <orgroles>
            <orgrole>oAdmin=scheduler</orgrole>
        </orgroles>
        <permissions>
            <permission>client</permission>
        </permissions>
        <organizations>
            <organization>all_teachers</organization>
        </organizations>
        <description/>
    </user>
</tns:users>

exportUsers

Export users

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
UsersUser[]Array of usernames and authentication servers to export

Returns

ReturnTypeDescription
UsersUser[]Array of users requested

Example

Request

<tns:users>
  <user>
    <loginname>anders</loginname>
    <authserver>timeedit</authserver>
  </user>
</tns:users>

deleteUsers

Delete users

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
UsersUser[]Array of users (usernames and authentication servers) to delete
InactivateBooleanFlag to indicate whether the user should be inactivated if it couldn't be deleted

Returns

ReturnTypeDescription
StatusStatus[]Array of statuses for the deletion request

Example

Request

<tns:users>
  <user>
    <loginname>anders</loginname>
    <authserver>timeedit</authserver>
  </user>
</tns:users>
<tns:inactivate>false</tns:inactivate>

getCurrentUserObjects

Get objects associated with the authenticated user

Parameters

ParameterTypeDescription
LoginLoginObjectStandard login object with username, password, and application key
TypesType[]Array of types to filter user objects on

Returns

ReturnTypeDescription
UserObjectsUserObjects[]Array of objects of the specified type(s) associated with the authenticated user

Example

Request

<tns:types>
  <type>room</type>
</tns:types>