JavaScript
import Profound from '@profoundai/client';
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);import os
from datetime import datetime
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"), # This is the default and can be omitted
)
report_response = client.reports.query_fanouts(
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
metrics=["fanouts_per_execution"],
start_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(report_response.data)curl --request POST \
--url https://api.tryprofound.com/v1/reports/query-fanouts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"metrics": [],
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"date_interval": "day",
"dimensions": [],
"order_by": {},
"pagination": {
"limit": 10000,
"offset": 0
},
"filters": [
{
"field": "<string>",
"value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryprofound.com/v1/reports/query-fanouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metrics' => [
],
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'date_interval' => 'day',
'dimensions' => [
],
'order_by' => [
],
'pagination' => [
'limit' => 10000,
'offset' => 0
],
'filters' => [
[
'field' => '<string>',
'value' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tryprofound.com/v1/reports/query-fanouts"
payload := strings.NewReader("{\n \"metrics\": [],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"date_interval\": \"day\",\n \"dimensions\": [],\n \"order_by\": {},\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tryprofound.com/v1/reports/query-fanouts")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metrics\": [],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"date_interval\": \"day\",\n \"dimensions\": [],\n \"order_by\": {},\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/reports/query-fanouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metrics\": [],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"date_interval\": \"day\",\n \"dimensions\": [],\n \"order_by\": {},\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"info": {
"total_rows": 123,
"query": {}
},
"data": [
{
"metrics": [
123
],
"dimensions": [
"<string>"
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Reports v1
Query Fanouts
POST
/
v1
/
reports
/
query-fanouts
JavaScript
import Profound from '@profoundai/client';
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);import os
from datetime import datetime
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"), # This is the default and can be omitted
)
report_response = client.reports.query_fanouts(
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
metrics=["fanouts_per_execution"],
start_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(report_response.data)curl --request POST \
--url https://api.tryprofound.com/v1/reports/query-fanouts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"metrics": [],
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"date_interval": "day",
"dimensions": [],
"order_by": {},
"pagination": {
"limit": 10000,
"offset": 0
},
"filters": [
{
"field": "<string>",
"value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryprofound.com/v1/reports/query-fanouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metrics' => [
],
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'date_interval' => 'day',
'dimensions' => [
],
'order_by' => [
],
'pagination' => [
'limit' => 10000,
'offset' => 0
],
'filters' => [
[
'field' => '<string>',
'value' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tryprofound.com/v1/reports/query-fanouts"
payload := strings.NewReader("{\n \"metrics\": [],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"date_interval\": \"day\",\n \"dimensions\": [],\n \"order_by\": {},\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tryprofound.com/v1/reports/query-fanouts")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metrics\": [],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"date_interval\": \"day\",\n \"dimensions\": [],\n \"order_by\": {},\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/reports/query-fanouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metrics\": [],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"date_interval\": \"day\",\n \"dimensions\": [],\n \"order_by\": {},\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"info": {
"total_rows": 123,
"query": {}
},
"data": [
{
"metrics": [
123
],
"dimensions": [
"<string>"
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
APIKeyHeaderBearerAuth
Body
application/json
Available options:
fanouts_per_execution, total_fanouts, share, query_variations Start date. Accepts YYYY-MM-DD, YYYY-MM-DD HH:MM, or ISO timestamp.
End date. Accepts YYYY-MM-DD, YYYY-MM-DD HH:MM, or ISO timestamp.
Date interval for the report. (only used with date dimension)
Available options:
hour, day, week, month, quarter, year, relative_week Dimensions to group the report by.
Available options:
prompt, query, model, region, date Custom ordering. Keys must be a requested metric or the date dimension. Values are asc or desc. Defaults to first metric descending.
Show child attributes
Show child attributes
Example:
{ "fanouts_per_execution": "desc" }
Pagination settings for the report results.
Show child attributes
Show child attributes
filters
(RegionIdFilter · object | RegionNameFilter · object | ModelIdFilter · object | TopicIdFilter · object | TagIdFilter · object | PromptIdFilter · object | PersonaIdFilter · object | AnalysisTypeFilter · object | PromptTypeFilter · object)[]
Filters to apply to the query fanout report.
Filter by region UUID.
- RegionIdFilter
- RegionNameFilter
- ModelIdFilter
- TopicIdFilter
- TagIdFilter
- PromptIdFilter
- PersonaIdFilter
- AnalysisTypeFilter
- PromptTypeFilter
Show child attributes
Show child attributes
Was this page helpful?
⌘I