Web service API

How to use PageSeeder's Web service API

find group image

/groups/{group}/images/find [POST]

com.pageseeder.search.FindGraphics

Description

Find images in the specified group matching the criteria specified in the request.

Note

This service is identical to /groups/{group}/images/find except that it uses method POST instead of GET so results are cached and request criteria are not in the request logs.

Parameters

NameDescriptionRequiredTypeDefault value
folderThe folder containing the images (includes subfolders)nopath
pageThe result page for when results span over multiple pagesnolong1
prefixThe prefix the images must start with.no string

Permission

Undocumented permissions requirements.

Response

The XML format is based on search query and results:

<graphics-search>
   <search-results index="[Index ID]">
     <query lucene="[lucene query]">
        <!-- Format of graphics query may change without notice -->
        <graphic-query empty="false"
                        query="psmediatype:image/jpeg psmediatype:image/gif psmediatype:image/png psmediatype:image/bmp">
           <image-formats>
             <format name="JPEG"
                     mediatype="image/jpeg"/>
             <format name="GIF"
                     mediatype="image/gif"/>
             <format name="PNG"
                     mediatype="image/png"/>
             <format name="BMP"
                     mediatype="image/bmp"/>
           </image-formats>
           <sort by="relevance"/>
        </graphic-query>
     </query>
     <metadata>
       <hits>
         <per-page>20</per-page>
         <total>1</total>
       </hits>
       <page>
         <first-hit>1</first-hit>
         <last-hit>1</last-hit>
         <current>1</current>
         <last>1</last>
       </page>
     </metadata>
     <documents>
       <document>
         <score>[score between 0 and 1]</score>
         <field name="psid">[URI ID]</field>
         <field name="pstitle">[URI Title]</field>
         <field name="pstype">document</field>
         <field name="psmediatype">[media type (starts with 'image/')]</field>
         <field name="psmodifieddate"
                datetime="[datetime]">[datetime]</field>
         <field name="psfilename">[URI File name]</field>
         <field name="psurifolder">[URI Folder]</field>
         <field name="psfolder">[URI Folder]</field>
         <field name="pssize">[File size in bytes]</field>
         <field name="psdocid">[Doc ID]</field>
         <!-- The image dimension may not always be available -->
         <field name="pswidth">[Image width in pixels]</field>
         <field name="psheight">[Image height in pixels]</field>
       </document>
       ...
     </documents>
   </search-results>
</graphics-search>

Error handling

No specific errors expected for this service.

Created on , last edited on