All graphs
Returns chart data for a campaign across statistics (total time, total calls, call percentages, average time).
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
get_all_graphsfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
ID of the campaign.
Example1024
curl https://api.dcdial.com/api/ \ -d type=get_all_graphs \ -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_all_graphs', '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_all_graphs", 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_all_graphs", "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": "", "outbound_graph": [ { "dialed": "0", "delivered": "0", "drops": "0" }, { "dialed": "0", "delivered": "0", "drops": "0" } ], "agent_graph": [ { "total": "0", "ready": "0", "oncalls": "0", "wrappingup": "0", "pausedcalls": "0", "deadcalls": "0" }, { "total": "0", "ready": "0", "oncalls": "0", "wrappingup": "0", "pausedcalls": "0", "deadcalls": "0" } ] }}Try it