list_upload_video_stats

List the statistics for a video that has been launched to the video sharing sites.

Explorer

Explore this method

Request URL

http://api.tubemogul.com/api/v3/

HTTP method

GET or POST

Arguments

upload_id (integer) - Required
The ID of the uploaded video. This value is returned by list_uploads and upload_video.

Example Response

<?xml version="1.0" encoding="utf-8" ?>
<response stat="ok">
<video value="Kitty" id="3291">
  <site id="1">
    <cumulative_views>249429</cumulative_views>
    <cumulative_comments>6</cumulative_comments> <!--Note: comments, ratings, rating not available for all sites!-->
    <cumulative_ratings>3832</cumulative_ratings> <!--Note: comments, ratings, rating not available for all sites!-->
    <rating>3.7550909020684</rating> <!--Note: comments, ratings, rating not available for all sites!-->
    <last_updated>2009-01-01 00:01:01</last_updated>
  </site>
  <site id="3">
    <cumulative_views>9429</cumulative_views>
    <cumulative_comments>346</cumulative_comments>
    <cumulative_ratings>32</cumulative_ratings>
    <rating>2.09020684</rating>
    <last_updated>2009-01-01 00:01:01</last_updated> 
  </site>
  <site id="5">
    <cumulative_views>459874</cumulative_views>
    <cumulative_comments>436</cumulative_comments>
    <cumulative_ratings>3</cumulative_ratings>
    <rating>4.70</rating>
    <last_updated>2009-01-01 00:01:01</last_updated> 
  </site>
 </video>
</response>

Error Codes

10 : uploadid is invalid
20 : uploadid does not belong to the user
30 : No statistics available

Example Code

<?
# Your user token
$user_token '';

# Your partner ID
$partner_id '';

# Your secret key
$secret_key '';

# Required uploadid
$upload_id '';

$method 'listUploadVideoStats';

$now time();

#
# NOTE: This is a stats call, so call the correct host!
#
$apihost 'http://api-stats.tubemogul.com/index.php';

$poststring "date=".$now.
              
"&userToken=".urlencode($user_token).
              
"&partnerID=".urlencode($partner_id).
              
"&uploadid=".$upload_id.
              
"&method=".$method;

$hash sha1($secret_key.$poststring);

$poststring .= "&hash=".$hash;

echo 
$poststring;
?>

<br /><br />
<form action='<? echo $apihost?>' method='post'>
<input type='hidden' name='date' value='<? echo $now?>' />
<input type='hidden' name='userToken' value='<? echo $user_token?>' />
<input type='hidden' name='partnerID' value='<? echo $partner_id?>' />
<input type='hidden' name='uploadid' value='<? echo $upload_id?>' />
<input type='hidden' name='method' value='<? echo $method?>' />
<input type='hidden' name='hash' value='<? echo $hash?>' />
<input type='submit' value='submit!' />
</form>