curl --request GET \
--url https://api.example.com/api/v1/teams/{team_id}/dashboard \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/teams/{team_id}/dashboard"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/teams/{team_id}/dashboard', 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://api.example.com/api/v1/teams/{team_id}/dashboard",
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://api.example.com/api/v1/teams/{team_id}/dashboard"
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://api.example.com/api/v1/teams/{team_id}/dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/teams/{team_id}/dashboard")
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{
"team": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_type": "<string>",
"display_name": "<string>",
"status": "<string>",
"tier": "<string>",
"operation_mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"members": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"agent_slug": "<string>",
"display_name": "<string>",
"capabilities": [
"<string>"
],
"hired_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"persona_name": "<string>",
"agent_classes": [
"<string>"
],
"current_activity": {}
}
],
"workflow_phase": "onboarding",
"workflow_phase_label": "Setting Up",
"trigger_mode": "strategy-driven",
"default_currency": "USD",
"auto_config": {},
"orchestrator_cadence": {},
"content_strategy": {},
"stripe_subscription_id": "<string>",
"config": {},
"onboarding_step": "pending",
"connected_accounts": [],
"brand_kit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_name": "<string>",
"hired_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"subscription_ends_at": "2023-11-07T05:31:56Z",
"recent_activity": [],
"content_cadence": [],
"my_role": "<string>"
},
"tasks": {
"tasks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_type": "<string>",
"title": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"quality_score": 123,
"evaluation_notes": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"platform": "<string>",
"publish_url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"revision_count": 123,
"max_revisions": 123,
"assigned_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"input_data": {},
"output_data": {}
}
],
"total": 123
},
"activity": {
"activity": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action_type": "<string>",
"description": "<string>",
"details": {},
"source": "<string>",
"severity": "<string>",
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
],
"total": 123
},
"strategy_history": {
"strategies": [
{
"cycle_instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_number": 123,
"strategy_status": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"strategy_revision_count": 0,
"content_strategy": {}
}
]
},
"strategy_briefs": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"brief_preview": "<string>",
"cycle_instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"canvas_layout": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Team Dashboard
Aggregate payload for the team dashboard page paint.
Pillar 2 of the pool-exhaustion fix (docs/plans/2026-05-04-permanent- pool-exhaustion-fix.md): replaces 5–7 parallel GETs (team, tasks,
activity, strategy/history, strategy/briefs, canvas/layout) with one
handler / one session. Sub-queries are issued via asyncio.gather so
the connection holds for the longest sub-query, not the sum.
Optimization (per pre-flight audit): team_service.get_team() is
called ONCE here and the loaded ORM row is the only authoritative
ownership check — the per-resource code paths re-fetch the team
today, which is wasted I/O on the hot path.
curl --request GET \
--url https://api.example.com/api/v1/teams/{team_id}/dashboard \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/teams/{team_id}/dashboard"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/teams/{team_id}/dashboard', 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://api.example.com/api/v1/teams/{team_id}/dashboard",
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://api.example.com/api/v1/teams/{team_id}/dashboard"
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://api.example.com/api/v1/teams/{team_id}/dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/teams/{team_id}/dashboard")
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{
"team": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_type": "<string>",
"display_name": "<string>",
"status": "<string>",
"tier": "<string>",
"operation_mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"members": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"agent_slug": "<string>",
"display_name": "<string>",
"capabilities": [
"<string>"
],
"hired_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"persona_name": "<string>",
"agent_classes": [
"<string>"
],
"current_activity": {}
}
],
"workflow_phase": "onboarding",
"workflow_phase_label": "Setting Up",
"trigger_mode": "strategy-driven",
"default_currency": "USD",
"auto_config": {},
"orchestrator_cadence": {},
"content_strategy": {},
"stripe_subscription_id": "<string>",
"config": {},
"onboarding_step": "pending",
"connected_accounts": [],
"brand_kit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_name": "<string>",
"hired_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"subscription_ends_at": "2023-11-07T05:31:56Z",
"recent_activity": [],
"content_cadence": [],
"my_role": "<string>"
},
"tasks": {
"tasks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_type": "<string>",
"title": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"quality_score": 123,
"evaluation_notes": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"platform": "<string>",
"publish_url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"revision_count": 123,
"max_revisions": 123,
"assigned_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"input_data": {},
"output_data": {}
}
],
"total": 123
},
"activity": {
"activity": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action_type": "<string>",
"description": "<string>",
"details": {},
"source": "<string>",
"severity": "<string>",
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
],
"total": 123
},
"strategy_history": {
"strategies": [
{
"cycle_instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_number": 123,
"strategy_status": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"strategy_revision_count": 0,
"content_strategy": {}
}
]
},
"strategy_briefs": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"brief_preview": "<string>",
"cycle_instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"canvas_layout": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Response
Successful Response
Aggregate payload for the team dashboard page paint.
Replaces 5–7 parallel GETs with one handler/one session. Each sub-key matches the existing per-resource endpoint payload verbatim so the frontend can keep using its current types.
Was this page helpful?