Multi-Search

Overview

This API allows a user to perform search operations on articles, topics, external and internal web sites.

Note

  • 'articles-in-topic-tree' should not be used along with 'include-articles-in-topics' and 'exclude-articles-in-topics'. Use of 'articles-in-topic-tree' is mutually exclusive to 'include-articles-in-topics' and 'exclude-articles-in-topics'.
  • Any value supplied using the $pagenum, $pagesize and $rangestart, $rangesize parameters is honored for search results from articles and topics only. External and internal web sites search result will use default pagination.
SecurityoAuthUser or oAuthCustomer or oAuthAnonymousCustomer
Request
path Parameters
portalID
required
number
Example: 202200000001001
query Parameters
$lang
string

The knowledge base language used for retrieving the response. This must be a language that is made available to the user. If this parameter is not passed, then the default language of the system is used.

Enum: "en-US" "en-GB" "fr-FR" "es-ES" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "sv-SE" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR"
Example: $lang=en-US
q
required
string

The search query string. The string must be escaped as required by the URL syntax rules.

Example: q=credit
resourceType
string

Type of resource to be fetched.

Enum: "article" "topic"
excludeType
string

Type of resource to be fetched.

Enum: "article" "topic"
customFields
string

A list of custom attributes to be included in the searchable fields. It should be selected as searchable attributes from the portal settings.

Example: customFields=usability,validated
filter[articles-in-topic-tree]
number

This parameter will restrict the search scope to the provided topic and it's sub topic.

Example: filter[articles-in-topic-tree]=202200000001037
filter[include-articles-in-topics]
string

The IDs of the comma seperated topic ids list will restrict the search scope to these topic Ids and their articles

Example: filter[include-articles-in-topics]=202200000001061, 202200000001056
filter[exclude-articles-in-topics]
string

The IDs of the comma seperated topic ids list will exclude these topics and their articles from search scope.

Example: filter[exclude-articles-in-topics]=202200000001056
custom_attribute_name
string

The custom attribute name on which filtering is required. This name needs to be prefixed and suffixed by two underscores (__).Any spaces in the custom attribute name needs to be replaced by underscore in the request.

Example: custom_attribute_name=__customfield__
custom_attribute_value
string

The value of the custom attribute on which filtering is required.This filtering on the custom attribute value is case-sensitive.

Example: custom_attribute_value=Usability
EXCLUDE_RELATED_TERMS
string

Prevents multi-search from expanding search terms into related terms, if that feature is enabled on the portal.

Example: EXCLUDE_RELATED_TERMS=yes
filter[tags]
string

A comma separated list of Tag / Tag Group IDs. Tag IDs and Tag Group IDs can be mixed together.

Example: filter[tags]=202200000001177,202200000001185
$pagenum
string

Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
Default value: 1

$pagesize
string

Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
Default value: 10

$rangestart
string

Range parameter that specifies the starting index of the range of results to be returned. Used in conjunction with $rangesize.
Default value: 1

$rangesize
string

Range parameter that specifies the number (range) of results to be returned. Used in conjunction with $rangestart.
Default value: 10

$attribute
string

The fields of the article to be returned.

Example: $attribute=articleMacro, availabilityDate, averageRating, content, contentText, imageUrl, orderNumber, suggestionType, timesRated, availableEditions, articleTypeAttributes, topic.custom.name, all
header Parameters
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
X-egain-tenant-id
string

Unique identifier for tenant.

X-egain-activity-id
integer

Numeric unique identifier of interaction from eGain.

X-interaction-id
string

Unique identifier for interaction from other CRM applications.

Responses
200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

406

Not acceptable

500

Internal server error

get/portals/{portalID}/search
Request samples
Response samples
application/json
{
  • "article": [
    ],
  • "topic": [
    ],
  • "webItem": [ ],
  • "intrawebItem": [ ],
  • "query": "article",
  • "isSpellingCorrected": false,
  • "searchIncludesRelatedTerms": false,
  • "tagCategories": { },
  • "paginationInfo": {
    }
}