Description
This web service is used to add a new User to an organization.
Parameters
The following parameters are required in this web service.
organizationId: Defines the Organization Id of an Organization where a new user will be created.
username: Defines a unique username which will be created for a new user.
firstName: Defines the first name of a new user.
lastName: Defines the last name of a new user.
roles: Defines the list of GenRocket roles that can be assigned to a new user. List of available roles are - ROLE_USER, ROLE_ORG_ADMIN,ROLE_WEB_SERVICE.
Add New User curl command (Example)
curl --insecure -H "accept:application/json" -H "Content-Type:application/json" -H "X-Auth-Token:XXXXXXX" -d '{organizationId: "XXXXXXX-ddc9-481c-adad-XXXXXXXXXXXX",username: "email@email.com",firstName:"ABC",lastName:"XYZ",roles: ['ROLE_USER']}' https://app.genrocket.com/rest/user/createURL Request
https://app.genrocket.com/rest/user/create
Payload Request (Example)
{
organizationId:"xxxxxxxx-ddc9-481c-adad-xxxxxxxxxxx",
username:"email@email.com",
firstName:"ABC",
lastName:"XYZ",
roles:[
'ROLE_USER',
]
}The payload request must include X-Auth-Token in header which was received using manager login for sessionId verification.
Payload OK Response (Example)
{
"errors": { },
"fields": {
"externalId": "xxxxxxxxx-7001-4c4f-b5c8-xxxxxxxxxxxx",
"firstName": "ABC",
"lastName": "XYZ",
"username": "email@email.com",
"enabled": true,
"roles": [
"ROLE_USER"
]
},
"success": true
}