UserManager_PUT
Creates or updates new users
Defined in: userManager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
UserManager_PUT(users, pretty)
PUT /wf/restapi/v2/admin/userManager: Creates new users or overwrites the user with the provided user object
|
Class Detail
UserManager_PUT(users, pretty)
PUT /wf/restapi/v2/admin/userManager: Creates new users or overwrites the user with the provided user object
- Parameters:
- users
- An array of user objects to create or update. These objects should have the same structure as collected from UserManager_GET. If you are creating a new user the "userId" attribute is not required, but it is required to update an existing user.
- pretty Optional, Default: false
- format the response to be human readable?
PUT /wf/restapi/v2/admin/userManager (Creating new users) Body form-data: users = [ { "lastName": "user_last", "substitutionMap": {}, "country": "USA", "city": "Minneapolis", "company": "", "state": "", "email": "", "zip": "55401", "ext": "", "address2": "", "address1": "", "dept": "Engineering", "firstName": "user", "phone": "", "middleName": "", "position": "vertical", "username": "user_1", "type": "Global Administrator", "status": "Active", "primaryGroup": 6, "groups": [ 0, 6, 8 ] }, { "username": "user_2" } ] Response: [ { "lastName": "user_last", "substitutionMap": {}, "country": "USA", "city": "Minneapolis", "company": "", "state": "", "email": "", "zip": "55401", "ext": "", "address2": "", "address1": "", "dept": "Engineering", "userId": 3, "firstName": "user", "phone": "", "middleName": "", "position": "", "username": "user_1", "type": "Global Administrator", "status": "Active", "groups": [ 0, 6, 8 ] }, { "substitutionMap": {}, "userId": 4, "username": "user_2", "type": "General User", "status": "Active", "groups": [] } ]
PUT /wf/restapi/v2/admin/userManager (Updating a user(user_1 id:3) from the last example. city, username, groups are updated) Body form-data: users = [ { "lastName": "user_last", "substitutionMap": {}, "country": "USA", "city": "Minneapolis", "company": "", "state": "Minnesota", "email": "", "zip": "55401", "ext": "", "address2": "", "address1": "", "dept": "Engineering", "userId": 3, "firstName": "user", "phone": "", "middleName": "", "position": "vertical", "username": "user 1", "type": "Global Administrator", "status": "Active", "primaryGroup": 6, "groups": [ 0, 6 ] } ] Response: [ { "lastName": "user_last", "substitutionMap": {}, "country": "USA", "city": "Minneapolis", "company": "", "state": "Minnesota", "email": "", "zip": "55401", "ext": "", "address2": "", "address1": "", "dept": "Engineering", "userId": 3, "firstName": "user", "phone": "", "middleName": "", "position": "", "username": "user 1", "type": "Global Administrator", "status": "Active", "groups": [ 0, 6 ] } ]