updateRole

put

/ccstore/v1/roles/{id}

Update Role. Updates a given role by ID.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : updateRole_request
Type: object
Show Source
Example:
{
    "name":"Custom Role",
    "description":"Custom Role",
    "accessRights":[
        {
            "repositoryId":"customAccessRight1"
        },
        {
            "repositoryId":"customAccessRight2"
        }
    ]
}
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)
{
    "function":"custom",
    "relativeTo":{
        "id":"or-100001",
        "externalOrganizationId":null
    },
    "name":"Custom Role",
    "repositoryId":"customOrganizationalRole",
    "description":"Custom Role",
    "id":"customOrganizationalRole",
    "accessRights":[
        {
            "displayName":"Custom Access Right 1",
            "name":"Custom Access Right 1",
            "repositoryId":"ar-100001",
            "description":"Custom Access Right 1",
            "id":"ar-100001",
            "type":"generic"
        },
        {
            "displayName":"Custom Access Right 2",
            "name":"Custom Access Right 2",
            "repositoryId":"ar-100002",
            "description":"Custom Access Right 2",
            "id":"ar-100002",
            "type":"generic"
        }
    ],
    "type":"organizationalRole"
}

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| |------------------|------------------| |22048|If input passed is invalid| |22100|If prohibited access rights are being added to an organization-based role| |22101|If mandatory access rights are being removed from an organization-based role| |22102|If an organization-based role is updated with global privileges| |221000|If you are not authorized to perform a role update|
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