Get Partitions for a Tape Link

The Get Partitions for a Tape Link operation lists the partitions to which the tape link with the given identifier is attached.

GET /api/tape-links/{tape-link-id}/operations/get-partitions

In this request, the URI variable {tape-link-id} is the object-id of the Tape Link object.

Query parameters

This operation lists the partitions to which the identified tape link is attached. The object URI, name and status are provided for each.

If the object ID {tape-link-id} does not identify a tape link object to which the API user has object-access permission, a 404 (Not Found) status code is returned.

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, this filtering is not done.

If the status query parameter is specified, the parameter is validated to ensure it is a valid value for the status property according to the Partition object data model. If the value is not valid, a 400 (Bad Request) is returned. If the value is valid, the returned list is limited to those partitions that have the specified status value. If the status parameter is omitted, this filtering is not done.

The operation lists all partitions attached to the tape link including partitions the current user may not have object access permission to. For partitions without object access permission, the object-uri property will be null. If no partitions are to be included in the results due to filtering, an empty list is provided and the operation completes successfully.

This operation has the following authorization requirement:
  • Object-access permission to the tape link whose object-id is {tape-link-id}.

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

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

Table 1. Get Partitions for a Tape Link: HTTP status and reason codes
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.
14 A query parameter defines an invalid value.
404 (Not Found) 1 A tape link with object-id {tape-link-id} does not exist on the Console or the API user does not have object-access permission to it.

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

Figure 1. Get Partitions for a Tape Link: Request
GET /api/tape-links/43750b00-4f64-11eb-b10a-fa163ed4d903/operations/get-partitions HTTP/1.1
x-api-session: 3trdm1tc3mz0g9z8u3t2vkj0v6t9cak6649nue3igkullhrdn4
Figure 2. Get Partitions for a Tape Link: Response
200 OK
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Tue, 05 Jan 2021 15:01:16 GMT
content-type: application/json;charset=UTF-8
content-length: 123
{
   "partitions":[
      {
         "name":"Database",
         "object-uri":"/api/partitions/f1ff01b6-4f65-11eb-b6ac-fa163ed4d903",
         "status":"stopped"
      }
   ]
}