Bulk Update Users within Groups
patch
/rest/v19/companies/{companyLoginName}/groups/{groupVarName}/users
This endpoint adds or removes users for a group.
Request
Supported Media Types
- application/json
Path Parameters
-
companyLoginName(required): string
Company login name.
-
groupVarName(required): string
Group variable name.
Root Schema : Patch Operations
Type:
array
Title:
Patch Operations
The array of operations.
Show Source
-
Array of:
object Group User Operation
Title:
Group User Operation
Nested Schema : Group User Operation
Type:
object
Title:
Show Source
Group User Operation
-
op(required):
string
Title:
op
Allowed Values:[ "ADD", "REMOVE" ]
The operation to be performed. -
path(required):
string
Title:
Path
The login of user. -
value:
object User Details
Title:
User Details
Nested Schema : User Details
Type:
object
Title:
Show Source
User Details
-
login(required):
string
Title:
Login
User login name.
Response
Supported Media Types
- application/json
Default Response
List of users for a group.
Root Schema : Users
Type:
object
Title:
Users
All users of a group
Show Source
-
items:
array items
-
links:
array Links
Title:
Links
Links to the related objects.
Nested Schema : items
Type:
Show Source
array
-
Array of:
object User Details
Title:
User Details
User details of group.
Nested Schema : Links
Type:
array
Title:
Links
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 : User Details
Type:
object
Title:
User Details
User details of group.
Show Source
-
firstName:
string
Title:
User First Name
First name of the user. -
lastName:
string
Title:
User Last Name
Last name of the user. -
login:
string
Title:
User Login Id
Login Id of the user.
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 -
name:
string
-
rel:
string
Title:
Link Relationship to the current object
Default Value:self
Link Relationship to the current object
Examples
The following example shows how to update users within groups via one web services request by submitting a PATCH request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X PATCH -H "Authorization: Bearer <token>" -H "Content-type: application/json" -H "Accept: application/json" https://sitename.oracle.com/rest/v19/companies/visionServices/groups/midwestTestGroup/users
Request Body Sample
{ "operations": [{ "op": "remove", "path": "/superuser" }, { "op": "add", "path": "/", "value": { "login": "msmith" } }, { "op": "add", "path": "/", "value": { "login": "ljones" } } ] }
Response Body Sample
{ "items": [{ "login": "amayor", "firstName": "Alex", "lastName": "Mayor" }, { "login": "msmith", "firstName": "Mary", "lastName": "Smith" }, { "login": "ljones", "firstName": "Lisa", "lastName": "Jones" } ], "links": [{ "rel": "canonical", "href": "https://sitename.oracle.com/rest/v19/companies/_host/groups/midwestTestGroup/users" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v19/companies/_host/groups/midwestTestGroup/users?offset=0&limit=1000" } ] }