Suggest - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service suggests publications and topics based on information entered by end-users.

  • It is possible to paginate this web service using either query parameters or fields in the request body. If both methods are used, the values of the query parameters take precedence.
  • When a user is authenticated, Fluid Topics retrieves user groups to determine how to filter the content returned in the responses of the search web services.
  • When no user credentials are provided in the HTTP header, this web service only returns public results.
  • This web service suggests only the titles of book topics. It does not suggest those of article topics.

As a USER_ADMIN user, it is possible to impersonate another user when using this web service.

Method Endpoint
POST /api/khub/suggest

Request example

{
  "input": "string",
  "contentLocale": "en-US",
  "filters": [
    {
      "key": "string",
      "values": "string"
    },
    ...
  ],
  "sort": [
    {
      "key": "string",
      "order": "ASC"
      "type": "ALPHA"
    },
    ...
  ],
  "maxCount": 5
}

With the following fields:

Field Type Required? Description
input String Yes Expects the string query used to return suggestions.
contentLocale String Yes Expects the content language's ISO code.
filters Array No Enables to filter the results on some metadata values. When multiple values are given, they are combined with an AND or an OR operator depending on the metadata descriptor type. Defaults to an empty list.
sort Array No Enables to specify a custom sort on any metadata. A special keyword is provided to sort by relevance: ft:relevance. Defaults to the standard sorting order.
maxCount Number No Declares the maximum number of returned suggestions. Limited to 1000 replies at most on server-side. Defaults to 5.

Response body

{
  "suggestions": [
    {
      "type": "MAP",
      "editorialType": "BOOK",
      "value": "This is a Book suggestion"
    },
    {
      "type": "MAP",
      "editorialType": "ARTICLE",
      "value": "This is an Article suggestion"
    },
    {
      "type": "TOPIC",
      "value": "This is a book Topic suggestion"
    },
    {
      "type": "DOCUMENT",
      "value": "This is a Unstructured Document suggestion",
      "filenameExtension": "docx",
      "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    }
  ]
}
Field Type Description
value String The string displayed in the suggestion box.
type String Indicates the type of object the suggestion comes from:
  • MAP: a structured publication title.
  • TOPICS: a book topic title.
  • DOCUMENT: an unstructured document title.
editorialType String Indicates, for MAP types only, if the suggested structured publication is a BOOK or an ARTICLE.
mimetype String Indicates, for DOCUMENT types only, the MIME type of the suggestion.
filenameExtension String Indicates, for DOCUMENT types only, the filename extension of the suggestion.