Get Item File
Retrieves the information for a single file in a library item by its name. if you do not have all of the privileges described as follows: - The resource com.vmware.content.library.Item referenced by the parameter libraryItemId requires System.Read.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the library item whose file information should be returned. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
Query Parameters
Query Parameters
Name of the file in the library item whose information should be returned.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
The File.Info object with information on the specified file.
{
"cached": false,
"checksum_info": {
"algorithm": "SHA1",
"checksum": "string"
},
"name": "string",
"size": 0,
"version": "string"
}
Indicates whether the file is on disk or not.
The name of the file. This value will be unique within the library item for each file. It cannot be an empty string.
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.
The version of this file; incremented when a new copy of the file is uploaded.
A checksum for validating the content of the file. This value can be used to verify that a transfer was completed without errors.
A checksum cannot always be calculated, and the value will be unset if the file does not have content.
Errors
com.vmware.vapi.std.errors.not_found : if libraryItemId refers to a library item that does not exist. if name refers to a file that does not exist in the library item.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/content/library/item/file/id:{library_item_id}?~action=get
x-vmw-doc-operation: get