List Virtual Tape Resources of a Tape Link

The List Virtual Tape Resources of a Tape Link operation lists the virtual tape resources of the FCP tape link with the given identifier.

GET /api/tape-links/{tape-link-id}/virtual-tape-resources

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

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.
device-number String Optional Filter pattern (regular expression) to limit returned objects to those that have a matching device-number property.
adapter-port-uri String/ URI Optional Filter string to limit returned objects to those that have a matching adapter-port-uri property.
partition-uri String/ URI Optional Filter string to limit returned objects to those that have a matching partition-uri property.

This operation lists the virtual tape resources that are owned by the identified tape link. The element URI, name, device number and associated adapter port and partition 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 or device-number query parameter is specified, the returned list is limited to those virtual tape resources that have a name or device-number property matching the specified filter pattern. If the name or device-number parameter is omitted, the filtering on the omitted property name is not done.

If the adapter-port-uri or partition-uri query parameter is specified, the returned list is limited to those virtual tape resources that have a matching adapter-port-uri or partition-uri property. If the adapter-port-uri or partition-uri parameter is omitted, the filtering on the omitted property name is not done.

If no virtual tape resources 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, 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 any associated error message.

Table 1. List Virtual Tape Resources of 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 The tape link with the object ID {tape-link-id} does not exist on the Console, or the API user does not have object-access permission for it.

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

Figure 1. List Virtual Tape Resources of a Tape Link: Request
GET /api/tape-links/4e1293ae-3a22-11eb-9352-00106f0d81c9/virtual-tape-resources HTTP/1.1
x-api-session: 4176um534e2nvp7vjun34lr2cf9bxtk4lvh4t3un9i3le31347
Figure 2. List Virtual Tape Resources of a Tape Link: Response
200 OK
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Mon, 04 Jan 2021 12:15:21 GMT
content-type: application/json;charset=UTF-8
content-length: 379
{
   "virtual-tape-resources":[
      {
         "adapter-port-uri":"/api/adapters/ac5207aa-4fc4-11e9-b8fd-00106f0d81c9/
           storage-ports/0",
         "device-number":"000b",
         "element-uri":"/api/tape-links/4e1293ae-3a22-11eb-9352-00106f0d81c9/
           virtual-tape-resources/0f576e86-3a23-11eb-9352-00106f0d81c9",
         "name":"vhba_TL_Connect2TapeTL1PAth1",
         "partition-uri":"/api/partitions/1118e03e-39e1-11eb-8ca5-00106f0d81c9"
      }
   ]
}