Stats Object

api
manage account

Methods: project | target | session

project

Statistics by project

Input parameters

Required parameters:

  • String apikey (API key)

Optional parameters:

  • String project (Select a project). Options: all (by all projects), another project apikey (by specified project). Default: current project from apikey
  • Date start (Start date as YYYY-MM-DD, e.g., 2020-01-01). Default: one week ago from the end date
  • Date end (End date as YYYY-MM-DD, e.g., 2020-05-01). Default: current date
  • String group (Grouping of output). Options: day (by days), hour (by hours). Default: day
  • String order (Sort of output). Options: asc (ascending), desc (descending). Default: asc
  • Integer page (Page of output). Default: page=1

Output parameters

  • String Period (Period range)
  • String Start (Start date)
  • String End (End date)
  • String GroupBy (Grouping type)
  • String SourceType (Source type)
  • Integer Page (Current page)
  • Integer PageLimit (Items per page)
  • Integer PageCount (Total pages)
  • Integer ItemCount (Total items)
  • Array Items (List of items with date and view time)

Example request:

Text
https://boomstream.com/api/stats?apikey=[API_KEY]&start=2019-01-01&end=2020-05-01&group=day

Example response:

XML
<Response>
   <Period>01.01.2019 - 10.05.2020</Period>
   <Start>01.01.2019</Start>
   <End>10.05.2020</End>
   <GroupBy>day</GroupBy>
   <SourceType>project</SourceType>
   <Page>1</Page>
   <PageLimit>1000</PageLimit>
   <PageCount>1</PageCount>
   <ItemCount>1</ItemCount>
   <ItemFormat>
      <date>Date</date>
      <time>Time</time>
      <time_dim>Time (hours)</time_dim>
   </ItemFormat>
   <Items>
      <Item>
         <date>23.12.2019</date>
         <time>965600</time>
         <time_dim>0.27 hours</time_dim>
      </Item>
   </Items>
   <Status>Success</Status>
</Response>

target

Statistics by Video, Live and Playlist

Input parameters

Required parameters:

  • String apikey (API key)
  • String code (Video, Live or Playlist code)

Optional parameters:

  • Date start (Start date as YYYY-MM-DD, e.g., 2020-01-01). Default: one week ago from the end date
  • Date end (End date as YYYY-MM-DD, e.g., 2020-05-01). Default: current date
  • String group (Grouping of output). Options: day (by days), hour (by hours). Default: day
  • String order (Sort of output). Options: asc (ascending), desc (descending). Default: asc
  • Integer page (Page of output). Default: page=1

Output parameters

  • String Period (Period range)
  • String Start (Start date)
  • String End (End date)
  • String GroupBy (Grouping type)
  • String SourceType (Source type)
  • Integer Page (Current page)
  • Integer PageLimit (Items per page)
  • Integer PageCount (Total pages)
  • Integer ItemCount (Total items)
  • Array Items (List of items with date and view time)

Example request:

Text
https://boomstream.com/api/stats?apikey=[API_KEY]&start=2019-01-01&end=2020-05-01&code=XXXXXXXX&group=day

Example response:

XML
<Response>
   <Period>01.01.2019 - 10.05.2020</Period>
   <Start>01.01.2019</Start>
   <End>10.05.2020</End>
   <GroupBy>day</GroupBy>
   <SourceType>media</SourceType>
   <Page>1</Page>
   <PageLimit>1000</PageLimit>
   <PageCount>1</PageCount>
   <ItemCount>1</ItemCount>
   <ItemFormat>
      <date>Date</date>
      <time>Time</time>
      <time_dim>Time (hours)</time_dim>
   </ItemFormat>
   <Items>
      <Item>
         <date>23.12.2019</date>
         <time>965600</time>
         <time_dim>0.27 hours</time_dim>
      </Item>
   </Items>
   <Status>Success</Status>
</Response>

session

Statistics by customer session

Input parameters

Required parameters:

  • String apikey (Project API key)
  • String code (Media code)
  • String hash (Customer password)

Optional parameters:

  • Date start (Start date as YYYY-MM-DD, e.g., 2020-01-01). Default: current day
  • Date end (End date as YYYY-MM-DD, e.g., 2020-05-01). Default: day after today
  • String order (Sort of output). Options: asc (ascending), desc (descending). Default: asc
  • Integer page (Page of output). Default: page=1

Output parameters

  • String Place (Media name to which the password was connected)
  • String IP (Viewer's device IP address)
  • String Country (Viewer's country, determined by IP address)
  • String UserAgent (Viewer's user agent)
  • Date CreatedAt (Time when session was created)
  • Integer LeftActivations (Password activations left)

Example request:

Text
https://boomstream.com/api/ppv/sessions?apikey=[API_KEY]&code=[media_code]&hash=[customer_password]&start=2019-01-01&end=2020-05-01&order=desc

Example response:

XML
<Response>
<Item>
   <Place>Media name</Place>
   <ip>192.168.0.1</ip>
   <Country>Russia</Country>
   <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36</UserAgent>
   <Start>2020-09-09 11:35:28</Start>
   <LeftActivations>1</LeftActivations>
</Item>
</Response>