List Permitted Partitions

The List Permitted Partitions operation lists partitions to which the API user has object-access permission.

HTTP method and URI

GET /api/console/operations/list-permitted-partitions

Query parameters:

Name Type Rqd/Opt Description
name String Optional Filter pattern (regular expression) to limit returned objects to those that have a matching name property.
type String Enum Optional Filter string to limit returned objects to those that have a matching type property. Value must be a valid partition type property value.
status String Enum Optional Filter string to limit returned objects to those that have a matching status property. Value must be a valid partition status property value.
has-unacceptable-status Boolean Optional Filter string to limit returned objects to those that have a matching has-unacceptable-status property. Valid values are true and false.
cpc-name String Optional Filter pattern (regular expression) to limit returned objects to those whose parent CPC has a matching name property.
additional-properties List of String Enum Optional A list of properties to be included in the response in addition to the default properties (name, object-uri, type, status, has-unaccptable-status, cpc-name, cpc-object-uri, se-version). This is a list of comma-separated strings where each string is a property name defined in the Partition object's data model. [Added by features dpm-hipersockets-partition-link-management and dpm-ctc-partition-link-management]

Response body contents

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

Field name Type Description
partitions Array of partition-info objects Array of nested partition-info objects as described in the next table.

Each nested partition-info object contains the following fields:

Field name Type Description
name String The name property of the Partition object.
object-uri String/ URI The object-uri property of the Partition object.
type String Enum The type property of the Partition object.
status String Enum The status property of the Partition object.
has-unacceptable-status Boolean The has-unacceptable-status property of the Partition object.
cpc-name String The name property of the partition's parent CPC object.
cpc-object-uri String/ URI The object-uri property of the partition's parent CPC object.
se-version String The se-version property of the partition's parent CPC object.

Description

This operation lists the Partition objects to which the API user has object-access permission. Some basic properties are provided for each partition that is included in the response.

If the name query parameter is specified, the returned list is limited to those partitions that have a name property matching the specified filter pattern. If the name parameter is omitted, no such filtering is performed.

If the type query parameter is specified, the parameter is validated to ensure it is a valid partition type property value. If the value is not valid, HTTP status code 400 (Bad Request) is returned. If the value is valid, the returned list is limited to those partitions that have a type property matching the specified value. If the type parameter is omitted, no such filtering is performed.

If the status query parameter is specified, the parameter is validated to ensure it is a valid partition status property value. If the value is not valid, HTTP status code 400 (Bad Request) is returned. If the value is valid, the returned list is limited to those partitions that have a status property matching the specified value. If the status parameter is omitted, no such filtering is performed.

If the has-unacceptable-status query parameter is specified, the returned list is limited to those partitions that have a has-unacceptable-status property matching the specified value. If the has-unacceptable-status parameter is omitted, no such filtering is performed.

If the cpc-name query parameter is specified, the returned list is limited to those partitions whose parent CPC's name property matches the specified filter pattern. If the cpc-name parameter is omitted, no such filtering is performed.

If the additional-properties query parameter is specified, the response body is enhanced with the additionally requested properties. The presence and value of each requested property is the same as it would be in the response body of a Get Partition Properties operation. That is, it may be omitted or contain a special value such as null, -1, or an empty string, if a prerequisite condition is not met. If the additional-properties query parameter is omitted, only the default properties are included in the response.

A partition is included in the list only if the API user has object-access permission to that object. If there is a partition to which the API user does not have permission, that object is omitted from the list, but no error status code results.

If there are no partitions known to the HMC or if no partitions are to be included in the response due to filtering or access permissions, an empty list is provided and the operation completes successfully.

Authorization requirements

This operation has the following authorization requirement:
  • Object-access permission to the Partition objects included in the response body.

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. 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.

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

Example HTTP interaction

Figure 1. List Permitted Partitions: Request
GET /api/console/operations/list-permitted-partitions HTTP/1.1
x-api-session: 1hxko1kyziy64pcd9a9ot59ceb9jnh7vg55ylro930kubzgva5
Figure 2. List Permitted Partitions: Response
200 OK
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Mon, 27 Aug 2018 18:37:52 GMT
content-type: application/json;charset=UTF-8
content-length: 294
{
   "partitions":[
      {
         "cpc-name":"SEDPM005",
         "cpc-object-uri":"/api/cpcs/e4e18781-8063-3f2c-8222-044eb58988d9",
         "se-version":"2.14.0",
         "has-unacceptable-status":true,
         "name":"part1",
         "object-uri":"/api/partitions/592125be-76dd-11e7-94f9-02c2000226b7",
         "status":"communications-not-active",
         "type":"linux"
      }
   ]
}

Usage note

The response body of this operation is similar to that of the Get Inventory operation, but it returns only a subset of partition properties. The response also includes some properties of the parent CPC, regardless of whether the API user has object-access permission to that CPC.