Loading...

How do I search for assets via the API?

Most searches that can be done in the DAM can also be done as a search through the REST API. For simple searches, use this string to search for assets with the Asset Search endpoint:
 
https://api.widencollective.com/v2/assets/search?query={search-string}

For searches of asset groups, categories, filenames, and tags, you can use search shortcuts to create the search string, such as: 
 
https://api.widencollective.com/v2/assets/search?query=fn:bike

You can have multiple queries in your search string. For example, to search for all assets with category of “sales” and “event” in the filename, the search is: 
 
cat:sales fn:event

Your resulting string would be: 

https://api.widencollective.com/v2/assets/search?query=cat%3Asales%20fn%3Aevent

 

Use display keys for metadata fields 

For searches of metadata fields, we recommend that you don’t use search shortcuts. Metadata field display names can change and break the shortcut and the search string. 

Instead, use the field display key. Each metadata field has a unique display key that never changes, even if you edit the display name for the field. Using it will ensure the integration always references the correct metadata field. 

Display keys are not viewable in the DAM user interface. However, you can use a tool like Postman and the
Viewable Metadata Fields endpoint to make an API call that’ll expose the keys for your metadata fields. 



In this example, your query could look like this: 

https://api.widencollective.com/v2/assets/search?query=assetinfo%3Aphoto

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation