This API available for creating new user. You can create user through the HTTP POST method, URL http://<host>:<port>/catissuecore/rest/ng/users
Below are the attributes which need to be sent in the request body:
Parameter | Details |
---|---|
firstName | First name of the user |
middleName | Middle name of the user |
domainName[optional] | Name of the authentication domain . For providing domain name, domain should be already registered in application. By default its catissue in application |
emailAddress | Email Address of the user. This attribute should be unique in catissue application |
loginName | Login Name through which user can login to catissue application, should be unique in authentication domains |
siteNames | Name of the sites to which the user belongs |
roleName[optional] | Name if the roles which user has. It can be one or many, By default its scientist if nothing is provided |
cpTitles | Name of the collection protocols to which user belongs. |
activityStatus | Activity status of the user, permissible values are {active, closed, pending, disabled} |
deptName | Name of department to which user belongs |
comments [optional] | Comments on user given by admin while approval, By default it will be blank |
country | Country of which the user belongs |
state [optional] | State of which the user belongs, By default it will be blank |
city [optional] | City of which the user belongs, By default it will be blank |
zipCode [optional] | Zip Code of location which the user belongs, By default it will be blank |
phoneNumber [optional] | Phone number of the user, By default it will be blank |
faxNumber [optional] | Fax number of the user, By default it will be blank |
API Example :
URL | http://<host>:<port>/ catissuecore/rest/ng/users |
Method | POST |
Request | application/json |
json | { "lastName":"Piterson", "firstName":"Sam", "domainName":"catissue", "emailAddress":"sam.piterson@live.com", "loginName":"samPiterson", "siteNames":["My group", "New Site"], "roleNames" : ["adminstrator"], "cpTitles":["MyCp", "Test Cp"], "activityStatus":"Active", "deptName":"Department of onchology", "comments":"bla bla bla", "city":"Jalgaon", "state":"Maharashtra", "country":"India", "zipCode":"425022", "faxNumber":"434343AS", "phoneNumber":"654323" } |
Response | { |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | User has been created successfully |
400 | All requests | Invalid parameters, e.g duplicate Login Name, duplicate Email Address, blank First Name etc |
401 | All requests | Authorization failed, User doesn’t have Authority |
500 | All requests | Internal server error, Encountered server error while performing operations |