Update the User Groups for a User
put
/rest/v19/users/{partyNumber}/groups
Use this endpoint to update user groups for a given user.
Request
Supported Media Types
- application/json
Path Parameters
-
partyNumber(required): string
Party Number of the user.
Root Schema : groups-updateRequest
Type:
Show Source
object
-
items:
array Groups
Title:
Groups
List 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:
array
Title:
Groups
List 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:
Group
User group information
Nested Schema : Group
Type:
object
Title:
Group
User group information
Show Source
-
label:
string
Title:
Group Name
Group name -
type:
string
Title:
Group Type
Type of the group -
variableName:
string
Title:
Group Variable Name
Variable name of the group
Response
Supported Media Types
- application/json
Default Response
User groups details.
Root Schema : Groups
Type:
object
Title:
Groups
Groups to which the user belongs
Show Source
-
items:
array items
-
links:
array Links to the related objects
Title:
Links to the related objects
Links to the related objects
Nested Schema : items
Type:
Show Source
array
-
Array of:
object Group
Title:
Group
User group information
Nested Schema : Links to the related objects
Type:
array
Title:
Links to the related objects
Links to the related objects
Show Source
-
Array of:
object reference links
Title:
reference links
Reference links for the Parent, Self, Children and Related as applicable
Nested Schema : Group
Type:
object
Title:
Group
User group information
Show Source
-
label:
string
Title:
Group Name
Group name -
type:
string
Title:
Group Type
Type of the group -
variableName:
string
Title:
Group Variable Name
Variable name of the group
Nested Schema : reference links
Type:
object
Title:
reference links
Reference links for the Parent, Self, Children and Related as applicable
Show Source
-
href:
string
Title:
URL to the related object
URL to the related object -
rel:
string
Title:
Link Relationship to the current object
Link Relationship to the current object
Examples
The following example pdates user groups for a given 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 "Content-type: application/json" -H "Accept: application/json" https://sitename.oracle.com/rest/v19/users/935719302534024740/groups
Request Body Sample
{ "items": [{ "label": "Groups", "variableName": "adminAccessGroupsOnly", "type": "Admin" }, { "label": "100k Parts", "variableName": "a100kparts", "type": "Sales" } ] }
Response Body Sample
{ "items": [{ "label": "100k Parts", "variableName": "a100kparts", "type": "Sales" }, { "label": "Admin Access- Groups", "variableName": "adminAccessGroupsOnly", "type": "Administrator" } ], "links": [{ "rel": "self", "href": "http://sitename.oracle.com/rest/v19/users/CRM_D1000/groups" }, { "rel": "parent", "href": "http://sitename.oracle.com/rest/v19/users/CRM_D1000" } ] }