Profile activity (provider requests) - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service responds with the number of AI provider requests grouped by profile.

Method Endpoint
POST
/analytics/api/v1/ai/profile-activity

Request example

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

{
  "startDate": "2024-05-01",
  "endDate": "2024-08-01",
  "groupByPeriod": "month",
  "filters": {
    "profile": [
      "7fbae8e0756f-9131-4b44-a66b-dce7c587",
      "7fe07756f-9131-548d-a66b-dce8574"
    ]
  }
}
Field Type Required? Description
startDate String Yes The inclusive start date of the period. The start date must be in the past year.
endDate String Yes The exclusive end date of the period. The end date must be later than the start date.
groupByPeriod String Yes The period by which to group the AI queries. Valid values are month, week and day.
filters Array No Allows the filtering of results by profile ID.
profile Array No A list of one or more profiles.

Response body

{
  "startDate": "2024-05-01",
  "endDate": "2024-08-01",
  "results": [
    {
      "id": "7fbae8e0756f-9131-4b44-a66b-dce7c587",
      "name": "MyProfile1",
      "type": "completion",
      "periods": [
        {
          "periodStartDate": "2024-05-01",
          "periodEndDate": "2024-06-01",
          "aiQueryCount": 1545
        },
        {
          "periodStartDate": "2024-06-01",
          "periodEndDate": "2024-07-01",
          "aiQueryCount": 1200
        },
        {
          "periodStartDate": "2024-07-01",
          "periodEndDate": "2024-08-01",
          "aiQueryCount": 1347
        }
      ]
    },
    {
      "id": "7fe07756f-9131-548d-a66b-dce8574",
      "name": "MyProfile2",
      "type": "chatbot",
      "periods": [
        {
          "periodStartDate": "2024-05-01",
          "periodEndDate": "2024-06-01",
          "aiQueryCount": 124
        },
        {
          "periodStartDate": "2024-06-01",
          "periodEndDate": "2024-07-01",
          "aiQueryCount": 14
        },
        {
          "periodStartDate": "2024-07-01",
          "periodEndDate": "2024-08-01",
          "aiQueryCount": 3458
        }
      ]
    }
  ]
}

The Profile activity (provider request) web service does not take into account AI queries from the Test connection button.

Field Type Description
startDate String The inclusive start date of the period. The start date must be in the past year.
endDate String The exclusive end date of the period. The end date must be later than the start date.
type String The type of AI profile. Possible values are chatbot, completion, and translation.
results Array An array containing the results.
periodStart String The inclusive start date of the period by which results are grouped.
periodEnd String The exclusive end date of the period by which results are grouped.
aiQueryCount Number The number of AI provider requests for the profile and the period.
Return code Description
200 OK Returns results.