Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This functionality requires XperienCentral versions R32 and higher or versions R27 and higher if you have in combination with the Headless Add-on versions 2.2.5 and higher. The setting search_retrieve_enabled in the headless_search_retrieve section on the General tab of the Setup Tool must be enabled. A free tool that is useful for sending these types of requests is Postman.

...

To send an HTTP POST request to https://yoursite.com/web/searchretrieve/v1/yaml, the search query would be:

...

To retrieve the JSON contents, all presentations involved must be headless (JSON) presentations. That This means the Page presentation but also all different Element the page presentation as well as all the required element presentations.

To retrieve results 11 to through 20 of content items in English with the keywords "news" and "sports", the query would be:

...

The first version of the Search and Retrieve API was released in XperienCentral version R32. It contains the functionalities described here and is intended to be used in a development environment but and should not be used in a production environment. The following functionality will be added in later versions in order to make the API production ready:

...

There are various different IDs used in XperienCentral for different purposes. Content Item IDs are used to request specific content items via this API, often in combination with a specific language that which will return the current active version in that language. Version IDs are never used in the API. A content item is either a page or a media item. Since the numerical ID used for pages and media items might overlap, this internal ID is prefixed by either a "P" (for a pagepages) or an "M" (for media items) in this API. If the ID of a content item is already known from a previous search request, it can easily be retrieved using the ID's parameter as shown in the example above.

...

Query results can be limited to either one or a number of explicit languages using the languages parameter. See the  Search Parameters below for details on the format. A media item is rendered via its "display-on" page. The language of the media item determines the language version of the display-on page, therefore you must ensure that a display-on page is available for each supported language.

...

A successful response contains a results field that contains a list of results (see the examples above) . A successful result always starts with the following field:

...

As you can see, the response contains the Content Item ID, language and a field indicates whether it was successful. The JSON that comes thereafter is determined by the JSON presentation of the content item. See also the examples above for sample responses.

Response Item Errors

If there is an error for a specific item, the result for that item resembles the following:

...

A search might fail due to a malformed search query. In that case, the response will contain an error message.  Since Because an internal parse error is passed on, it looks similar to the following:

...

In this example, the  field name "idsxxx" was used in place of one of the valid ones listed , (including IDs). The HTTP Response Code for errors due to a bad search query will be 400, "HTTP response code for invalid search query errors is "400, Bad Request".

Unexpected (internal) errors

Errors which are not due to a bad not due to an invalid search query will return the following general error message:

...

These errors will have the Response Code "500, " Internal Server Error".


Back to top


...

Anchor
search-parameters
search-parameters
Search Parameters

...