Skip to main content
POST
/
v1
/
reports
/
query-fanouts
JavaScript
import Profound from 'profoundai';

const client = new Profound({
  apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
});

const reportResponse = await client.reports.queryFanouts({
  category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  end_date: '2019-12-27T18:11:19.117Z',
  metrics: ['fanouts_per_execution'],
  start_date: '2019-12-27T18:11:19.117Z',
});

console.log(reportResponse.data);
{
  "info": {
    "total_rows": 123,
    "query": {}
  },
  "data": [
    {
      "metrics": [
        123
      ],
      "dimensions": [
        "<string>"
      ]
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Body

application/json
metrics
enum<string>[]
required
Available options:
fanouts_per_execution,
total_fanouts,
share
category_id
string<uuid>
required
start_date
string<date-time>
required

Start date. Accepts YYYY-MM-DD, YYYY-MM-DD HH:MM, or ISO timestamp.

end_date
string<date-time>
required

End date. Accepts YYYY-MM-DD, YYYY-MM-DD HH:MM, or ISO timestamp.

date_interval
enum<string>
default:day

Date interval for the report. (only used with date dimension)

Available options:
hour,
day,
week,
month,
year,
relative_week
dimensions
enum<string>[]

Dimensions to group the report by.

Available options:
prompt,
query,
model,
region,
date
order_by
Order By · object

Custom ordering. Keys must be a requested metric or the date dimension. Values are asc or desc. Defaults to first metric descending.

Example:
{ "fanouts_per_execution": "desc" }
pagination
Pagination · object

Pagination settings for the report results.

filters
(RegionIdFilter · object | ModelIdFilter · object | TopicIdFilter · object | TagIdFilter · object | PromptIdFilter · object | PersonaIdFilter · object | PromptTypeFilter · object)[]

Filters to apply to the query fanout report.

Filter by region UUID.

Response

Successful Response

Base response model for reports.

info
Info · object
required

Base model for report information.

data
Result · object[]
required