listRoles associated with a profile

get

/ccadmin/v1/profiles/{id}/roles

List Roles. Get all roles associated for shoppers.

Request

Supported Media Types
Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : getRoles_response
Type: object
Show Source
Example:
{
    "roles":[
        {
            "associations":[
                {
                    "relatedItemId":"or-100001",
                    "type":"organization"
                }
            ],
            "repositoryId":"100037",
            "name":"Buyer",
            "description":null,
            "id":"role-100001",
            "accessRights":[
            ],
            "type":"organizationalRole",
            "category":{
                "displayName":"Storefront Roles",
                "repositoryId":"storefrontRoleCategory",
                "id":"storefrontRoleCategory"
            }
        },
        {
            "associations":[
                {
                    "relatedItemId":null,
                    "type":"global"
                }
            ],
            "name":"testRole",
            "description":"testRole",
            "id":"role-100002",
            "accessRights":[
                {
                    "displayName":"Sample AccessRight",
                    "repositoryId":"300001",
                    "name":"Sample AccessRight",
                    "id":"Sample AccessRight",
                    "type":"generic"
                }
            ],
            "type":"role",
            "category":{
                "displayName":"Custom Roles",
                "repositoryId":"customRoleCategory",
                "id":"customRoleCategory"
            }
        }
    ]
}
Nested Schema : properties
Type: array
list of roles associated with the profile
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : accessRights
Type: array
Access rights assigned to role
Show Source
Nested Schema : associations
Type: array
Show Source
Nested Schema : category
Type: object
Category of the role
Show Source
Nested Schema : relativeTo
Type: object
Related organization for organizationRole
Show Source
Nested Schema : items
Type: object
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).
Example Response (application/json)
{
    "total":2,
    "totalResults":2,
    "offset":0,
    "limit":250,
    "items":[
        {
            "associations":[
                {
                    "relatedItemId":"or-100001",
                    "type":"organization"
                }
            ],
            "function":"admin",
            "relativeTo":{
                "repositoryId":"or-100001"
            },
            "repositoryId":"100001",
            "name":"Administrator",
            "description":null,
            "id":"100001",
            "accessRights":[
                {
                    "displayName":null,
                    "repositoryId":"updateAccountAddress",
                    "name":"Update Account Address",
                    "id":"updateAccountAddress",
                    "type":"generic"
                },
                {
                    "displayName":null,
                    "repositoryId":"createAccountAddress",
                    "name":"Create Account Address",
                    "id":"createAccountAddress",
                    "type":"generic"
                }
            ],
            "type":"organizationalRole",
            "category":{
                "displayName":"Storefront Roles",
                "repositoryId":"storefrontRoleCategory",
                "id":"storefrontRoleCategory"
            }
        },
        {
            "associations":[
                {
                    "relatedItemId":null,
                    "type":"global"
                },
                {
                    "relatedItemId":"or-100001",
                    "type":"organization"
                },
                {
                    "relatedItemId":"or-100002",
                    "type":"organization"
                }
            ],
            "repositoryId":"200001",
            "name":"Example1",
            "description":"Sample Description",
            "id":"200001",
            "accessRights":[
                {
                    "displayName":"Sample AccessRight",
                    "repositoryId":"300001",
                    "name":"Sample AccessRight",
                    "id":"Sample AccessRight",
                    "type":"generic"
                }
            ],
            "type":"role",
            "category":{
                "displayName":"Custom Roles",
                "repositoryId":"customRoleCategory",
                "id":"customRoleCategory"
            }
        }
    ]
}

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 fetching roles for the user.| |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