List Item File
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Lists all of the files that are stored within a given library item. 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
https://{api_host}/rest/com/vmware/content/library/item/file
Query Parameters
Query Parameters
string
library_item_id
Required
Identifier of the library item whose files should be listed.
The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Response
Response
Response BodyResponse Body
200 OK returns
LibraryItemFileListResponseBody
of type application/json
The list of all of the files that are stored within the given library item.
{
"value": [
{
"cached": false,
"checksum_info": {
"algorithm": "enum",
"checksum": "string"
},
"name": "string",
"size": 0,
"version": "string"
}
]
}
array of
LibraryItemFileInfo
value
Optional
The list of all of the files that are stored within the given library item.
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/rest/com/vmware/content/library/item/file?library_item_id=string
Errors
404
com.vmware.vapi.std.errors.not_found : if libraryItemId refers to a library item that does not exist.
Item File Operations
get
post