We all know that magento provides api to filter products. Now I wants to extract all filters like brands, sizes and other attributes from filtered results. For website, we know that we have layered navigation but how to implement it for mobile app.
Just I required to loop over all products and fetch attributes. Does it make sense when list of products is larger?
okay i understand !! Well Magento 2 have searchCriteria filter options for Rest API.
Using this SearchCriteria you can passed whatever filter you would like to give as conditions same way filters with filtergroups as well.
Here i am sharing devdocs link how you can use SearchCriteria with magento 2 rest api - https://devdocs.magento.com/guides/v2.2/rest/performing-searches.html
Also you might have seen swagger for rest api , still for reference here is the link for the Magento 2 Rest api - https://devdocs.magento.com/swagger/
Sorry! If am not clear in my question.
For example, if I search products by particular category e.g. fashion. Now I want all sub-categories (e.g. men and women) and all brands from my search results and possible colors from my search results which I used when I further refine my search results.
This I want to achieve for mobile apps.
I understand you want to customization app where you decided which item place where. I suggest Magento App builder were you satisfied for your requirement. Magento 2 app builder comes with well-thought predefined sections for the homepage. Simply add the products and the images you want to show and our smart app extension will arrange the sections to create a custom look.