Skip to main content
NiCE CXone Mpower Expert
Expert Success Center

Completions Download API for GenSearch Responses

Your site can be configured to store generative queries and corresponding responses. This capability serves to help site administrators identify specific queries and responses for periodic auditing purposes, and to identify content gaps to improve generative responses. The report is a CSV download accessible through your browser or through the API.

Completions report overview

The Completions Report API endpoint gives you data about the queries and responses site visitors are generating using Expert LLM tools on your site. This information shows:

  • How users ask questions
  • The responses generative AI returned for those questions
  • The pages the responses were pulled from to answer the query.

Each row in the report represents a Completions event.  

API endpoint:  GET {site-url}/@api/deki/llm/completion/report

Admins can call the report from the browser by modifying their URL as follows: {site-url}/@api/deki/llm/completion/report.

Query parameters

    Name Description Example
    day=[number]

    Download data for a specific day.

    If no day is provided, the entire month is downloaded as a ZIP file with each day as an individual CSV.

    {site-url}/@api/deki/llm/completion/report?month=2025-08&day=3&format=zip returns data for August 3, 2025 as a zipped CSV.

    Can only be used ifformat=zip

    format=[csv, zip] Sets the download format. CSV is the default. {site-url}/@api/deki/llm/completion/report?format=zip returns the report as a zipped csv file for the current month
    month=YYYY-MM

    Download data for a specific month.

    If no month is provided, the previous completed month is downloaded.

    {site-url}/@api/deki/llm/completion/report?month=2025-08 returns data for August 2025 as a csv.
    Use parameters to paginate responses for large downloads

    Depending on your browser or operating system, the completion CSV download may contain so many lines that Excel cannot ingest them all. To solve for this, paginate the report rows to get smaller bits of information.

    The following pagination-related query parameters are only supported with format=csv. To get a paginated XML or JSON response:

    1. (Optional) Check the size of the download via summary parameter

      API endpoint:  GET {site-url}/@api/deki/llm/completion/report?month=YYYY-MM&summary=true

      Response:

      SIZE The size of the download in bytes
      ROW_COUNT

      The total rows in the completion report + 1 (Reserved heading row)

    2. Paginate responses via page and limit parameters

      API endpoint:  GET
       {site-url}/@api/deki/llm/completion/report?month=YYYY-MM&page=X&limit=Y

      Response:

      PAGE Page to navigate to. If left blank, the entire file will be returned.
      LIMIT

      Number of records to display on each page. Defaults to 100. Page parameter is required to use limit.

      Example: After checking the total row count, and seeing 1,000,000 rows, you choose a limit for each response to be 100,000. You will consistently use limit=100000 and call the endpoint 10 times as follows:

      {site-url}/@api/deki/llm/completion/report?month=YYYY-MM&page={1-10}&limit=100000

    3. Change the response format to JSON

      By default, each page result is an XML formatted response. To get a JSON formatted response, append &dream.out.format=json to the request. 

    Report data

    The report is updated daily at 12:00 AM PST, and contains data from the time the report has been enabled onward. Data is available one day after the query was submitted.

    Field Name Description Type Example
    PATH_ANCESTORS

    (For report dates after December 2024)
    The values of any path ancestors that were used STRING

    Manage

    Admin/Release_Notes

    QUERY_DATE The date and time the query was asked

    UTC timezone

    Format: MM/DD/YYYY HH:MM

    6/12/2024 18:54
    QUERY The question the user asked GenAI STRING how do i get a server token
    RATING

    (For report dates after December 2024)
    Whether the response was rated "helpful" or "unhelpful" STRING
    • Unhelpful responses are "negative"
    • Helpful responses are "positive"
    • Unrated responses are blank
    RESPONSE The response provided to answer the user's query STRING

    " Here are the steps to get a server token:
    1. Navigate to Site tools > Dashboard > Integrations > API Token Management.
    2. In the Add an API token section, select the Server radio button. 
    3. Enter a Name for the token that is easy to track and manage.
    4. Click Generate API token. 
    5. Record the API token information and copy your API token secret to a safe location. 
    6. Do not close the API Token created window without copying and recording your secret. Your API Token key will not function without your secret, and your secret will no longer be accessible once the window is closed. Both the key and the secret are necessary for integrating with the Expert API, so do not lose them."

    SOURCE_IDS

    The page IDs of the Kernels that answered the query

    Report dates after December 2024 will show page URLs instead of page IDs.

    STRING


    For report dates on / before December 2024:
    deki:page:16733,deki:page:1701,deki:page:19053

    To view the page, take the page ID and add /@go/page/{page id} to your site URL.
    Example: {your-site-URL}/@go/page/16733

    For report dates after December 2024:
    https://mysite.com/Page1, https://mysite.com/Page5https://mysite.com/Page37

    TAGS

    (For report dates after December 2024)
    The value of any tags that have been applied as a filter.  STRING customer
    TOTAL_SOURCES

    (For report dates after December 2024)
    The number of source IDs returned NUMBER 10
    USER_ID The user who performed the query NUMBER 840

     

    • Was this article helpful?