Update User Groups
put
/rest/v19/companies/{companyName}/users/{userName}/groups
This operation to update assigned groups for the specified user.
Request
Supported Media Types
- application/json
Path Parameters
-
companyName(required): string
Company login name. For Host Company users, use _host. For Partner Organization users, use partner organization company login name.
-
userName(required): string
Login Id of the user
Root Schema : groups-updateRequest
Type:
Show Source
object-
items:
array Groups
Title:
GroupsList of groups to which user should belong, user will be removed from the existing groups which are not passed in request.
Nested Schema : Groups
Type:
arrayTitle:
GroupsList of groups to which user should belong, user will be removed from the existing groups which are not passed in request.
Show Source
-
Array of:
object Group
Title:
GroupUser group information
Nested Schema : Group
Type:
objectTitle:
GroupUser group information
Show Source
-
label:
string
Title:
Group NameGroup name -
type:
string
Title:
Group TypeType of the group -
variableName:
string
Title:
Group Variable NameVariable name of the group
Response
Supported Media Types
- application/json
Default Response
User groups details.
Root Schema : Groups
Type:
objectTitle:
GroupsGroups to which the user belongs
Show Source
-
items:
array items
-
links:
array Links to the related objects
Title:
Links to the related objectsLinks to the related objects
Nested Schema : items
Type:
Show Source
array-
Array of:
object Group
Title:
GroupUser group information
Nested Schema : Links to the related objects
Type:
arrayTitle:
Links to the related objectsLinks to the related objects
Show Source
-
Array of:
object reference links
Title:
reference linksReference links for the Parent, Self, Children and Related as applicable
Nested Schema : Group
Type:
objectTitle:
GroupUser group information
Show Source
-
label:
string
Title:
Group NameGroup name -
type:
string
Title:
Group TypeType of the group -
variableName:
string
Title:
Group Variable NameVariable name of the group
Nested Schema : reference links
Type:
objectTitle:
reference linksReference links for the Parent, Self, Children and Related as applicable
Show Source
-
href:
string
Title:
URL to the related objectURL to the related object -
rel:
string
Title:
Link Relationship to the current objectLink Relationship to the current object
Examples
This operation to update assigned groups for the specified user by submitting a PUT request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl - X PUT -H "Authorization: Bearer <token>" - H https://sitename.oracle.com/rest/v19/companies/_host/users/aavenkatbulk/groups
Request Body Sample
{
"items": [{
"label": "Sales User",
"variableName": "salesUser",
"type": "Sales"
}, {
"label": "Sales Administrator",
"variableName": "salesAdministrator",
"type": "Administrator"
}
]
}
Response Body Sample
{
"items": [{
"label": "Sales User",
"variableName": "salesUser",
"type": "Sales"
}, {
"label": "Sales Administrator",
"variableName": "salesAdministrator",
"type": "Administrator"
}
],
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v19/companies/_host/users/aavenkatbulk/groups"
}, {
"rel": "parent",
"href": "https://sitename.oracle.com/rest/v19/companies/_host/users/aavenkatbulk"
}
]
}