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
Path Parameters
Body ()
Root Schema : groups-updateRequest
Type: object
Show Source
  • 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
Nested Schema : Group
Type: object
Title: Group
User group information
Show Source
Back to Top

Response

Supported Media Types

Default Response

User groups details.
Body ()
Root Schema : Groups
Type: object
Title: Groups
Groups to which the user belongs
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Group
Type: object
Title: Group
User group information
Show Source
Back to Top

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"
    }
  ]
}
Back to Top