GET BROADCAST STATS
Gets performance and result statistics for a Broadcast
Get broadcast stats by broadcastId or by interval range. Stats include information such as billed amount, billed duration, actions count, attempt count, and more. See the Response Parameters table below for a complete list of data that the GetBroadcastStats operation returns.
REQUEST PARAMETERS
Parameter | Data Type | Demo Value | Description |
---|---|---|---|
GetBroadcastStats | object | BroadcastStats request by unique ID | |
Id | long | 135 | Unique ID of resource |
IntervalBegin | dateTime | 2012-01-01T21:32:52Z | Beginning of DateTime interval to search on |
IntervalEnd | dateTime | 2013-10-26T05:36:10Z | End of DateTime interval to search on |
RESPONSE PARAMETERS
Parameter | Data Type | Description |
---|---|---|
BroadcastStats | ||
UsageStats | ||
Duration | int | Duration of calls in seconds |
BilledDuration | int | Duration of calls bill id in seconds |
BilledAmount | float | Billed credits |
Attempts | int | Attempted Texts and Calls |
Actions | int | Text and Calls placed |
ResultStat | ||
Result | Result | [LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
Attempts | int | Text and Calls attempted |
Actions | int | Text and Calls placed |
ActionStatistics | int | |
Unattempted | int | |
RetryWait | int | |
Finished | int |
EXAMPLE
Setup and send Request
using RestSharp;
namespace [your-namespace]
{
public class [your-class]
{
public string GetBroadcastStats()
{
long broadcastId = 18; //Your Broadcast Id here
var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");
var request = new RestRequest(string.Format("broadcast/{0}/stats", broadcastId), Method.GET);
request.AddParameter("IntervalBegin", "2014-12-02T19:28:18Z");
request.AddParameter("IntervalEnd", "2014-15-02T19:28:20Z");
var response = client.Execute(request);
string content = response.Content;
return content;
}
}
}
The XML returned is:
<r:Resource xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">
<BroadcastStats>
<UsageStats>
<Duration>0</Duration>
<BilledDuration>0</BilledDuration>
<BilledAmount>0.0</BilledAmount>
<Attempts>1</Attempts>
<Actions>0</Actions>
</UsageStats>
<ActionStatistics>
<Unattempted>2</Unattempted>
<RetryWait>0</RetryWait>
<Finished>0</Finished>
</ActionStatistics>
</BroadcastStats>
</r:Resource>