Versions Compared

Key

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

The Search and Retrieve API provides a means for looking up content from an application based on search criteria including related content and returning the relevant fields for a specific use case. The application can be an iOS or Android mobile app or it could be a web application or a web site requesting the content. The Search and Retrieve API can be used to search for any content, but it is especially useful for headless content because it allows for referenced content to be included and it also offers field filtering. It is very fast thanks to it use of the Apache Solr search engine and because it retrieves content via the XperienCentral cache. The search queries are concise and written either in JSON which is usually used when querying from code or in YAML which is easier to read and write when developing or testing queries.

In order to use this functionality, you need XperienCentral versions R32 and higher or versions R27 and higher if you have the  Headless Add-on upgraded to version 2.2.5 or 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 for sending these types of requests is Postman.

In This Topic

Table of Contents
maxLevel2
minLevel2

...

Code Block
{
  "results" : [ {
    "_searchRetrieve" : {
      "contentItemID" : "M123",
      "language" : "nl_NL",
      "success" : true
    },
    ... JSON contents of the first result ...
  }, {
    "_searchRetrieve" : {
      "contentItemID" : "P12345",
      "language" : "en_US",
      "success" : true
    },
    ... JSON contents of the first result ...
  } ]
}

...


    ... JSON contents of the first result ...
  } ]
}


More Sample Queries

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

...

If you have access to our the GX Software Jira issue tracking system, see this issue , see thttps://connect.gxsoftware.com/jira/browse/XA-636 and its sub-tasks for all the technical details. Notice that the The XperienCentral Headless add-on  which which contains this functionality can be upgraded without upgrading XperienCentral. The Search and Retrieve API works on XperienCentral R27 or higher, but if using a version older than R32 the Headless add-on must be upgraded to version 2.2.5.

...

.

Developer's Guide

You have already seen a few examples on how to use the API. In this section you can read the details and possibilities the API offers.

...