Get all user groups assigned

get

/km/api/v1/views/{id}/userGroups

This method returns a list of UserGroup objects associated with the View object having the specified ID parameter.

This resource supports the orderBy request parameter. You can use this parameter along with the HTTP service request to sort the returned list.

You must get the schema and catalog of the resource for additional values that you can use with the orderBy parameter. To get the schema and catalog of the resource, you must use the GET method with the mediaType value as application/schema+json in the HTTP request.

The example URI to get schema and catalog of the resource is as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/userGroups

Example URIs:

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/views/{id}/userGroups

    The method returns a list of UserGroup objects associated with the View object having the specified ID parameter sorted by reference key in ascending order.

  • http://<IM_REST_API_HOST>/km/api/latest/views/{id}/userGroups?orderBy=referenceKey:desc

    The method returns a list of UserGroup objects associated with the View object having the specified ID parameter sorted by reference key in descending order.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList UserGroupKey
Type: object
Title: ResultList UserGroupKey
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : UserGroupKey
Type: object
Title: UserGroupKey
Show Source
Back to Top

Examples

The following example shows how to find a list of User Group objects associated with the specified View object by submitting a get request on the REST resource using cURL.

curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/views/{id}/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": [],
  "hasMore": false,
  "links": [
    {
      "rel": "canonical",
      "href": "http://IM_REST_API_HOST/km/api/latest/views/C3643883234B4B319793840918246A31/userGroups?limit=20&offset=0",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    }
  ],
  "count": 0
}
Back to Top