Get App Insights
curl --request GET \
--url https://app.apigene.ai/api/interaction/insights/{app_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.apigene.ai/api/interaction/insights/{app_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.apigene.ai/api/interaction/insights/{app_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.apigene.ai/api/interaction/insights/{app_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.apigene.ai/api/interaction/insights/{app_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.apigene.ai/api/interaction/insights/{app_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.apigene.ai/api/interaction/insights/{app_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"app_name": "<string>",
"total_interactions": 123,
"date_range": {},
"performance": {
"avg_duration": 123,
"median_duration": 123,
"p95_duration": 123,
"p99_duration": 123,
"slowest_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
],
"fastest_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
],
"duration_distribution": {}
},
"cache": {
"hit_rate": 123,
"total_hits": 123,
"total_misses": 123,
"avg_duration_cached": 123,
"avg_duration_uncached": 123,
"performance_improvement": 123
},
"success_metrics": {
"success_rate": 123,
"error_rate": 123,
"status_code_breakdown": {},
"failed_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
]
},
"usage": {
"top_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
],
"api_distribution": {},
"usage_trends": {},
"client_source_distribution": {}
},
"users": {
"total_unique_users": 123,
"most_active_users": [
{}
],
"avg_interactions_per_user": 123
},
"response_sizes": {
"avg_raw_size": 123,
"avg_processed_size": 123,
"total_raw_size": 123,
"total_processed_size": 123,
"per_api_breakdown": {},
"largest_responses": [
{}
],
"efficiency_ratio": 123
},
"time_insights": {
"peak_hours": [
{}
],
"peak_days": [
{}
],
"growth_trend": {},
"recent_activity": {}
},
"health_score": 123,
"top_insights": [
"<string>"
],
"recommendations": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Interaction
Get App Insights
Get comprehensive insights and analytics for a specific application (agent).
This endpoint analyzes all interactions for the given app_name and provides:
- Performance metrics (avg, median, P95, P99 durations)
- Cache effectiveness metrics
- Success/error rate analysis
- Usage patterns and trends
- User engagement metrics
- Response size analysis
- Time-based insights (peak hours, growth trends)
- Health score and recommendations
Parameters:
- app_name: Name of the application/agent to analyze
- current_user: Current user for authentication
- tenant: Tenant database instance
Returns:
- AppInsightsResponse with comprehensive analytics
Raises:
- HTTPException(404): If no interactions found for the app_name
- HTTPException(401): If the user is not authorized
GET
/
api
/
interaction
/
insights
/
{app_name}
Get App Insights
curl --request GET \
--url https://app.apigene.ai/api/interaction/insights/{app_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.apigene.ai/api/interaction/insights/{app_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.apigene.ai/api/interaction/insights/{app_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.apigene.ai/api/interaction/insights/{app_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.apigene.ai/api/interaction/insights/{app_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.apigene.ai/api/interaction/insights/{app_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.apigene.ai/api/interaction/insights/{app_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"app_name": "<string>",
"total_interactions": 123,
"date_range": {},
"performance": {
"avg_duration": 123,
"median_duration": 123,
"p95_duration": 123,
"p99_duration": 123,
"slowest_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
],
"fastest_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
],
"duration_distribution": {}
},
"cache": {
"hit_rate": 123,
"total_hits": 123,
"total_misses": 123,
"avg_duration_cached": 123,
"avg_duration_uncached": 123,
"performance_improvement": 123
},
"success_metrics": {
"success_rate": 123,
"error_rate": 123,
"status_code_breakdown": {},
"failed_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
]
},
"usage": {
"top_operations": [
{
"action_name": "<string>",
"count": 123,
"avg_duration": 123,
"success_rate": 123,
"error_count": 123
}
],
"api_distribution": {},
"usage_trends": {},
"client_source_distribution": {}
},
"users": {
"total_unique_users": 123,
"most_active_users": [
{}
],
"avg_interactions_per_user": 123
},
"response_sizes": {
"avg_raw_size": 123,
"avg_processed_size": 123,
"total_raw_size": 123,
"total_processed_size": 123,
"per_api_breakdown": {},
"largest_responses": [
{}
],
"efficiency_ratio": 123
},
"time_insights": {
"peak_hours": [
{}
],
"peak_days": [
{}
],
"growth_trend": {},
"recent_activity": {}
},
"health_score": 123,
"top_insights": [
"<string>"
],
"recommendations": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'
Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
