Web Service Method: Create a New User
Web Service Method: Create a New User
Description |
---|
Creates a new user on a PoolParty server. |
Note
This is the equivalent service of using the user interface: Create a New User
You can only create users when the server uses https.
URL: /PoolParty/api/user/addUser
Request
Supported Methods |
---|
POST |
application/json
Note
This service consumes a JSON object, starting with version 5.5.
Before that, simple strings as http parameterswhere used to ship data to the service.
Request object to define a new user.
Attribute | Type | Required | Comment |
---|---|---|---|
name | String | true | Unique user name, used for authentication in PoolParty. NoteYou will receive an error message in case the username is already in use. |
password | String | true | Password for the user. The password has to meet the password requirements. |
fullname | String | false | Full name of the user. This field is only used for presentation purposes. Usually, this field consists of first and last name. |
groups | Array of Strings | false | List of groups that should be assigned to the user. |
roles | Array of Strings | false | List of roles that should be assigned to the user. Possible values:
|
uri | URI | false | The URI of the user. If you do not provide a URI, the used URI will follow this pattern: NoteThe URI is treated as unique in PoolParty. When you define a user URI that already exists, the new URI will be modified to guarantee uniqueness. |
http status code 200if OK.
Basic Pattern
POST https://<server-url>/PoolParty/api/user/addUser Content-Type: application/json { "name": "<name_of_user>", "password": "<password>", "fullname" : "<full_name_of_user>", "groups" : [ "<group>" ], "roles" : [ "<role>" ], "uri" : { "uri": "<uri_of_user>" } }
Example
The following screenshot shows the creation of a user in PoolParty using Postman: