Find all images via API

Calling the API search assets method, what searchfor parameter should I use to return all images? It seems that the asterisk does not result in that !?

$base_url = 'http://api.razuna.com/global/api2/';
$api = '&api_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
$search_for = '*';
$doc_type = 'img';
$url = $base_url.'search.cfc?method=searchassets'.$api.'&searchfor='.$search_for.'&show='.$doc_type.'&maxrows=100000';

Hope one could help me out - thanks :smile:

Nevil,

This URL always works for me:
curl -s ā€œhttp://api/global/api2/search.cfc?method=searchassets&maxrows=100&show=img&api_key=${APIKEY}&searchfor=*ā€

Vince

Thanks for replying Vince :smile:

However, it seems that using the asterisk won’t work as I’m testing it on a folder with 12 images and the search returns none :frowning:

http://api.razuna.com/global/api2/search.cfc?method=searchassets&api_key=XXXX&searchfor=*&folderid=38A4A0EBC6D8480BAB90F26A20BBD3DE&show=img&maxrows=500000

Any suggestions or work-arounds any-one?

Hi,

This should actually work. I’ve just tested this with my own account and it
retrieves all files in the folder.

We also just deployed a new search algorithm and are re-indexing all files
for all customers. Maybe this will help too.

Ok, maybe the forced re-indexing is part of my problem, as finding images is very flawed at the moment and the indexing are taking quite some time (4000+ images). I’ll try again next week when re-indexing hopefully has finished…

Does this warning have to do with the new search algorithm or the re-indexing?
It appears on the ā€œFolder Sharingā€ tab.

Oops, something really strange happened here. Please copy the error message below and send it to your administrator who will help resolve the problem. Thank you.

Error:
Variable [QRY_FOLDER_NAME] does not exist

That issue was a typo in our recent deployment. It has been fixed by now.

Hurray, after the re-index it seems to work :smile:
…but only if I define a folder ID :frowning: If I don’t it doesn’t return anything:

http://api.razuna.com/global/api2/search.cfc?method=searchassets&api_key=XXXX&folderid=A58DA97D744B4D9A92121B601A1AF266&show=img&maxrows=500000&showrenditions=false&searchfor=
 - 78 IMAGES FOUND

http://api.razuna.com/global/api2/search.cfc?method=searchassets&api_key=XXXX&show=img&maxrows=500000&showrenditions=false&searchfor=
 - 0 IMAGES FOUND

So, how do I find all images across all folder?
Anyone? Thanks :smile: