Searching for an asset via the API | Community
Skip to main content
March 4, 2020
Solved

Searching for an asset via the API

  • March 4, 2020
  • 1 reply
  • 1933 views

Hello everyone,

 

As I am quite new to the world of Adobe Assets I apologize if this question has already been raised and solved.

 

What I am interested in is what are the options, and best practices, for searching for a desired asset via the AEM Assets API? The user of my app is allowed to enter the search keywords which correspond to the asset metadata attributes. Based on the user input my application should return the desired asset which is stored in the DAM.

 

However I am not sure what is the best way to achieve this in Adobe AEM Assets? v.6.5

 

I appreciate the help

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sameer-Bhalerao

Hi There,

 

I think  you are talking about the Asset Http API which is mostly used for asset manipulation(crud operations) and not for search.

 

Searching can be done using querybuider API which is exposed @ http://localhost:4502/bin/querybuilder.json and allows parameters to be passed on to the search engine. 

 

Please check https://docs.adobe.com/content/help/en/experience-manager-64/developing/platform/query-builder/querybuilder-api.html which will help to understand the overall big picture about AEM searches.

 

Generally you can use the querybuilder API and pass it all the predicates to do search. You can use the free text search to allow searching all the metadata fields or you can restrict the search to relevant metadata using property searches. All this is derived from the kind of query that you use. 

 

Also do not forget about creating indexes as indexes help to run the query faster. It is all Lucene under the hood.

 

Thanks!

 

 

1 reply

Sameer-BhaleraoAdobe EmployeeAccepted solution
Adobe Employee
October 26, 2020

Hi There,

 

I think  you are talking about the Asset Http API which is mostly used for asset manipulation(crud operations) and not for search.

 

Searching can be done using querybuider API which is exposed @ http://localhost:4502/bin/querybuilder.json and allows parameters to be passed on to the search engine. 

 

Please check https://docs.adobe.com/content/help/en/experience-manager-64/developing/platform/query-builder/querybuilder-api.html which will help to understand the overall big picture about AEM searches.

 

Generally you can use the querybuilder API and pass it all the predicates to do search. You can use the free text search to allow searching all the metadata fields or you can restrict the search to relevant metadata using property searches. All this is derived from the kind of query that you use. 

 

Also do not forget about creating indexes as indexes help to run the query faster. It is all Lucene under the hood.

 

Thanks!