Suggest item keywords for auto-completion of default search
get
/content/published/api/v1.1/items/suggest
Suggestion of item keywords for auto-completion of search terms in a default search.
For example to get suggested auto completion keywords/phrase for the term "Race", the following API :
/items/suggest?kw=Race&limit=10&channelToken= will return a collection of suggested keywords/phrases to auto complete search term.
Query Parameters :
For example to get suggested auto completion keywords/phrase for the term "Race", the following API :
/items/suggest?kw=Race&limit=10&channelToken=
Query Parameters :
Parameter Name | Required | Description |
---|---|---|
kw | No | Partial search term. Defaults to empty string "". |
language | No | Language tag with variants."". |
limit | No | This parameter limits size of the results.Defaults to 10 |
channelToken | Yes | This parameter accepts channelToken of a channel and is used to control the returned results. The result will contain keyword suggested for items targeted to the channel that the specified channelToken belongs to. |
links | No | This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby |
Request
Query Parameters
-
channelToken(optional): string
This parameter accepts channelToken of a channel and is used to control the returned results. The result will contain keyword suggested for items targeted to the channel that the specified channelToken belongs to. A channel token must be provided as a query parameter.
-
kw(optional): string
Partial search term
-
language(optional): string
This parameter accepts a language tag along with variants(e.g. en-US) to filter keyword suggestions in a specific language
-
limit(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the size of keywords suggested for auto-completion.Default Value:
10
-
links(optional): string
Accepts a comma-separated list of rel (relation) links, which the client requires in the results. By default, all the applicable links in a resource are included in the response. Possible values are: self, canonical, describedby Example: links=self,canonical will only return the links with the rel property self or canonical.
Response
Supported Media Types
- application/json
200 Response
Successful operation.
Root Schema : CollectionProperties
Type:
object
CollectionProperties.
Show Source
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
properties(optional):
object properties
Additional Properties Allowed: additionalPropertiesadditional collection properties.
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
Nested Schema : links
Type:
array
Links of the resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : pinned
Type:
array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : properties
Type:
object
Additional Properties Allowed
Show Source
additional collection properties.
Nested Schema : items
Type:
object
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : additionalProperties
Type:
object
400 Response
Bad Request. The server is unable to process the request on the client side due to malformed syntax, invalid data or message framing.
403 Response
Forbidden. Client is not authorized to perform this request.
500 Response
Internal server error. An unexpected error condition encountered in the system.