Add a user
Available in versions: 2020 SP3 and later
Description
Creates a new user.
URL
/Admin/rest/v1/usersRemarks
Site Admin can create admins of any permission level.
Tenant Admin cannot create Site Admin, Admin Viewer, and Application Admin.
User Admin can create regular users and User Admins, and cannot assign users to projects.
Application and Project Admins are not permitted to create any user; they can only assign users to projects with performance test roles.
HTTP method
POST: Creates a new user.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Cookies:
ADM_LWSSO={AdmLwssoCookie};
Request body:
An XML or JSON describing the user.
The request contains the following field.
| Element | Description |
|---|---|
| UserName | The user's name. |
| FullName | The user's full name. |
| Status | The user's status: active or inactive. |
| The user's email address. | |
| Password | The user's password encoded in base64. |
| Description | A description of the user. |
| Permission level | 1. Regular user 3. Admin Viewer 4. User Admin 5. Application Admin 6. Project Admin 7. Tenant Admin 9. Site Admin |
| LDAPUserName | The LDAP user name. |
| UsDomAuth | The user domain authentication. |
| UsIsLDAP | Specifies whether the user is LDAP: true or false. |
Request examples:
POST http://<LRE_Server>/Admin/rest/v1/users
Content-Type: application/xml
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};
<User>
<UserName>usApi</UserName>
<FullName>User Api</FullName>
<Status>active</Status>
<Password>c2E=</Password>
<PermissionLevel>3</PermissionLevel>
<LDAPUserName>ldapUserName</LDAPUserName>
<UsDomAuth></UsDomAuth>
<UsIsLDAP>false</UsIsLDAP>
</User>POST http://<LRE_Server>/Admin/rest/v1/users
Content-Type: application/json
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};
{
"UserName": "lre_user_3",
"FullName": "User Api",
"Status": "inactive",
"Email": "email@mail.com",
"Password": "VzNsY29tZTFfYWJj",
"PermissionLevel": "1",
"LDAPUserName": "",
"UsDomAuth": "",
"UsIsLDAP": "false",
"Description": "it works"
}Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Cookies:
None
HTML Return Code:
One of the HTTP return codes.
Upon successful creation of user, returns HTTP status 201 (Created).
HTML body:
Returns data on the new user entity in the response.
Response examples:
<User>
<ID>24</ID>
<UserName>lre_user_4</UserName>
<FullName>User Api</FullName>
<Status>inactive</Status>
<LastUpdateDate>2024-04-17T08:08:40.6883111+00:00</LastUpdateDate>
<TenantAdmin>false</TenantAdmin>
<SiteAdmin>false</SiteAdmin>
<AdminViewer>false</AdminViewer>
<Email>email@mail.com</Email>
<Description>it works</Description>
<PermissionLevel>1</PermissionLevel>
<UsIsLDAP>false</UsIsLDAP>
<LDAPServerId>0</LDAPServerId>
<LDAPUserName />
</User>{
"ID": 23,
"UserName": "lre_user_3",
"FullName": "User Api",
"Status": "inactive",
"LastUpdateDate": "2024-04-17T08:04:32.3611617+00:00",
"TenantAdmin": false,
"SiteAdmin": false,
"AdminViewer": false,
"Email": "email@mail.com",
"Description": "it works",
"PermissionLevel": 1,
"UsIsLDAP": false,
"LDAPServerId": 0,
"LDAPUserName": "",
"UsDomAuth": "",
"AdditionalData": null
}
See also:

