content library item storage: list

Lists all storage items for a given library item.

Request:

HTTP request

GET https://{server}/rest/com/vmware/content/library/item/storage

?library_item_id=obj-103

Request Query Parameters:

Name Type Description
bold = required
library_item_id string Identifier of the library item whose storage information should be listed.

Response:

HTTP Status Code: 200

Representations:

{
    "value"[
        {
            "cached"true,
            "checksum_info"{
                "algorithm""SHA1",
                "checksum""string"
            },
            "name""string",
            "size"1,
            "storage_backing"{
                "datastore_id""obj-103",
                "storage_uri""http://myurl.com",
                "type""DATASTORE"
            },
            "storage_uris"[
                "http://myurl.com",
                "http://myurl.com"
            ],
            "version""string"
        },
        {
            "cached"true,
            "checksum_info"{
                "algorithm""SHA1",
                "checksum""string"
            },
            "name""string",
            "size"1,
            "storage_backing"{
                "datastore_id""obj-103",
                "storage_uri""http://myurl.com",
                "type""DATASTORE"
            },
            "storage_uris"[
                "http://myurl.com",
                "http://myurl.com"
            ],
            "version""string"
        }
    ]
}
<?xml version="1.0" ?>
<ns0:List-Result xmlns:ns0="http://vmware.com/content/library/item/storage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value-array>
    <array-item>
      <cached>true</cached>
      <name>string</name>
      <storage_backing>
        <datastore_id>obj-103</datastore_id>
        <storage_uri>http://myurl.com</storage_uri>
        <type>DATASTORE</type>
      </storage_backing>
      <storage_uris-array>
        <array-item>http://myurl.com</array-item>
        <array-item>http://myurl.com</array-item>
      </storage_uris-array>
      <checksum_info>
        <checksum>string</checksum>
        <algorithm>SHA1</algorithm>
      </checksum_info>
      <size>1</size>
      <version>string</version>
    </array-item>
    <array-item>
      <cached>true</cached>
      <name>string</name>
      <storage_backing>
        <datastore_id>obj-103</datastore_id>
        <storage_uri>http://myurl.com</storage_uri>
        <type>DATASTORE</type>
      </storage_backing>
      <storage_uris-array>
        <array-item>http://myurl.com</array-item>
        <array-item>http://myurl.com</array-item>
      </storage_uris-array>
      <checksum_info>
        <checksum>string</checksum>
        <algorithm>SHA1</algorithm>
      </checksum_info>
      <size>1</size>
      <version>string</version>
    </array-item>
  </value-array>
</ns0:List-Result>

Response Type:

Name Type Description
bold = required
value info[] The array of all storage items for a given library item.
value[].storage_backing storage_backing The storage backing on which this object resides.

value[].storage_backing.type string Type (DATASTORE, OTHER) of content.library.storage_backing.

Specifies the type of the content.library.storage_backing. Value is one of:
DATASTORE: The content of the library will be stored on a datastore.

These are vCenter Server managed datastores, and are logical containers that hide specifics of each storage device. Depending on the type of storage you use, datastores can be backed by the following file system formats:

  • Virtual Machine File System (VMFS)
  • Network File System (NFS)


OTHER: The content of the library will be stored on a remote file system.

Supports the following remote file systems:

  • NFS (on vCenter Server Appliance)
  • SMB (on vCenter Server Appliance and vCenter Server for Windows)

Optional. This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is not used for the update operation.
value[].storage_backing.datastore_id string Identifier of the datastore used to store the content in the library.

Optional. It is only relevant when type has value DATASTORE. This field is optional and it is only relevant when the value of type is DATASTORE.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datastore. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore.

value[].storage_backing.storage_uri URI URI identifying the location used to store the content in the library.

The following URI formats are supported:

vSphere 6.5

  • nfs://server/path?version=4 (for vCenter Server Appliance only) - Specifies an NFS Version 4 server.
  • nfs://server/path (for vCenter Server Appliance only) - Specifies an NFS Version 3 server. The nfs://server:/path format is also supported.
  • smb://server/path - Specifies an SMB server or Windows share.

vSphere 6.0 Update 1

  • nfs://server:/path (for vCenter Server Appliance only)
  • file://unc-server/path (for vCenter Server for Windows only)
  • file:///mount/point (for vCenter Server Appliance only) - Local file URIs are supported only when the path is a local mount point for an NFS file system. Use of file URIs is strongly discouraged. Instead, use an NFS URI to specify the remote file system.

vSphere 6.0

  • nfs://server:/path (for vCenter Server Appliance only)
  • file://unc-server/path (for vCenter Server for Windows only)
  • file:///path - Local file URIs are supported but strongly discouraged because it may interfere with the performance of vCenter Server.

Optional. It is only relevant when type has value OTHER. This field is optional and it is only relevant when the value of type is OTHER.

value[].storage_uris URI[] URIs that identify the file on the storage backing.

These URIs may be specific to the backing and may need interpretation by the client. A client that understands a URI scheme in this list may use that URI to directly access the file on the storage backing. This can provide high-performance support for file manipulation.

value[].checksum_info checksum_info A checksum for validating the content of the file.

This value can be used to verify that a transfer was completed without errors.

Optional. A checksum cannot always be calculated, and the value will be unset if the file does not have content.

value[].checksum_info.algorithm string The checksum algorithm (SHA1, MD5) used to calculate the checksum.

Optional. If not specified the default checksum algorithm is SH_a1.

value[].checksum_info.checksum string The checksum value calculated with content.library.item.file.checksum_info.algorithm.

value[].name string The name of the file.

This value will be unique within the library item for each file. It cannot be an empty string.

value[].size long The file size, in bytes. The file size is the storage used and not the uploaded or provisioned size. For example, when uploading a disk to a datastore, the amount of storage that the disk consumes may be different from the disk file size. When the file is not cached, the size is 0.

value[].cached boolean Indicates whether the file is on disk or not.

value[].version string The version of this file; incremented when a new copy of the file is uploaded.

Errors:

HTTP Status Code Type Description
404 not_found if the specified library item does not exist.