List Group Profiles

The List Group Profiles operation lists the Group Profiles for the associated CPC object. This operation is supported using the BCPii interface.

HTTP method and URI

GET /api/cpcs/{cpc-id}/group-profiles

In this request, the URI variable {cpc-id} is the object ID of the target CPC object.

Query parameters:

Name Type Rqd/ Opt Description
name String Optional A regular expression used to limit returned objects to those that have a matching name property. If matches are found, the response will be an array with all objects that match. If no match is found, the response will be an empty array.

Response body contents

On successful completion, the response body contains a JSON object with the following fields:

Field name Type Description
group-profiles Array of group-actprof-info objects Array of nested objects (described in the next table).

Each group-actprof-info object contains the following fields:

Field name Type Description
element-uri String/ URI Canonical URI path of the Group Profile object.
name String The name of the Group Profile.
target-name String (1-17) The value that must be used on the X-API-Target-Name request header when performing and operation on this object.
Note: This property is only returned when the BCPii interface was used for the request.

Description

This operation lists the Group Profiles for the associated CPC object.

If the name query parameter is specified, the returned list is limited to those Group Profiles that have a name property matching the specified filter pattern. If the name parameter is omitted, this filtering is not done.

On success, HTTP status code 200 (OK) is returned and the response body is provided as described in the response body contents section.

Authorization requirements

This operation has the following authorization requirement:
  • For the web services interface, object-access permission to the CPC object designated by {cpc-id}, or object-access permission to the same named logical partition of that CPC, for each object to be included in the response.
  • For the BCPii interface, the source partition must have receive BCPii security controls permissions for the CPC object designated by {cpc-id}.

HTTP status and reason codes

On success, HTTP status code 200 (OK) is returned and the response body is provided as described in Response body contents.

The following HTTP status codes are returned for the indicated errors, and the response body is a standard error response body providing the reason code indicated and associated error message.

HTTP error status code Reason code Description
400 (Bad Request) Various Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes.
299 A query parameter has an invalid syntax.
403 (Forbidden) 0 The request used the BCPii interface and the source partition does not have receive BCPii security controls permission for the CPC object.
404 (Not Found) 1 The object ID in the URI ({cpc-id}) does not designate an existing CPC object, or the API user does not have object-access permission to the object.
409 (Conflict) 329 The operation cannot be performed because the CPC designated by the request URI is an unmanaged CPC, which is not supported by this operation.
500 (Server Error) 281 An unexpected error occurred during the collection of the list of group profiles.
503 (Service Unavailable) 1 The request could not be processed because the HMC is not communicating with the SE needed to perform the requested operation.

Additional standard status and reason codes can be returned, as described in Invoking API operations.

Example HTTP interaction

Figure 1. List Group Profiles: Request
GET /api/cpcs/37c6f8a9-8d5e-3e5d-8466-be79e49dd340/group-profiles HTTP/1.1
x-api-session: 5obf0hwsfv1sg9kr5f93cph3zt6o5cptb6lcl538wuyebdyzu4
Figure 2. List Group Profiles: Response
200 OK
server: zSeries management console API web server / 1.0
cache-control: no-cache
date: Fri, 25 Nov 2011 17:16:19 GMT
content-type: application/json;charset=UTF-8
content-length: 182
{
   "group-profiles": [
      {
         "element-uri": "/api/cpcs/37c6f8a9-8d5e-3e5d-8466-be79e49dd340/group-profiles/
           DEFAULT", 
         "name": "DEFAULT"
      }
   ]
}