1. Operations
2. content
3. library
4. item
5. file

## content library item file: list

Lists all of the files that are stored within a given library item.

### Request:

#### HTTP request

GET https://{server}/rest/com/vmware/content/library/item/file
?library_item_id=obj-103

#### Request Query Parameters:

Name | Type | Description
--- | --- | ---
bold = required
library_item_id | string | Identifier of the library item whose files should be listed.

### Response:

#### HTTP Status Code: 200

#### Representations:

- JSON
- XML

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

#### Response Type:

Name | Type | Description
--- | --- | ---
bold = required
value | info[] | The array of all of the files that are stored within the given library item.
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 `library_item_id` refers to a library item that does not exist.