Rest API Search for Assets with specific Metadata


#1

Hi @all,

just doing my first steps with pimcore and RestAPI. Currently Pimcore is standalone, later (if Pimcore runs on Symfony 4 we integrated everything).

But at the moment, i use it via Rest API.

I would like to make a query to search for Assets. This is basically clear and good described in the doc how to build a RestUri to search for.

But - what i couldn´t find is how to properly search for custom metadata?

I´ve added to all Assets a Metadata field called “tag”. It´s a input field.

http://YOUR-DOMAIN/webservice/rest/asset-list?apikey=[API-KEY]&q={“tag”:%20"certificate"}

But this doesn´t work.

Any ideas or best practice how to do this?

Hope somebody can help me.

Thanks a lot,
Michael


#2

Have taken a look inside the Pimcore Code for the service. I´ve seen - it´s not possible out of the box.
Ok, i´ll try to extend Pimcore first time - to give me the functionality.


#3

@ITspirit maybe you can use Pimcore tags functionality and then use Get List of Tags and Get Elements for a Tag endpoints?


#4

Thank, i´ve overlook this possibility. Works for me like a charm.