Versions Compared

Key

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

...

ParameterDescriptionYAML ExampleJSON Example
ids

Search for a content item using the item's content ID. Note that this is not the content item version ID. When searching for a page, the ID must be prefixed with a "P" and when searching for a media item, the ID should be prefixed with an "M". For example, searching for a page would with the content ID 26111, you would use P26111 and searching for a media with the content ID of 1, you would use M1.

This parameter can be used together with the languages parameter in order to retrieve the current or active version for those languages. When no languages are specified, the current version for all languages defined in XperienCentral is returned.

The ids parameter can only be used in combination with the languages parameter. When other parameters are provided, they will be ignored.

search: 
ids:
  - P26111
  - M1
{
"search": {
"ids": [
"P26111",
"M1"
]}
}
languagesThis parameter specifiesthe language you want the results to be returned in. This parameter supports both the short country code metatag value (ISO-639) as well as the full meta tag value (ISO-639 and ISO-3166 separated by an underscore "_"). Please note that when the full metatag value is provided, only the country code will be used due to a limitation within the content index. The languages parameter can be used in combination with both ID-based queries and parameterized queries. If this parameter is omitted, the active version for each available language will be returned. If there is no active version available, no version will be returned.
search: 
  languages:
  - en_US
  - nl
{
"search": {
"languages": [
"en_US",
"nl"
]}
}
textThis field can be used to search for any text in the title or the body of the documents in the content index.
search:
  text: lorem
{
"search": {
"text": "lorem"
}
}
keywordsAndAdds a list of terms to the query. The results have to contain all the listed terms.
search:  
keywordsAnd:
  - term 1
  - term 2
{
"search": {
"keywordsAnd": [
"term 1",
"term 2"
]}
}
keywordsOrAdds a list of terms to the query. The results have to contain one or more of the terms specified.
search:  
keywordsOr:
  - term 1
  - term 2
{
"search": {
"keywordsOr": [
"term 1",
"term 2"
]}
}
keywordsNotAdds a list of terms to the query. The results must not contain any of the listed terms.
search:
  keywordsNot:
  - term 1
  - term 2
{
"search": {
"keywordsNot": [
"term 1",
"term 2"
]}
}
keywordCategoriesAdds a list of term categories to the query. The result has to contain at least one term that is in one of the provided categories.
search:
  keywordCategories:
  - term category 1
  - term category 2
{
"search": {
"keywordCategories": [
"term category 1",
"term category 2"
]}
}
fromAllows the selection of a subset of the results starting at the value of this parameter. The first result in a result set has an index of 1, therefore the from parameter should always be 1 or higher. Also note that this parameter is inclusive, meaning that if from is 3, for example, the result set will include the third result and higher. When from is omitted, the value 1 will be used.
search:
  from: 3
{
"search": {
"from": 3
}
}
toAllows the selection of a subset of the results ending at the value of this parameter. Like the from parameter, this parameter is inclusive, meaning that when to is set to 1, only the first result will be returned. For example, if from is set to 3 and to is set to 5, the results 3, 4 and 5 will be returned. The minimum value for this parameter is 1. When to is omitted, a maximum number of 100 results will be returned , starting at the from parameter (if specified), otherwise starting from 1.
search:
  to: 3
{
"search": {
"to": 5
}
}

...