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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »


Make a Report Request

SDK

Documentation and example of running a report through SDK:

	In [10]: springserve.reports.run?
    Signature: springserve.reports.run(start_date=None, end_date=None, interval=None,
    dimensions=None, account_id=None, **kwargs)
    Docstring:
    parameter     options (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:    "hour", "day", "cumulative"
    timezone:    "UTC", "America/New_York"   defaults to America/New_York
    date_range:  Today, Yesterday, Last 7 Days   date_range takes precedence over
    start_date/end_date
    dimensions:  supply_tag_id, demand_tag_id, detected_domain, declared_domain,
    demand_type, supply_type, supply_partner_id, demand_partner_id, supply_group
    domain 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]
    demand_tag_ids:  [22423,22375, 25463]
    detected_domains:         ["nytimes.com", "weather.com"]
    declared_domains:         ["nytimes.com", "weather.com"]
    supply_types     ["Syndicated","Third-Party"]
    supply_partner_ids:  [30,42,41]
    supply_group_ids:    [13,15,81]
    demand_partner_ids:  [3,10,81]
    demand_types:    ["Vast Only","FLASH"]

    In[11]: report = springserve.reports.run(state_date="2016-09-19", end_date="2016-09-19",
    dimensions=["supply_tag_id"], declared_domains=["nytimes.com", "weather.com"])

    In[12]: report.ok
    Out[12]: True

REST API

POST /api/v0/report

Headers

Content-Type application/json
Authorization "yourAuthToken"

Body (example)

{
	"start_date": "2015-11-01",
	"end_date": "2015-11-15",
	"interval": "day",
	"dimensions": ["supply_type"]
}

Required parameters: none

Response

Status code 200

 
[
  {
    "date": "2015-11-19 00:00:00",
    "supply_type": null,
    "total_requests": 392841,
    "usable_requests": 299876,
    "blocked_requests": 92965,
    "total_impressions": 40968,
    "flash_impressions": 37497,
    "vast_impressions": 3471,
    "fill_rate": 13.66,
    "flash_errors": 54093,
    "vast_errors": 7,
    "cost": 133.78,
    "revenue": 193.55,
    "profit": 59.77,
    "cpm": 3.27,
    "rpm": 4.72,
    "ppm": 1.46,
    "error_rate": 18.04,
    "usable_request_rate": 76.34
  },
  {
    "date": "2015-11-19 00:00:00",
    "supply_type": "Syndicated",
    "total_requests": 520333,
    "usable_requests": 324776,
    "blocked_requests": 195557,
    "total_impressions": 4795,
    "flash_impressions": 3633,
    "vast_impressions": 1162,
    "fill_rate": 1.48,
    "flash_errors": 18010,
    "vast_errors": 10,
    "cost": 32.32,
    "revenue": 35.5,
    "profit": 3.18,
    "cpm": 6.74,
    "rpm": 7.4,
    "ppm": 0.66,
    "error_rate": 5.55,
    "usable_request_rate": 62.42
  },
  ...
  ]
}

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"hour", "day", "cumulative"
timezone"UTC", "America/New_York"defaults to America/New_York
date_rangeToday, Yesterday, Last 7 Daysdate_range takes precedence over start_date/end_date
dimensionssupply_tag_id, demand_tag_id, declared_domain, detected_domain, demand_type, supply_type, supply_partner_id, demand_partner_id, supply_groupdomain 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]
declared_domains["nytimes.com", "weather.com"]
detected_domains["nytimes.com", "weather.com"]
supply_types["Syndicated","Third-Party"]
supply_partner_ids[30,42,41]
supply_group_ids[13,15,81]
demand_partner_ids[3,10,81]
demand_types["Vast Only","FLASH"]
page10The page requested for results over 10K rows. If there are 10,000 entries in your result, you need to call multiple pages, until you get an empty response.

Notes

Results are not paginated.

  • No labels