Get User Groups
get
/rest/v16/companies/{companyName}/users/{userName}/groups
This endpoints returns all groups assigned to specified user.
Request
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 name of the user.
Query Parameters
-
excludeLinks: string
Exclude given link types from response
-
fields: string
Group fields expected in response
-
filter: string
Returns response filtered on criteria passed as value of this param
-
limit: integer
Maximum number of records expected in response
-
offset: integer
Index of record with which response should start with
-
orderby: string
Orders response based on field/fields passed as value of this param. Direction can be passed separated by ':'. Default Direction is Ascending(ASC).
-
totalResults: boolean
True if total number of results of query are expected in response, else false
Response
Supported Media Types
- application/json
Default Response
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 -
name:
string
-
rel:
string
Title:
Link Relationship to the current object
Default Value:self
Link Relationship to the current object
Examples
This endpoints returns all groups assigned to specified user by submitting a GET request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl - X GET - i - H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" https://sitename.oracle.com/rest/v16/companies/_host/users/aavenkatbulk/groups
Response Body Sample
{ "items": [{ "label": "100k Parts", "variableName": "a100kparts", "type": "Sales" }, { "label": "Admin Access- Internal Users", "variableName": "adminAccessUsersOnly", "type": "Administrator" } ], "offset": 0, "limit": 1000, "count": 2, "hasMore": false, "links": [{ "rel": "parent", "href": "https://sitename.oracle.com/rest/v16/companies/_host/users/aavenkatbulk" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v16/companies/_host/users/aavenkatbulk/groups" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v16/companies/_host/users/aavenkatbulk/groups?offset=0&limit=1000" } ] }