Web service API

How to use PageSeeder's Web service API

autocomplete group field

/groups/{group}/autocomplete/{field} [GET]

com.pageseeder.search.AutoComplete

Description

Autocomplete for a specific field

Returns the list of terms that auto-complete the prefix from terms in the field specified in the URL.

Parameters

NameDescriptionRequiredTypeDefault value
termThe term to autocomplete, effectively a prefix for possible terms ()yesstring
max-termsThe maximum number of terms to returnnointeger > 020

Permission

Undocumented permissions requirements.

Response

If you don't put the term , the return is:

<similar-terms no-term="true"/>

When is inserted the value, this service returns the following XML:

<similar-terms term="[term]">
  <term field="[index field name]"
        text="[matching similar term]" />
  <term field="[index field name]"
        text="[matching similar term]" />
  ...
</similar-terms>

Still have the option to set the maximum amount of terms that will be shown using max-terms , for example:

<similar-terms term="[term]">
  <!-- Show the amount of <term> defined in the search -->
   <!-- If parameter <max-terms> = 1. It will show only 1 <term> -->
 <term field="[index field name]"
        text="[matching similar term]" />
 ...
</similar-terms>

 

Error Handling

No specific errors expected for this service.

Created on , last edited on