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:
arrayTitle:
Patch OperationsThe array of operations.
Show Source
-
Array of:
object Group User Operation
Title:
Group User Operation
Nested Schema : Group User Operation
Type:
objectTitle:
Show Source
Group User Operation-
op(required):
string
Title:
opAllowed Values:[ "ADD", "REMOVE" ]The operation to be performed. -
path(required):
string
Title:
PathThe login of user. -
value:
object User Details
Title:
User Details
Nested Schema : User Details
Type:
objectTitle:
Show Source
User Details-
login(required):
string
Title:
LoginUser login name.
Response
Supported Media Types
- application/json
Default Response
List of users for a group.
Root Schema : Users
Type:
objectTitle:
UsersAll users of a group
Show Source
-
items:
array items
-
links:
array Links
Title:
LinksLinks to the related objects.
Nested Schema : items
Type:
Show Source
array-
Array of:
object User Details
Title:
User DetailsUser details of group.
Nested Schema : Links
Type:
arrayTitle:
LinksLinks 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 : User Details
Type:
objectTitle:
User DetailsUser details of group.
Show Source
-
firstName:
string
Title:
User First NameFirst name of the user. -
lastName:
string
Title:
User Last NameLast name of the user. -
login:
string
Title:
User Login IdLogin Id of the user.
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 -
name:
string
-
rel:
string
Title:
Link Relationship to the current objectDefault Value:selfLink 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"
}
]
}