Location: Optional Features > API > API Endpoints > userRoleAdd
userRoleAdd HomeBack Next

Adds an LCMS user to a given role or roles, in a project.

URL
ll_lcms/api/userRoleAdd
Method
GET / POST or JSON
URL Parameters

 Required:

 token=[string as defined in LCMS Application Preferences]
 username=[string, max length 200, accepts alphanumeric and underscores]
 role=[comma delimited string list of one or more valid roles *See /roleNames]
 project_code=[project code user to be assigned to *See /projectCodes]

Success Response:

LCMS_U~1_img1104

Error Response

LCMS_U~1_img1108

 

Sample Call (GET)
 

 ll_lcms/api/userRoleAdd/?token=xxx&username=jsmith&role=Developer&project_code=XYZ
 

Note: Both a role name and project code must be specified. Role name can be a list of roles separated by commas. Rather than listing each individual possible error message, only one example is shown above. The "detail" value will only appear if a coding error is detected, i.e. database error.