Create a User
Create a new user in Zephyr Enterprise
POST http(s)://{ZEPHYR-SERVER}/flex/services/rest/latest/user
Request body
Create a user without a role:
{ "firstName": "John", "lastName": "Smith", "email": "[email protected]", "username": "John.Smith", "accountEnabled": true, "credentialsExpired": false, "isCustomizeUsername": null }
Create a user with a role:
{ "firstName": "John", "lastName": "Smith", "email": "[email protected]", "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": "[email protected]", "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)
PUT http(s)://{ZEPHYR-SERVER}/flex/services/rest/v3/user/{user ID}
where {user ID}
is the ID of the Zephyr Enterprise user.
Request body
{ "firstName":"John", "lastName":"Smith", "type":"", "roles":[ {"id":5,"name":"dashboard"}, {"id":106,"name":"Administration Role "} ], "email":"[email protected]", "username":"John.Smith", "accountEnabled":true, "credentialsExpired":true, "id":10, "isCustomizeUsername":null, "userType":0, "chargeableFlag":true, "groupSet":[] }