CallFire Solutions

Get Broadcast Stats

Follow

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

ParameterDemo ValueDescriptionData Type
GetBroadcastStats   BroadcastStats request by unique ID object
Id Unique ID of resource long
IntervalBegin Beginning of DateTime interval to search on dateTime
IntervalEnd End of DateTime interval to search on dateTime

RESPONSE PARAMETERS

ParameterDescriptionData Type
BroadcastStats    
UsageStats    
Duration Duration of calls in seconds int
BilledDuration Duration of calls billed in seconds int
BilledAmount Billed credits float
Attempts Attempted Texts and Calls int
Actions Text and Calls placed int
ResultStat    
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] Result
Attempts Text and Calls attempted int
Actions Text and Calls placed int
ActionStatistics    
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>

Have more questions? Submit a request

Comments