addUserRoles

post

/ccadmin/v1/profiles/{id}/addRoles

add User Roles. This operation is used to add the roles for the profile w.r.t the associations specified.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : addRoles_request
Type: object
Show Source
Example:
{
    "roles":[
        {
            "associations":[
                {
                    "relatedItemId":"or-100001",
                    "type":"organization"
                }
            ],
            "id":"role-100001"
        },
        {
            "associations":[
                {
                    "relatedItemId":null,
                    "type":"global"
                }
            ],
            "id":"role-100002"
        }
    ]
}
Nested Schema : roles
Type: array
List of roles to associate with the user.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : associations
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
  • It is the organization id to which role is associated. If the role is to be assigned in organization scope the relatedItemId is required and if the role is global scope then it should be null
  • If the role is to be assigned in organization scope the type is (organization) and if the role is global scope the type is (global).
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : addRoles_response
Type: object
Show Source
Example Response (application/json)
{
    "success":true,
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadminui/v1/profiles/bb-110000/addRoles"
        }
    ]
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |22019|If some internal error occurs while adding roles to the user.| |22020|If roles provided is empty or null. |13037|If the required property is missing in the request. |22055|If roles provided is not in correct format.| |89014|If roles provided contains an accessRight with privilege.| |22002|If profile id passed is invalid.|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top