Content usage heatmap - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service responds with a heatmap of content usage during a selected period. The heatmap is categorized by metadata.

Method Endpoint
POST /analytics/api/v2/khub/views-heatmap

Request example

The following lines show an example of a JSON request body:

{
  "startDate": "2023-03-29",
  "endDate": "2023-04-29",
  "levels": [
    {
      "metadataKey": "product",
      "metadataValues": ["FluidTopics", "AFS"]
    },
    {
      "metadataKey": "version",
      "metadataValues": []
    }
  ]
}
Field Type Required? Description
startDate String Yes The inclusive start date of the period. The start date is mandatory. It must be within the past year.
endDate String Yes The exclusive end date of the period. The end date is mandatory and must be later than the start date.
levels Array Yes A mandatory parameter describing the metadata keys and values that will appear in the response body. The first set of metadata is the first level, the second set is the second level, and so on.
    metadataKey String Yes A unique name to identify the facet. It is necessary to define at least one metadata key.
    metadataValues Array Yes An optional parameter defining the targeted values among all those that exist for the key. When empty, all values are used.

Response body

The following lines show an example of a JSON response body:

{
  "startDate": "2023-03-29",
  "endDate": "2023-04-29",
  "totalDisplayCount": 1578,
  "results": [
    {
      "metadataKey": "product",
      "metadataLabel": "Product Name",
      "metadataValue": "FluidTopics",
      "displayCount": 421,
      "children": [
        {
          "metadataKey": "version",
          "metadataLabel": "Version",
          "metadataValue": "3.8",
          "displayCount": 32,
          "children": []
        }
      ]
    },
    {
      "metadataKey": "product",
      "metadataLabel": "Product Name",
      "metadataValue": "AFS",
      "displayCount": 121,
      "children": []
    }
  ]
}
Field Type Description
startDate String The inclusive start date of the period as defined in the input.
endDate String The exclusive end date of the period as defined in the input.
totalDisplayCount Number An integer representing the number of times documents with all the selected metadata have been accessed.
results Array A section with different levels of nodes.
    metadataKey String A unique name to identify the facet.
    metadataLabel String The facet's localized name.
    metadataValues Array Indicates the targeted values among all those that exist for the key.
    children Array Collections of documents that have the metadata specified for the node.
    displayCount Number The number of times the collection of documents with the specified metadata has been accessed.
Return code Description
200 OK Returns 0 or more results.