Get user by ID
Description
Gets a user, specified by the user ID, from the system (available in versions 2020 SP3 and later).
You can also add an additional parameter ("include=user-role"
) to return user project and project role assignments. This parameter is available in LoadRunner Enterprise 2023 and later. The user role response is supported as JSON only; XML is not currently supported.
URL
/Admin/rest/v1/users/{userID}?include=user-roles
Remarks
None
HTTP Method
GET: Returns a user specified by ID.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Cookies:
ADM_LWSSO={AdmLwssoCookie};
Request Body:
None
![Closed](../Skins/Default/Stylesheets/Images/transparent.gif)
GET http://<LRE_Server>/Admin/rest/v1/users/2
Content-Type: application/xml
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};
GET http://<LRE_Server>/Admin/rest/v1/users/2?include=user-roles
Content-Type: application/xml
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};
Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Cookies:
None
HTML Return Code:
One of the HTTP Return Codes.
HTML Body:
The fields in the response are:
Element | Description |
---|---|
UserID | The user's ID. |
UserName | The user's name. |
FullName | The user's full name. |
Status | The user's status: active or inactive. |
DeactivationDate | The date when user's status was set to inactive. |
LastUpdateDate | The date when the user was last updated. |
TenantAdmin | Specifies whether the user is a tenant admin: true or false. |
SiteAdmin | Specifies whether the user is a site admin: true or false. |
AdminViewer | Specifies whether the user is an admin viewer: true or false. |
The user's email address. | |
Description | A description of the user. |
Permission level | 1. Regular user 3. Admin Viewer 7. Tenant Admin 9. Site Admin 10. System Admin |
AdditionalData | Optional fields that return the user's project and project role assignments when UsersRoles
Note: These fields remain empty if the user was not assigned to any project. |
UsIsLDAP | Specifies whether the user is LDAP: true or false. |
LDAPServerID | The LDAP server ID. |
LDAPUserName | The LDAP user name. |
UsDomAuth | The user domain authentication. |
![Closed](../Skins/Default/Stylesheets/Images/transparent.gif)
<User>
<ID>3</ID>
<UserName>rnd_admin</UserName>
<FullName>LRE Admin User</FullName>
<Status>active</Status>
<LastUpdateDate>2023-03-04T04:09:31.069313</LastUpdateDate>
<TenantAdmin>false</TenantAdmin>
<SiteAdmin>true</SiteAdmin>
<AdminViewer>false</AdminViewer>
<Email />
<Description>LRE Admin User created during installation</Description>
<PermissionLevel>10</PermissionLevel>
<UsIsLDAP>false</UsIsLDAP>
<LDAPServerId>0</LDAPServerId>
<LDAPUserName />
<UsDomAuth />
</User>
[
{
"ID": 3,
"UserName": "sa",
"FullName": "LRE Admin User",
"Status": "active",
"LastUpdateDate": "2024-04-21T21:44:51.8016877",
"TenantAdmin": false,
"SiteAdmin": true,
"AdminViewer": false,
"Email": "",
"Description": "LRE Admin User created during installation",
"PermissionLevel": 10,
"UsIsLDAP": false,
"LDAPServerId": 0,
"LDAPUserName": "",
"UsDomAuth": "",
"AdditionalData": null
},
{
"ID": 4,
"UserName": "auto_user_okj0egqe52o",
"FullName": "Automation User",
"Status": "active",
"TenantAdmin": false,
"SiteAdmin": false,
"AdminViewer": false,
"Email": "automation@lre.com",
"Description": "Created by automation",
"PermissionLevel": 1,
"UsIsLDAP": false,
"LDAPServerId": 0,
"LDAPUserName": "",
"UsDomAuth": "",
"AdditionalData": null
}
]
<User>
<ID>255</ID>
<UserName>qatest</UserName>
<FullName/>
<Status>active</Status>
<LastUpdateDate>2023-03-04T04:09:31.069313</LastUpdateDate>
<TenantAdmin>false</TenantAdmin>
<SiteAdmin>false</SiteAdmin>
<AdminViewer>false</AdminViewer>
<Email/>
<Description/>
<PermissionLevel>1</PermissionLevel>
<UsIsLDAP>false</UsIsLDAP>
<LDAPServerId>0</LDAPServerId>
<LDAPUserName></LDAPUserName>
<UsDomAuth></UsDomAuth>
<AdditionalData>
<UsersRoles>
<Domain>Default</Domain>
<Role>Admin</Role>
<ProjectName>Project_1</ProjectName>
<ProjectID>7</ProjectID>
</UsersRoles>
<UsersRoles>
<Domain>Default</Domain>
<Role>Viewer</Role>
<ProjectName>Project_2</ProjectName>
<ProjectID>58</ProjectID>
</UsersRoles>
</AdditionalData>
</User>
{
"ID": 3,
"UserName": "sa",
"FullName": "LRE Admin User",
"Status": "active",
"LastUpdateDate": "2024-04-21T21:44:51.8016877",
"TenantAdmin": false,
"SiteAdmin": true,
"AdminViewer": false,
"Email": "",
"Description": "LRE Admin User created during installation",
"PermissionLevel": 10,
"UsIsLDAP": false,
"LDAPServerId": 0,
"LDAPUserName": "",
"UsDomAuth": "",
"AdditionalData": [
{
"UsersRoles": [
{
"Domain": "DEFAULT",
"ProjectName": "LAB_PROJECT",
"ProjectID": "1",
"Role": "Site Admin"
},
{
"Domain": "DEFAULT",
"ProjectName": "AUTOMATION_PROJECT_2024_3",
"ProjectID": "22",
"Role": "Performance Tester"
},
{
"Domain": "DEFAULT",
"ProjectName": "project_chaos_vTDSx",
"ProjectID": "27",
"Role": "Performance Tester"
},
{
"Domain": "DEFAULT",
"ProjectName": "project_chaos_QIhDA",
"ProjectID": "28",
"Role": "Performance Tester"
}
]
}
]
}
See Also
Add a user
Update a user
Delete a user
Assign project and role to user
Get all users
Get list of users by query