Create a User

Create a new Zephyr Enterprise user.

Use the following operation to create a new user in Zephyr Enterprise:

POST /flex/services/rest/latest/user

Request format

To create a user, send a POST request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/latest/user

Request body

#Create a user whithout a role { "firstName": "John", "lastName": "Smith", "email": "John.Smith@smartbear.com", "username": "John.Smith", "accountEnabled": true, "credentialsExpired": false, "isCustomizeUsername": null }
#Create a user with a role { "firstName": "John", "lastName": "Smith", "email": "John.Smith@smartbear.com", "username": "John.Smith", "accountEnabled": true, "credentialsExpired": false, "isCustomizeUsername": null, "roles":[ {"id":5,"name":"dashboard"}, {"id":106,"name":"Administration Role "} ] }

Response body

{ "id": 11, "username": "John.Smith", "firstName": "John", "lastName": "Smith", "email": "John.Smith@smartbear.com", "accountEnabled": true, "accountExpired": false, "credentialsExpired": false, "roles": [], "userType": 0, "chargeableFlag": true, "onlyLoggedInUser": false, "groupSet": [], "countAttempts": 0, "isInternal": true, "fullName": "John Smith" }

Assign a role to the user (or update data of an existing user).

Use the following operation to assign the role to the user:

PUT /flex/services/rest/v3/user/{user ID}

{user ID} - the ID of the Zephyr Enterprise user.

Request format

To assign the role to the user, send a PUT request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/v3/user/{user ID}

Request body

See Also

Migration REST API