Page tree
Skip to end of metadata
Go to start of metadata

Experitest allows Cloud and Project Admins to manage users using Rest API. This page describes supported RestAPI'sfor managing users.

The role of the user performing the Rest Operation is specified by the Authorization header.

For more information please visit How To Execute Rest API, for a detailed example.

Gets all the Users

Gets all the users.

  • This API can only be used by Cloud Admin or Project Admin.
  • Project Admin will get all the users in his project.
  • Cloud Admin will get all the users from all projects.
GET  /api/v1/users
Get Users Response
Response: Status 200 OK
{
    "status": "SUCCESS",
    "data": [
        {
            "id": 1,
            "userName": "admin",
            "firstName": "admin",
            "lastName": "admin",
            "email": "onlinecloud@experitest.com",
            "created": 0,
            "role": "Admin",
            "authenticationType": "BASIC",
            "lastAuthentication": "2019-12-23T10:20:57.291Z"
        },



Creates a new user

Creates a new user in the cloud, required Project Admin or Cloud Admin permission.

  • This API can only be used by Cloud Admin or Project Admin.
POST  /api/v1/users/new


Parameters

Name

Type

Mandatory

Description

usernameStringYesIdentifier of the user
firstNameStringYesFirst name of the user
lastNameStringYesLast name of the user
emailStringYesEmail of the user
projectStringNo

Project id to add this user to

If the parameter is not provided then the user will be added to the Default project.

Note: Cloud Admin can only be added to the Default project.


roleStringYes
  • Admin (required Cloud Admin permission)
  • ProjectAdmin
  • User


passwordStringNo

The password must be between 7-25 characters, at least one uppercase letter,

at least one lowercase letter, and at least one digit. The password must contain only valid

characters (a-z,A-Z,0-9,_,-,.,@,#,*,$,!,?,%,~,SPACE). The password must not contain leading or trailing spaces.

Only Admin role can use this option, the blank password will do the same process of generating a random password.


Create User Response
{"status":"SUCCESS","data":{"notification":"\u003cp\u003eThe temporary password of the user is: \u003cb\u003eF2rhzN8\u003c/b\u003e\u003c/p\u003e\u003cp\u003ePlease provide this temporary password to the user \u003cb\u003etestqa\u003c/b\u003e by a secured way.\u003cbr/\u003eThe user should login with this password and change it.\u003c/p\u003e\u003cp\u003eThe temporary password is valid for the next 100 years.\u003c/p\u003e","id":"2263818","tempPassword":"F2rhzN8","users":"User added successfully"},"code":"OK"}


Deleting a user

Deletes a user in the cloud, required Project Admin or Cloud Admin permission.

  • This API can only be used by Cloud Admin or Project Admin
POST  /api/v1/users/{userid}/delete

{userid} - userid of the user

Note: userid can be retrieved using Get users Rest API.

Deleting User Response
Response: Status 200 OK
{"status":"SUCCESS","data":{"users":"User deleted successfully"},"code":"OK"}


  • No labels