Help Center>Foundation Help

Users API

This API enables you to get details about users. These details are tabulated below.

Name Description Type Indexed  
UID Unique ID of a user. Integer Y
Name User Login ID String Y
Salutation User’s salutation String  
Suffix User’s suffix  - Either Jr. or Sr. String  
FirstName User’s first name String  
MiddleName User’s middle name String  
LastName User’s last name String  
FullName User’s full name. Format: FirstName MiddleName LastName String  
Email User’s email ID String  
UserFunctionalArea User’s functional area String  
UserOrganizationalLevel User’s organizational level String  
Deleted This returns true if the user is deleted in the LMS application, else false true/false Y
SecondaryEmail User’s secondary email String  
SAPUserName User’s SAPUserName String Y
ManagerID User’s manager ID. Customer must set up this field. By default, this is null. Integer Y
CreatedbyUser Login name of the person who created the user. String  
CreatedDateTime Date and time when the user was created. datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.  
DirectPhone User’s direct phone  String  
SecondaryPhone User’s secondary phone   String  
Region User’s region name. Would be null in version 12.0 String Y

Note: Administrators can get user details for filtering from the Users > Manage Users / Groups.

Endpoints and Methods

HTTP Method only GET is implemented.

  • Route: /v1/users – Get all users.
  • Route: /v1/users/{uid} – Get data about a particular user.
  • Route: /v1/users/managers - Get all managers.

URL

The URL is as follows: <<host>>/dwapi/v1/users

Query Parameters, Descriptions, and Examples

Select

$select: This query option specifies that only the requested properties are returned. Use commas to specify multiple properties.

For example -

You can get only the UID from users’ data by the following:

/dwapi/v1/users?$select=UID

Filter

$filter: This query option restricts the data to be returned for the requested resource.

You can use the following to further specify your results:

  • Built-in Filter Operations
    • Comparison operators – eq Equal, ne Not equal etc.
    • Logical operators – and Logical and, or Logical or, not Logical negation.
    • Arithmetic operators – add Addition, sub Subtraction etc.
    • Grouping operators – () Precedence grouping
  • Built-in Query Functions
    • String Functions – contains, endswith etc.
    • Date Functions – year, month, day etc.
    • Match Functions – round, floor etc.

For example -

You can restrict to get the users from a particular User Functional Area by the following:

/dwapi/v1/users?$filter= UserFunctionalArea eq 'HR'

Orderby

$orderby: This query option requests the service to return the result set in the specified order requested.

This parameter can include asc for asending or desc for descending. Default is ascending if not specified.

For Example -

You can get the users in ascending order on created date time by the following: /dwapi/v1/users?$orderby=CreatedDateTime

$top and $skip

$top: This query option limits the items from result set.

$skip: This query option excludes the first n items from the result set.

Using $orderyby with $top and $skip results in more consistent data.

getcount

/getcount: This gets the count of result set or data queried. $filter can be used with getcount to know the count of filters result set.

This is not an Odata standard operation, it is only for the Foundation APIs.

For example -

You can choose to get a count of users by the following:

/dwapi/v1/users/getcount