Get all user groups
/km/api/v1/userGroups
Retrieves all user groups that match the specified optional criteria.
Request
-
limit: integer
This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
-
mode: string
This parameter defines amount of information to be included in the returned resources - KEY is the one that has least information (and hence performs better) and FULL is the one that has most information.Allowed Values:
[ "KEY", "DATA", "EXTENDED", "FULL" ]
-
offset: integer
Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
-
orderBy: string
This parameter orders a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and 'asc' or 'desc'. Specify 'asc' for ascending and 'desc' for descending. The default value is 'asc'. For example, ?orderBy=field1:asc,field2:desc.
-
q: string
Value for this parameter should be Oracle Knowledge Q query - see the 'Getting Started' documentation ('Querying' page) of this operation and documentation for Q query.
Response
- application/json
- application/xml
200 Response
object
ResultList UserGroupData
-
count:
integer
Number of resource instances returned in the current range.
-
hasMore:
boolean
Boolean value that is set to true if more resources are available on the server than the subset returned in current page.
-
items:
array items
-
limit:
integer
Actual paging size used by the server.
-
links:
array links
-
offset:
integer
Offset value used in the current page.
-
totalResults:
integer
Total count of the resource instances, including both the instances in the current range and the instances on the server that satisfy the request.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
UserGroupData
-
dateAdded:
string(date-time)
The date when the UserGroup object was created
-
dateModified:
string(date-time)
The date when the UserGroup object was last modified
-
description:
string
The localized description of the user group
-
externalId:
integer
The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.
-
externalType:
string
The ExternalType is the type of the corresponding userGroup from an external system.
-
links:
array links
-
name:
string
The localized name of the user group. The name field can only be used for sorting.
-
objectId:
string
The string representing the hierarchy of the user groups. All user groups are stored in the TAG table but they are currently not hierarchical
-
recordId:
string
The unique identifier from the TAG table that represent a userGroups resource
-
referenceKey:
string
The non localized name of the user group
-
stripeCD:
string
Stripe for UserGroup
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
-
href(required):
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType:
string
Media type, as defined by RFC 2046, describing the link target.
-
method:
string
HTTP method for requesting the target of the link.
-
profile:
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel(required):
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated:
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
Examples
The following example shows how to find a list of User Group objects from the Oracle Knowledge repository by submitting a get request on the REST resource using cURL.
curl -X "GET" "http://IM_REST_API_HOST/km/api/latest/userGroups"
Example of Request Header
The following shows an example of the request header.
curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/userGroups" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"
Example of Response Body
The following example shows the contents of the response body in JSON format:
{ "items": [ { "recordId": "8410EB4CB48C5E7CE05323BDF20A8468", "referenceKey": "EMPLOYEEHCM", "name": "Employee", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/v1/userGroups/8410EB4CB48C5E7CE05323BDF20A8468", "mediaType": "application/json, application/xml", "method": "GET" }, { "rel": "collection", "href": "https://<IM_REST_API_HOST>/km/api/v1/userGroups", "mediaType": "application/json, application/xml", "method": "GET", "profile": "https://<IM_REST_API_HOST>/km/api/v1/metadata-catalog/userGroups" } ], "dateAdded": "1970-01-01T23:11:11+0000", "dateModified": "1970-01-01T23:11:11+0000", "objectId": "-3", "description": "EMPLOYEE user group for the HCM Department", "stripeCd": "ORA_SVC_HCM" } ], "hasMore": true, "limit": 1, "offset": 0, "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/v1/userGroups?limit=1&offset=0&langpref=en_US", "mediaType": "application/json, application/xml", "method": "GET" }, { "rel": "next", "href": "https://<IM_REST_API_HOST>/km/api/v1/userGroups?limit=1&offset=1&langpref=en_US", "mediaType": "application/json, application/xml", "method": "GET" } ], "count": 1 }