---
title: Metadata Search
slug: metadata-search
docTags: 
createdAt: 2024-12-13T23:38:45.652Z
---

This method will perform a Box search against one or more Enterprise metadata fields.

**NOTE:&#x20;**&#x4F;nly content that the authenticated user has access to (items they can preview and/or view) will be returned in the search results.

**Input Parameters:**

- Parent Folder ID: (Optional) A folder(s) to constrain the search against. Otherwise it will search against all content the configured connection has access to
- Item Type: Allows for return of Files, Folders or Both
- Limit: Maximum number of files returned in the query
- Metadata Template Key: The Box API metadata template key to search against
- Query Expression: This is the Box API Query that will be run.&#x20;
  - For this example the value is: ***claimNumber = \:claimNumberVal***
  - ***claimNumber&#x20;***&#x69;s the metadata field that is part of the Metadata Template Key defined previously
  - **=&#x20;**&#x69;s the operator (equals) - see the online Box API documentation for additional operators supported for each data type
  - ***:claimNumberVal*** - The colon is required and the claimNumberVal is a user created parameter that will be passed in at run time
- To supply any user created run time parameters, click on the pencil in the top right of the Input Parameters section and create a new 'Query Parameter'. In this example the ***claimNumberVal&#x20;***&#x77;as created to match the value used in the Query Expression box.
  - Optionally a Sort By Field and Sort Direction can be included - ***NOTE the values are not changed on this screen but back in the main method screen***
  - Sort By Field: use the metadata template value to sort by
  - Sort Direction: choose Ascending or Descending in the dropdown

![](https://api.archbee.com/api/optimize/1hH4CNQG9tP4YS-TB-TC6/A5eKf9A1jo4FRmepx65cz_image.png)

**Output Entity:**

This section allows for configuration any metadata fields that should be returned into the pipeline for processing. Click on the pencil icon in the ***Output Entity*** section.

- Once in the Entity Attributes screen, drag an ***Enterprise Metadata Value*** from the left into the center secion
- Name: what you would like it to display as in the attribute list
- Binding: the exact value of the Box metadata template value (i.e. claimNumber)
- Click '***Convert Data Type***' and choose the converted data type value of the Box metadata template

The following screenshot shows an example of a configured Metadata Search method:

This will search Box for all documents where the metadata template 'claim' field 'claimStatus' has a string value of Complete. It will then sort on claimStatus and the resulting set of documents will also include the metadata values for 'claimNumber'

![](https://api.archbee.com/api/optimize/1hH4CNQG9tP4YS-TB-TC6/rp22DfiiKbhuPMxKWwPOn_image.png)

