Dashboard statistics
Returns the dashboard figures that summarize campaign performance.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
get_dashboard_statsfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
ID of the campaign.
Example1024
curl https://api.dcdial.com/api/ \ -d type=get_dashboard_stats \ -d token="$DCDIAL_TOKEN" \ -d campaign_id=1024<?php$ch = curl_init('https://api.dcdial.com/api/');curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => http_build_query([ 'type' => 'get_dashboard_stats', 'token' => getenv('DCDIAL_TOKEN'), 'campaign_id' => 1024, ]),]);$result = json_decode(curl_exec($ch), true);curl_close($ch);
if (($result['response']['success'] ?? 0) != 1) { throw new RuntimeException($result['response']['error'] ?? 'Request failed');}const res = await fetch('https://api.dcdial.com/api/', { method: 'POST', body: new URLSearchParams({ type: "get_dashboard_stats", token: process.env.DCDIAL_TOKEN, campaign_id: "1024", }),});const { response } = await res.json();if (response.success != 1) throw new Error(response.error);import osimport requests
r = requests.post( "https://api.dcdial.com/api/", data={ "type": "get_dashboard_stats", "token": os.environ["DCDIAL_TOKEN"], "campaign_id": 1024, }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "success": 1, "error": "", "dashboard_stats": [ { "campaign_id": "cmpc4IZsWz1z77dC10311", "campaign_name": "Payment Predictive", "pace_method": "PREDICTIVE", "pace_tempo": "1.0", "intensity_throttle": "0", "adaptive_dropped_percentage": "3%", "agent_level": "0", "caller_id": "5550112123", "campaign_script": "Default Script", "recording": "AS NEEDED", "scheduled_campaign": "0", "contact_schedule": "Default Customer Schedule", "total_leads": "4", "active_leads": "0", "remaining_leads": "4", "percentage_complete": "0.00", "answered_today": "1", "called_today": "1", "percentage_dropped": "0.00", "average_wrap_time": "111", "average_call_interval": "199", "average_talkoff_time": "0", "average_no_of_agents": "1", "active_calls": "0", "calls_ringings": "0", "calls_waiting": "0", "calls_in_ivr": "0", "total": "1", "ready": "1", "oncalls": "0", "wrappingup": "0", "paused": "0", "dead": "0", "active": "0", "display_status": "PLAY", "scheduler_status": "0", "connected_calls": "0", "total_calls": "0", "todays_minutes": "0", "todays_charge": "0.00", "mtd_minutes": "0", "mtd_charge": "0.00", "remaining_time": "00:00:00", "recycled": "0", "am_detection": "NA", "am_leave_message": "EVERY CALL", "call_back_number": "5550113123", "transfer_queue": "NA", "human_answered_calls": "1", "answering_machine": "0", "transfers": "0", "sales": "0" } ], "calls_graph_data": [ { "dialed": "0", "delivered": "0", "drops": "0", "datetime": "03:50:01" }, { "dialed": "0", "delivered": "0", "drops": "0", "datetime": "03:52:01" } ], "agent_graph_data": [ { "total": "0", "ready": "0", "oncalls": "0", "wrappingup": "0", "pausedcalls": "0", "deadcalls": "0", "datetime": "03:50:01" }, { "total": "0", "ready": "0", "oncalls": "0", "wrappingup": "0", "pausedcalls": "0", "deadcalls": "0", "datetime": "03:52:01" } ], "lead_status_graph": [ { "active_leads": 0, "remaining_leads": 4 } ], "call_status_graph": [ { "active_calls": 0, "calls_ringings": 0, "calls_waiting": 0, "calls_in_ivr": 0 } ] }}Try it