Stats Object

Statistics methods by: Projects | Video | Live | Playlist | Session

Statistics by project

Getting statistics by project.

Input parameters

Required parameters:

  • String apikey (API key)

Optional parameters:

  • String project (Select a project) Options are: all (by all projects), another project apikey (by specified project). By default current project from apikey.
  • Date start Start date as YYYY-MM-DD, for example 2020-01-01. A week ago from the end date by default.
  • Date end End date as YYYY-MM-DD, for example 2020-05-01. Current date by default.
  • String group (Grout of output) Options of grouping are: day (by days), hour (by hours). By default is day.
  • String order (Sort of output) Options of sorting are: asc (to increase), desc (to decrease). By default is asc.
  • Integer page Page of output. By default is page=1

Sample query:

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

Sample response:

<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>

Statistics by Video, Live and Playlist

Getting 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, for example 2020-01-01. A week ago from the end date by default.
  • Date end End date as YYYY-MM-DD, for example 2020-05-01. Current date by default.
  • String group (Grout of output) Options of grouping are: day (by days), hour (by hours). By default is day.
  • String order (Sort of output) Options of sorting are: asc (to increase), desc (to decrease). By default is asc.
  • Integer page Page of output. By default is page=1

Sample query:

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

Sample response:

<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>

Statistics by customer session

Getting statistics about customer’s session by password.

Input parameters

Required parameters:

  • String apikey (Project Api key)
  • String code (Media code)
  • String hash (Password)

Optional parameters:

  • Date start Start date as YYYY-MM-DD, for example 2020-01-01. Current day by default.
  • Date endEnd date as YYYY-MM-DD, for example 2020-05-01. Day after today by default.
  • String order (Sort of output) Options of sorting are: asc (to increase), desc (to decrease). By default is asc.
  • Integer page Page of output. By default is page=1

Output parameters

  • String Place (media name, to which password was connected)
  • String IP (viewer’s device ip address)
  • String Country (viewer’s country, defined by ip address)
  • String UserAgent (viewer’s user agent)
  • Date CreatedAt (time when session was created)
  • Integer LeftActivations (password activations left)

Sample query:

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

Sample response:

<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>