Creates a new user and role mapping.
post
/learn.rest/v1/learnCenters/{learnCenterId}/userRoles/{userRoleId}/users
Request
Supported Media Types
- application/json
Path Parameters
-
learnCenterId: number
Unique identifier of a LearnCenter.
-
userRoleId: number
Unique identifier of a user role.
User and role mapping object that needs to be created.
Root Schema : UserRolesMappingRequest
Type:
object
Object containing the user identifier parameters.
Show Source
Example:
{
"UserId":"995521"
}
Security
-
auth: basic
Type:
basic
Description:Basic Authentication
Response
Supported Media Types
- application/json
201 Response
New user and role mapping created.
Root Schema : UserRoleUserResponse
Type:
Show Source
object
-
createdDate(optional):
string
Example:
2019-02-04T10:46:21Z
-
links(optional):
array links
-
roleId(optional):
number
Example:
640
-
statusFlag(optional):
boolean
Example:
true
-
user(optional):
object user
-
userId(optional):
number
Example:
123123
-
userRole(optional):
object userRole
Nested Schema : links
Type:
Show Source
array
Example:
[
{
"rel":"canonical",
"href":"https://{url}/learn.rest/v1/learnCenters/178409/userRoles/123/users"
}
]
Nested Schema : links
Type:
Show Source
array
-
Array of:
object UserLinkItem
Object of the User Link Item.
Nested Schema : UserLinkItem
Type:
object
Object of the User Link Item.
Show Source
-
href(optional):
string
Example:
{url}/learn.rest/v1/users/456
-
rel(optional):
string
Example:
canonical
Example:
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users/456"
}
Nested Schema : UserRoleLinkItem
Type:
Show Source
object
Example:
{
"rel":"canonical",
"href":"https://{url}/learn.rest/v1/learnCenters/178784/userRoles/639"
}
400 Response
Request has incorrect syntax or does not contain a field that is required.
401 Response
Authentication refused for provided credentials or the token is invalid.
Headers
404 Response
Resource not found.
422 Response
Request may contain validation errors.
500 Response
Internal server error.