listRoles associated with a profile
get
/ccadmin/v1/profiles/{id}/roles
List Roles. Get all roles associated for shoppers.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The customer profile id.
Query Parameters
-
limit(optional): string
The maximum number of roles to be returned from this request.
-
offset(optional): string
The starting offset/index to be returned from this request.
-
q(optional): string
Query string that filters the roles to be returned from this request using SCIM filtering syntax.
-
sort(optional): string
The sort order of the list to be returned from this request.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getRoles_response
Type:
Show Source
object
-
limit(optional):
integer
Number of records to be fetched.
-
offset(optional):
integer
The offset
-
properties(optional):
array properties
list of roles associated with the profile
-
total(optional):
integer
Total number of records present in database matching the searched string.
-
totalResults(optional):
integer
The total number of records fetched.
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 : items
Type:
Show Source
object
-
accessRights(optional):
array accessRights
Access rights assigned to role
-
associations(optional):
array associations
-
category(optional):
object category
Category of the role
-
description(optional):
string
Description of role
-
function(optional):
string
Function name for organizationRole
-
id(optional):
string
ID of the role to be assigned.
-
name(optional):
string
Name of role
-
relativeTo(optional):
object relativeTo
Related organization for organizationRole
-
repositoryId(optional):
string
Repository ID of the role
Nested Schema : category
Type:
object
Category of the role
Show Source
-
displayName(optional):
string
Display name of the role category.
-
id(optional):
string
ID of the role category.(customRoleCategory or storefrontRoleCategory)
-
repositoryId(optional):
string
Repository ID of the role category.(customRoleCategory or storefrontRoleCategory)
Nested Schema : relativeTo
Type:
object
Related organization for organizationRole
Show Source
-
repositoryId(optional):
string
Repository ID of related organization
Nested Schema : items
Type:
Show Source
object
-
displayName(optional):
string
Display name of access right
-
id(optional):
string
ID of access right
-
name(optional):
string
Name of access right
-
repositoryId(optional):
string
Repository ID of access right
-
type(optional):
string
Type of access right
Nested Schema : items
Type:
Show Source
object
- relatedItemId(optional): string
-
type(optional):
string
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.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code