API: How to retrieve the right images

Hi there,

can you give me a hint, how I can retrieve all images which are linked to a specific label. We are using razuna in combination with magento. To have an offline application, we need to download all pictures from razuna into the offline version of the magento shop. There will be also an update routine, which updates the offline version once a day.
Thanks in advance
Best regards
Mike

Hi Mike,
I would simply use the search API and retrieve the images with matching
label.

You can see how it works here:
http://wiki.razuna.com/display/ecp/Search+API2

Hi Jens, thanks for the hint.

But it does not work as expected. We use the following call: https://spahn.razuna.com/global/api2/search.cfc?method=searchassets&maxrows=1000&api_key

The result is as:

{“COLUMNS”:[“id”,“filename”,“folder_id”,“folder_name”,“extension”,“video_image”,“filename_org”,“kind”,“extension_thumb”,“path_to_asset”,“cloud_url”,“cloud_url_org”,“size”,“size_num”,“width”,“height”,“isalias”,“description”,“keywords”,“dateadd”,“datechange”,“expiry_date_actual”,“local_url_org”,“local_url_thumb”,“colid”,“colorspace”,“xdpi”,“ydpi”,“unit”,“md5hash”,“filename_forsort”,“cnt”,“date_create”,“date_change”,“file_type”,“responsecode”,“totalassetscount”,“calledwith”],“DATA”:[[“58763BFA185B41AD80E1641824ACB61D”,“6110956_v.jpg”,“80B20A770EAB43D49ABECF99ED96E819”,“Bänke”,“jpg”,“dummy”,“6110956_v.jpg”,“img”,“jpg”,“80B20A770EAB43D49ABECF99ED96E819/img/58763BFA185B41AD80E1641824ACB61D”,null,null,“2936173”,2936173,591,398,“0”,"",“Standard,”,“February, 3 2016 17:56:08”,“February, 19 2016 07:25:30”,null,“http://spahn.razuna.com//assets/4865/80B20A770EAB43D49ABECF99ED96E819/img/58763BFA185B41AD80E1641824ACB61D/6110956_v.jpg",“http://spahn.razuna.com//assets/4865/80B20A770EAB43D49ABECF99ED96E819/img/58763BFA185B41AD80E1641824ACB61D/thumb_58763BFA185B41AD80E1641824ACB61D.jpg”,null,“RGB”,“59.055”,“59.055”,“cm”,“C74707848EB95E01C8F2171992DCC720”,“6110956_v.jpg”,“6”,"February, 3 2016 17:56:08”,“February, 19 2016 07:25:30”,“original”,0,6,“6110956,6129656,6149555”],[“D76107730A5E4FA68BAB477890139E62”,“612-96-56.jpg”,“80B20A770EAB43D49ABECF99ED96E819”,“Bänke”,“jpg”,“dummy”,“612-96-56.jpg”,“img”,“jpg”,“80B20A770EAB43D49ABECF99ED96E819/img/D76107730A5E4FA68BAB477890139E62”,null,null,“537608”,537608,1932,1667,“0”,"","",“February, 3 2016 17:56:15”,“March, 8 2016 13:19:59”,null,“http://spahn.razuna.com//assets/4865/80B20A770EAB43D49ABECF99ED96E819/img/D76107730A5E4FA68BAB477890139E62/612-96-56.jpg",“http://spahn.razuna.com//assets/4865/80B20A770EAB43D49ABECF99ED96E819/img/D76107730A5E4FA68BAB477890139E62/thumb_D76107730A5E4FA68BAB477890139E62.jpg”,null,“RGB”,“150”,“150”,“inches”,“9796FA44C9F85994348EA77F7C19B400”,“612-96-56.jpg”,“6”,"February, 3 2016 17:56:15”,"March, 8 2016

A lot of information, but no lables or SKUs.

What is going wrong?

Thanks Mike

HI Michel,
If you need to get assets matching a label, simply search the label:
http://wiki.razuna.com/display/ecp/Search+API2#SearchAPI2-SearchforLabels

Then simply create a label SKU with the actual SKUs as sub labels. That
should work.

If you use custom fields for SKUs you will need to use he search custom
field API:
http://wiki.razuna.com/display/ecp/Search+API2#SearchAPI2-SearchforCustomFields

Hi Jens,

thanks for your answer. Our main issue remains: The output stream of razuna contains no column “Label”. So when I search for three SKUs, I get a bunch of pictures back, but I can not see, which picture belongs to which label.
As razuna takes for each call 1 sec (regardless the search criteria) it takes a lot of time if I would make a search for every single label.
Is there a chance to get the label in the output stream?

Thanks in advance
Mike

Hi,

We are actually not adding new features to the Razuna 1.8.x line anymore.
However, we just made an exception for another issue and I’m sure we can
add labels here. This is not a confirmation, just that we will look into
it. Watch out blog and twitter to find out about the upcoming release.

Hi,

I just revisited this topic and reading it, I can’t help but think that you should actually use the getassetoflabel() method in the label API ( http://wiki.razuna.com/display/ecp/Label+API2#LabelAPI2-Getassetoflabel ).

This method allows you to retrieve all files with a specific label.

Let me know if that works.