Search completion traces - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service allows users with the ADMIN or BEHAVIOR_DATA_USER roles to list interactions with completion profiles.

Method Endpoint
POST
/api/admin/ai/generate/traces

Request body

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

{
  "nbResults": 25,
  "startDate": "2025-10-27",
  "endDate": "2025-10-31",
  "userId": "2033a3d5-e843-4e01-856f-f5a3dfb29799"
}

The JSON request body expects the following fields:

Field Type Required? Description
nbResults Number No Number of expected results. The maximum value is 1000, and the default value is 50.
If there are more than 1000 conversations, the 1000 conversations returned by the web service are the 1000 most recent conversations.
startDate String No The inclusive start date of the period. The expected format is YYYY-MM-DD.
endDate String No The exclusive end date of the period. The expected format is YYYY-MM-DD.
userId String No A user ID to filter.
  • Use the List users web service to get user IDs.
  • It is possible to filter by API key, by entering the API key name as the value.

Response body

{
    "nbResults": 1,
    "results": [
        {
            "id": "545e15bb-47bc-4f37-80d3-122c747766a6",
            "timestamp": "2025-10-23 12:14:31.447000+00:00",
            "sessionId": "cf1fa350-58d9-4c83-a067-059557487e45",
            "userId": "9b0d1637-ce26-430c-9c50-cd19f1cb68c0",
            "profileId": "try_it_now",
            "input": {
                "query": "You are in charge of helping users with their questions about Fluid Topics. You are polite, kind, and informative. You must refuse to answer questions unrelated to Fluid Topics.\n\nPerform this operation asked by the user: \"\"Explain what this code is doing, step by step, in plain English.\"\"\n\nUse the following content to create your answer:\n------\nThe DITA Open Toolkit supports extensions through the addition of plugins. Plugins allow DITA-OT to handle formats which are not natively supported.\nThe following procedure describes how to add a plugin in a DITA-OT archive.------\n\nYour output must be in HTML format. Do not mention that your output is HTML. Do not put the HTML inside a Markdown codeblock."
            },
            "output": {
                "response": "<p>\nThis content explains how to extend the functionality of the DITA Open Toolkit (DITA-OT) by adding plugins. Plugins are add-ons that enable DITA-OT to work with file formats that it does not support by default. The procedure described guides you through the steps needed to add a plugin to a DITA-OT archive, allowing you to enhance or customize the toolkit’s capabilities.\n</p>"
            }
        }
    ]
}
Field Type Description
nbResults Number The number of traces found.
results Array A list of traces between users and the LLM.
id String The trace's unique ID.
timestamp String The UTC date and time for the query to the LLM, in ISO-8601 format (YYYY-MM-DD HH:MM:SS with microseconds).
sessionId String The session ID. A user can have multiple traces in the same session.
userId String The user's ID.
profileId String An AI profile ID.
input Object Contains information which inform the LLM's answer to the query.
query String The query sent by the user to the LLM.
output Object Contains the LLM's answer to the user query.
response String The answer to the user query sent by the LLM.