All campaign statistics
Returns live statistics for all your campaigns.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
get_all_statsfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
ID of the campaign.
Example1024Only campaigns with this status.
One ofPLAYSTOPPAUSE
curl https://api.dcdial.com/api/ \ -d type=get_all_stats \ -d token="$DCDIAL_TOKEN" \ -d campaign_id=1024 \ -d display_status=PLAY<?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_stats', 'token' => getenv('DCDIAL_TOKEN'), 'campaign_id' => 1024, 'display_status' => 'PLAY', ]),]);$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_stats", token: process.env.DCDIAL_TOKEN, campaign_id: "1024", display_status: "PLAY", }),});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_stats", "token": os.environ["DCDIAL_TOKEN"], "campaign_id": 1024, "display_status": "PLAY", }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "success": 1, "error": "", "campaigns_list": [ { "active_calls": "0", "calls_ringings": "0", "calls_waiting": "0", "calls_in_ivr": "0", "percentage_complete": "0.00", "pace_method": "SMS", "active": "Y", "display_status": "PLAY", "campaign_name": "Customer Satisfaction Survey", "campaign_id": "cmpBrjO49OiQXhBC10311", "campaign_type": "7", "scheduled_campaign": "0" }, { "active_calls": "0", "calls_ringings": "0", "calls_waiting": "0", "calls_in_ivr": "0", "percentage_complete": "0.00", "pace_method": "BROADCAST", "active": "N", "display_status": "STOP", "campaign_name": "Default Broadcast", "campaign_id": "cmpBroadcast10311", "campaign_type": "1", "scheduled_campaign": "0" } ] }}Try it