Get locales for filtered content - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service retrieves the usable content locales for specific Fluid Topics sources only, with the count of Knowledge Hub items for each locale.

Method Endpoint
POST
/api/khub/locales/search

This web service requires authentication on portals with mandatory authentication.

Request body

The following lines show an example of JSON request body:

{
  "metadataFilters": [
    {
      "key": "product",
      "valueFilter": {
        "values": [
          "poneySoft"
        ],
        "negative": false
      }
    },
    {
      "key": "ft:sourceId",
      "valueFilter": {
        "values": [
          "source-A",
          "source-B"
        ],
        "negative": false
      }
    }
  ]
}
Field Type Required? Description
metadataFilters Array No Filters the results based on selected criteria including metadata and date ranges. Defaults to an empty list.
key String Yes Expects a metadata key.
valueFilter Object No Contains the filtering conditions based on metadata values.
values Array Yes Defines the value for the selected key. When multiple values are defined, they are combined with an AND or an OR operator depending on the tenant's configuration.
negative Boolean No When true, this parameter excludes results matching the previously defined values. By default, the negative parameter is implicit and false.
dateFilter Object No Specifies the date-based filtering conditions using predefined periods.
type String Yes Restricts results to those within a predefined period. Acceptable values are LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR.
rangeFilter Object No Specifies custom date range filtering.
from String Yes The inclusive start date of the period. If unspecified, the default value is 1970-01-01.
to String Yes The inclusive end date of the period. If unspecified, the default value is the current day.

If the request body only contains an empty JSON object {} or an empty list of filters, the results are the same as they are when using the Get locales for all content web service.

Response body

{
  "contentLocales": [
    {
      "lang": "fr",
      "label": "Français",
      "count": 42
    },
    {
      "lang": "zh-CN",
      "label": "中文 (大陆)",
      "count": 42
    }
  ]
}
Field Type Description
contentLocales Array The content language ISO code.
lang String The content language ISO code.
label String The language as displayed on the portal.
count Number The number of Knowledge Hub items corresponding to the given language.
Return code Description
200 OK Returns 0 or more results.
400 BAD REQUEST Invalid JSON request body.