Get Virtual Tape Resource Properties

The Get Virtual Tape Resource Properties operation retrieves the properties of a single Virtual Tape Resource element object.

HTTP method and URI

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

In this request, the URI variable {tape-link-id} is the object ID of the Tape Link object and the URI variable {virtual-tape-resource-id} is the element ID of the Virtual Tape Resource element object.

Response body contents

On successful completion, the response body is a JSON object that provides the current values of the properties for the Virtual Tape Resource element object as defined in the Virtual Tape Resource element object. Field names and data types in the JSON object are the same as the property names and data types defined in the data model.

Description

Returns the current values of the properties for the Virtual Tape Resource element object as defined in Virtual Tape Resource element object.

A 404 (Not Found) status code is returned if the object ID {tape-link-id} does not identify a Tape Link object to which the API user has object-access permission, or if the element ID {virtual-tape-resource-id} does not identify a virtual tape resource in the tape link.

Authorization requirements

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

HTTP status and reason codes

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 Virtual Tape Resource Properties: 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.
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.
5 A virtual tape resource with element-id {virtual-tape-resource-id} does not exist in the tape link on the Console.

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

Example HTTP interaction

Figure 1. Get Virtual Tape Resource Properties: Request
GET /api/tape-links/4e1293ae-3a22-11eb-9352-00106f0d81c9/virtual-tape-resources/
  0f2b57f6-3a23-11eb-9352-00106f0d81c9 HTTP/1.1
x-api-session: 5ugs7k2mdg9x4thu6e8y5ih1uk9xxa52yp7ud1rpvq3fl3kn30
Figure 2. Get Virtual Tape Resource Properties: Response
200 OK
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Mon, 04 Jan 2021 13:00:14 GMT
content-type: application/json;charset=UTF-8
content-length: 630
{
   "adapter-port-uri":"/api/adapters/ab61e64e-4fc4-11e9-b8fd-00106f0d81c9/storage-ports/0",
   "class":"virtual-tape-resource",
   "degraded-reasons":[],
   "description":"",
   "device-number":"000a",
   "element-id":"0f2b57f6-3a23-11eb-9352-00106f0d81c9",
   "element-uri":"/api/tape-links/4e1293ae-3a22-11eb-9352-00106f0d81c9/virtual-tape-resources/
     0f2b57f6-3a23-11eb-9352-00106f0d81c9",
   "name":"vhba_TL_Connect2TapeTL1PAth0",
   "parent":"/api/tape-links/4e1293ae-3a22-11eb-9352-00106f0d81c9",
   "partition-uri":"/api/partitions/1118e03e-39e1-11eb-8ca5-00106f0d81c9",
   "world-wide-port-name-info":{
      "status":"validated",
      "world-wide-port-name":"c05076ffe800000f"
   }
}