Web service API

How to use PageSeeder's Web service API

autocomplete group

/groups/{group}/autocomplete [GET]

com.pageseeder.search.AutoComplete

Description

Autocomplete the specified term in the group.

This service returns the list of terms that complete the specified prefix.

Auto-complete configuration

The auto-complete function has been pre-configured to match terms in the following index fields:

  • pstitle
  • psfilename
  • pscontent
  • psdocid

To use the auto-complete on a specific field, use Service: /groups/{group}/autocomplete/{field} [GET] instead.

Parameters

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

Permission

Undocumented permissions requirements.

Response

This service returns the following XML, when the term has value.

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

If the term hasn't value is:

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

The max-terms   show the number of rows returned, for example:

Without the max-terms the return is:

Https://localhost/ps/service/groups/{group}/autocomplete?term=20

<similar-terms term="20">
    <term field="pstitle" text="20"/>
    <term field="psfilename" text="20"/>
    <term field="pscontent" text="20"/>
</similar-terms>

With max-terms  the return is:

Https://localhost/ps/service/groups/pub-a/autocomplete?term=20&max-terms=1

<similar-terms term="20">
    <term field="pstitle" text="20"/>
</similar-terms>

Error Handling

No specific errors expected for this service.

Created on , last edited on