Video Reporting API

Introduction

The Video Reporting API can be used to pull any data available through the Video Console UI.

By querying the following endpoints, you can automate reporting processes for your Browsi Video activity.

Authentication

For access to any report via the API you will need

Endpoint - https://video-console-server.browsiprod.com/api/v1/oauth/token

METHOD: POST

{ "username": "<EMAIL>", "password": "<PASSWORD>" }

RESPONSE:

{ "access_token": "<TOKEN>", "expires_in": 86400, "token_type": "Bearer" }

The token provided this way needs to be added to any other request to the API, as part of the header 'authorization' with the value: "Bearer <TOKEN>".

Generate a report

You can call this endpoint to generate a report and pull your Browsi Video data

https://video-console-server.browsiprod.com/api/v1/reports

  1. Method: POST

  2. Body:

{ "dimensions":{ "Time":["date"] }, "metrics":{ "Revenue":["net_revenue"] } "limit":100, "type":"csv"| "json", "timeRange":{ "startDate":"2022-05-22", "endDate":"2022-05-23" }, "filters":{ "os":["linux"] }, "timezone": "Etc/GMT-7" --- place names also supported, e.g. "America/Chicago" }

Notes:

  1. To pull an unlimited number of rows, use "limit":-1
    Otherwise, the default value is 5000 rows

  2. The following parameters are mandatory:

    1. timeRange - the format is yyyy-mm-dd or yyyy-mm-ddThh:mm:ss. Please note that the data is hourly so values given to mm and ss are insignificant

    2. Dimensions - choose at least one; available dimensions can be listed using the next endpoint in this guide.

    3. Metrics - choose at least one; available metrics can be listed using the next endpoint in this guide.

    4. Type - csv / json; json will return the data as a response, while csv will return a download link as a response.

  3. The default timezone, if not included in the request, will be UTC

  4. We recommend that you set a line limit in your request, but if no limit is defined the response will include all data that matches your filters and date range.

List available metrics and dimensions

You can call this route to return the list of metrics and dimensions available through the API

https://video-console-server.browsiprod.com/api/v1/reports/fields

  1. Method: GET

  2. Response: