createRole

post

/ccadmin/v1/roles

Create Role. Creates a new role.

Request

Supported Media Types
Query Parameters
Body ()
Root Schema : createRole_request
Type: object
Show Source
Example:
{
    "name":"Custom Role 1",
    "repositoryId":"customRole1",
    "description":"Custom Role 1",
    "accessRights":[
        {
            "repositoryId":"customAccessRight"
        }
    ]
}
Nested Schema : accessRights
Type: array
Access rights to assign to role
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : getRole_response
Type: object
Show Source
Nested Schema : accessRights
Type: array
Access rights assigned to role
Show Source
Nested Schema : relativeTo
Type: object
Related organization for organizationRole
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "name":"Custom Role",
    "repositoryId":"customRole",
    "description":"Custom Role",
    "id":"customRole",
    "accessRights":[
        {
            "displayName":"Custom Access Right 1",
            "name":"Custom Access Right 1",
            "repositoryId":"customAccessRight1",
            "description":"Custom Access Right 1",
            "id":"customAccessRight1",
            "type":"generic"
        }
    ],
    "type":"role"
}

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| |------------------|------------------| |22047|If input 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