Page tree
Skip to end of metadata
Go to start of metadata


Make a Report Request

See the available parameters below for running a report with SDK or the API.

SDK

Example 1: Run a default report. This sets the time range to yesterday with no dimensions, filters, or time intervals. 

In [1]: report = springserve.quality_reports.run()
2016-06-13 11:12:13 INFO Starting new HTTPS connection (1): admin-video.springserve.com

In [2]: report.to_dataframe()
Out[2]: 
   analyzed_impressions  bot_rate  complete_audible_visible_rate  complete_visible_rate  human_impressions  human_rate  
0             536316974    0.0332                         0.0278                 0.1295          518504951      0.9668                  
mismatched_domain_rate  viewability_rate
				0.0318            0.2651

Example 2: Run for last 7 days, group by supply tag id

In [2]: report = springserve.quality_reports.run(date_range='Last 7 Days', dimensions=['supply_tag_id'])   

In [3]: report.to_dataframe()
Out[3]: 
     analyzed_impressions  bot_rate  complete_audible_visible_rate  complete_visible_rate  human_impressions  human_rate  
0                48996226    0.0227                         0.0079                 0.1675           47884419      0.9773                  
mismatched_domain_rate  supply_tag_id    supply_tag_name  viewability_rate
				0.0138          123     My Tag 1            0.2681
1                30019149    0.0251                         0.0002                 0.0760           29266079      0.9749                  	
				0.0646          124     My Tag 2           0.1112
2                29263901    0.0151                         0.0000                 0.1139           28822022      0.9849                  
				0.0035          125     My Tag 3            0.1610
3                25061810    0.0230                         0.0081                 0.1549           24485291      0.9770                  
				0.0171          126     My Tag 4            0.1537
...

REST API

POST /api/v0/traffic_quality_reports

Headers

Content-Type application/json
Authorization "yourAuthToken"

Body (example)

{
	"start_date": "2015-11-01",
	"end_date": "2015-11-15",
	"dimensions": ["supply_tag"]
}

Required parameters: none

Response

Status code 200

 
[
  {
    "mismatched_domain_rate": 0.0138, 
    "complete_visible_rate": 0.1675, 
    "complete_audible_visible_rate": 0.0079, 
    "supply_tag_name": "My Tag 1", 
    "human_rate": 0.9773, 
    "viewability_rate": 0.2681, 
    "analyzed_impressions": 48996226, 
    "bot_rate": 0.0227, 
    "supply_tag_id": 123, 
    "human_impressions": 47884419.0
  }, 
  {
    "mismatched_domain_rate": 0.0646, 
    "complete_visible_rate": 0.076, 
    "complete_audible_visible_rate": 0.0002, 
    "supply_tag_name": "My Tag 2", 
    "human_rate": 0.9749, 
    "viewability_rate": 0.1112, 
    "analyzed_impressions": 30019149, 
    "bot_rate": 0.0251, 
    "supply_tag_id": 124, 
    "human_impressions": 29266079.0
  }, 
  {
    "mismatched_domain_rate": 0.0035, 
    "complete_visible_rate": 0.1139, 
    "complete_audible_visible_rate": 0.0, 
    "supply_tag_name": "My Tag 3", 
    "human_rate": 0.9849, 
    "viewability_rate": 0.161, 
    "analyzed_impressions": 29263901, 
    "bot_rate": 0.0151, 
    "supply_tag_id": 125, 
    "human_impressions": 28822022.0
  }
 ...
]

Available parameters:


parameteroptions (if applicable)notes
start_date"2015-12-01 00:00:00" or "2015-12-01"
end_date"2015-12-02 00:00:00" or "2015-12-01"
interval"day", "cumulative"
timezone"EST"defaults to America/New_York
date_rangeYesterday, Last 7 Daysdate_range takes precedence over start_date/end_date
dimensionssupply_tag_id, supply_partner_id, supply_tag_label, demand_tag_label, supply_type, detected_domain, declared_domaindomain is only available when using date_range of Today, Yesterday, or Last 7 Days
the following parameters act as filters; pass an array of values (usually IDs)
supply_tag_ids

[22423,22375, 25463]

can filter by one or more supply tag
demand_tag_ids[22423,22375, 25463]
supply_types["Syndicated","Third-Party"]
supply_partner_ids[30,42,41]
supply_tag_label_ids[13,15,81]
detected_domains["cnn.com", "abc.com"]
declared_domains["cnn.com", "abc.com"]
page10The page requested for results over 20K rows. If there are 20,000 entries in your result, you need to call multiple pages, until you get an empty response.

Notes

Results are not paginated.

  • No labels