Document views - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service lists documents by the number of times users viewed each document. It is possible to add a date range and metadata to retrieve information about a subset of documents.

Method Endpoint
POST /analytics/api/v2/documents/views-top

Request example

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

{
  "startDate": "2023-03-29",
  "endDate": "2023-04-29",
  "filters": {
    "metadata": [
      {
        "key": "AFS_version",
        "values": [
          "7.1"
        ]
      }
    ],
    "titleContains": "afs"
  },
  "paging": {
    "page": 2,
    "perPage": 10
  }
}
Field Type Required? Description
startDate String Yes The inclusive start date of the period. The start date is mandatory and must be in the past year.
endDate String Yes The exclusive end date of the period. The end date is mandatory and must be after the start date.
filters Object No An optional addition to the request body to only return results that have certain metadata. The filters element contains the metadata and titleContains elements.
    metadata Array No An element that must be present when using the filters element. It contains the key and values elements.
        key String No A unique name to identify the metadata.
        values Array No The values of the metadata.
    titleContains String No A string that must be present in the title of all returned documents. It is not case-sensitive.
paging Object No A mandatory element that contains page and perPage.
page Number No Indicates the current page, the default value is 1.
perPage Number No The number of results per page, the default value is 10.

If using facets, it is necessary to enter the exact key and at least one value for each key.

Response body

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

{
  "startDate": "2023-03-29",
  "endDate": "2023-04-29",
  "paging": {
    "lastPage": false,
    "page": 2,
    "perPage": 10,
    "totalCount": 1328
  },
  "results": [
    {
      "displayCount": 14,
      "id": "G748gpBdBo94NU3GyWQLEw",
      "link": "http://my.fluidtopics.com/r/AFS-Filters-Description",
      "metadata": [
        {
          "key": "Category",
          "label": "Category",
          "values": [
            "Reference Guide"
          ]
        }
      ],
      "title": "AFS Filters Description",
      "type": "STRUCTURED_DOCUMENT"
    }
  ]
}
Field Type Description
startDate String The inclusive start date of the period as defined in the request body.
endDate String The exclusive end date of the period as defined in the request body.
paging Object An element that contains the lastPage, page, perPage, and totalCount elements.
    lastPage Boolean A Boolean operator indicating whether the page is the last page (true or false).
    page Number The current page.
    perPage Number The number of results per page.
    totalCount Number The total number of available results.
    displayCount Number The number of times the document has been accessed.
    id String The ID of the document.
    link String The document's pretty URL in Fluid Topics.
        key String A unique name to identify the facet.
        label String The facet's localized name.
    title String The title of the document.
    type String The type of document (STRUCTURED_DOCUMENT, UNSTRUCTURED_DOCUMENT, or SHARED_PERSONAL_BOOK).
Return code Description
200 OK Returns 0 or more results.