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

## content library item: find

Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested content.library.item.find_spec.

### Request:

#### HTTP request

POST https://{server}/rest/com/vmware/content/library/item?~action=find

#### Request Body Structure:

- JSON
- XML

{
"spec": {
"cached": true,
"library_id": "obj-103",
"name": "string",
"source_id": "obj-103",
"type": "string"
}
}
<?xml version="1.0" ?>
<ns0:Find-Input xmlns:ns0="http://vmware.com/content/library/item" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<cached>true</cached>
<library_id>obj-103</library_id>
<source_id>obj-103</source_id>
<name>string</name>
<type>string</type>
</spec>
</ns0:Find-Input>

#### Request Body Parameters:

Name | Type | Description
--- | --- | ---
bold = required
spec | find_spec | Specification describing what properties to filter on.
spec.name | string | The name of the library item. The name is case-insensitive. See content.library.item_model.name. Optional. If not specified all library item names are searched.
spec.library_id | string | The identifier of the library containing the item. See content.library.item_model.library_id. Optional. If not specified all libraries are searched.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: `com.vmware.content.Library`. When operations return a value of this structure as a result, the field will be an identifier for the resource type: `com.vmware.content.Library`.
spec.source_id | string | The identifier of the library item as reported by the publisher. See content.library.item_model.source_id. Optional. If not specified all library items are searched.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: `com.vmware.content.library.Item`. When operations return a value of this structure as a result, the field will be an identifier for the resource type: `com.vmware.content.library.Item`.
spec.type | string | The type of the library item. The type is case-insensitive. See content.library.item_model.type. Optional. If not specified all types are searched.
spec.cached | boolean | Whether the item is cached. Possible values are 'true' or 'false'. See content.library.item_model.cached. Optional. If not specified all library items are searched.

### Response:

#### HTTP Status Code: 200

#### Representations:

- JSON
- XML

{
"value": [
"obj-103",
"obj-103"
]
}
<?xml version="1.0" ?>
<ns0:Find-Result xmlns:ns0="http://vmware.com/content/library/item" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</value-array>
</ns0:Find-Result>

#### Response Type:

Name | Type | Description
--- | --- | ---
bold = required
value | string[] | The array of identifiers of all the visible library items matching the given `spec`.

#### Errors:

HTTP Status Code | Type | Description
--- | --- | ---
400 | invalid_argument | if no properties are specified in the `spec`.