Get All Users
'Get All Users' returns a list of both Leapwork and Active Directory users. The returned list of users will give access to UserName, FullName, UserType, and Ids of the users in the system. We can also retrieve the name and number of the teams in which the user is a member. Along with this the last active time and date of the user can be retrieved.
Request URL
(GET) http://{controllerMachine}:{controllerPort}/api/v4/user/all
Input parameters
Field |
Type |
Description |
Comment |
accessKey |
string |
An access key is required to restrict unauthorized access to the API. |
Access Key should include user scope to access user related APIs. |
Examples
Curl
curl -X GET --header 'Accept: application/json' --header 'accessKey: UsctfG8Mg1LVa29L' 'http://localhost:9001/api/v4/user/all'
PowerShell
$headers = @{} $headers.Add("accessKey","UsctfG8Mg1LVa29L")
Invoke-WebRequest -Uri " http://localhost:9001/api/v4/user/all" -
ContentType "application/json" -Headers $headers -Method GET
Response object
Field |
Type |
Description |
Values |
$id |
string |
ID of internal object |
|
Id |
string |
Unique Id of User (UserId) |
|
UserName |
string |
Unique name of the user |
|
FullName |
string |
Full name of the user |
|
UserType |
string |
Type of user |
Leapwork, ActiveDirectory |
Response Code
200 (OK)
401 (Unauthorized - eg: “Incorrect Accesskey”)
403 (Forbidden – eg: “AccessKey does not have the relevant scope permission”)
500 (Internal Server Error)