Check the tutorial section to answer common questions

EnterMedia Issue Tracker > Frank Corrigan's Issues > Topic: REST API Search Caching Log In

Open Issues

Issues

Issue 3220 : REST API Search Caching

Status Person Date Message
Regular Priority Frank Corrigan 7/28/10 12:44 PM
I am using the REST API to search for assets and when using the URL below
 I get a result back for page 4 but if I change the page number to page
 5 I do not get the new page of results back. It seem like the results are
 cached and it is not sending the result for the new page. If I change the
 search value I do get new results returned. Is there something I need to
 set to force an update?

https://serveraddress/emlvers2/sfcreative/services/rest/assetsearch.xml?catalogid=sfcreative/catalogs/archive&page=4&field=description&value=cars
Regular Priority Frank Corrigan 8/9/10 5:12 PM
If I do a search this .....

https://servername.org:8441/emlvers2/sfcreative/services/rest/assetsearch.xml?catalogid=sfcreative/catalogs/archive&field=description&operation=matches&description.value=cat&page=1

I get this back, but how do i get the next page of results?


<rsp stat="ok">
−
<hits sessionid="hitssfcreative/catalogs/archive" page="1"
 pages="29" totalsize="116">
−
<hit id="007h0200dotjpg1117672298" name="007H0200.JPG"
 fileformat="jpg" shortdescription="Photo, lion yawning Color
 High res">
−
<thumb>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/thumb/photo/cumulus1/mam_2/ClipperLibrary/Electronic
 Clipper 2000/EC 02-00/Photos/007H0200.JPG/thumb.jpg
</thumb>
−
<preview>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/large/photo/cumulus1/mam_2/ClipperLibrary/Electronic
 Clipper 2000/EC 02-00/Photos/007H0200.JPG/image.jpg
</preview>
−
<original>
/emlvers2/sfcreative/catalogs/archive/downloads/originals/photo/cumulus1/mam_2/ClipperLibrary/Electronic
 Clipper 2000/EC 02-00/Photos/007H0200.JPG/007H0200.JPG
</original>
</hit>
−
<hit id="008x0496dottif1053476366" name="008x0496.tif"
 fileformat="tiff" shortdescription="EC 04/96, kitten, cat
 sitting on roof">
−
<thumb>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/thumb/photo/cumulus1/mam_2/ClipperLibrary/Electronic
 Clipper 1995 -1997/Electronic Clipper 1996/EC 04-96/008x0496.tif/thumb.jpg
</thumb>
−
<preview>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/large/photo/cumulus1/mam_2/ClipperLibrary/Electronic
 Clipper 1995 -1997/Electronic Clipper 1996/EC 04-96/008x0496.tif/image.jpg
</preview>
−
<original>
/emlvers2/sfcreative/catalogs/archive/downloads/originals/photo/cumulus1/mam_2/ClipperLibrary/Electronic
 Clipper 1995 -1997/Electronic Clipper 1996/EC 04-96/008x0496.tif/008x0496.tif
</original>
</hit>
−
<hit id="012p1104lldotjpg1096419396" name="012P1104LL.JPG"
 fileformat="jpg" shortdescription="Happy couple with cat">
−
<thumb>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/thumb/photo/cumulus1/mam_2/LiquidLibrary/LiquidLibrary
 2004/LL 11-04/Photos High/012P1104LL.JPG/thumb.jpg
</thumb>
−
<preview>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/large/photo/cumulus1/mam_2/LiquidLibrary/LiquidLibrary
 2004/LL 11-04/Photos High/012P1104LL.JPG/image.jpg
</preview>
−
<original>
/emlvers2/sfcreative/catalogs/archive/downloads/originals/photo/cumulus1/mam_2/LiquidLibrary/LiquidLibrary
 2004/LL 11-04/Photos High/012P1104LL.JPG/012P1104LL.JPG
</original>
</hit>
−
<hit id="01710frhdotjpg1055204605" name="01710FRH.JPG"
 fileformat="jpg" shortdescription="Cat scan, MRI">
−
<thumb>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/thumb/photo/cumulus1/mam_4/Dynamic
 Graphics Library/PRO_18_D1/01710FRH.JPG/thumb.jpg
</thumb>
−
<preview>
/emlvers2/sfcreative/catalogs/archive/downloads/preview/large/photo/cumulus1/mam_4/Dynamic
 Graphics Library/PRO_18_D1/01710FRH.JPG/image.jpg
</preview>
−
<original>
/emlvers2/sfcreative/catalogs/archive/downloads/originals/photo/cumulus1/mam_4/Dynamic
 Graphics Library/PRO_18_D1/01710FRH.JPG/01710FRH.JPG
</original>
</hit>
</hits>
</rsp>
Regular Priority Christopher Burkey 8/9/10 5:41 PM
To get the next page you need to call another url. Here is the code from
 the Unit test:

		String sessionid = hits.attributeValue("sessionid");
		
		method = new PostMethod(getServerUrl() + getDefaultApplicationId() +
 "/services/rest/getpage.xml");
		method.addParameter(new NameValuePair("catalogid", getDefaultCatalogId()));
		method.addParameter(new NameValuePair("hitssessionid", sessionid));
		method.addParameter(new NameValuePair("page", "2"));
Closed Christopher Burkey 8/20/10 10:13 AM

             

Refresh