Analytics API and BU Reports

This page describes reports available through the Analytics API. The API is available on https://api.telenor.io/analytics/reports/ and https://api.staging.telenor.io/analytics/reports/, for production and staging respectively. Authorisation and authentication works with the standard API users.

Reports are available through a hierarchy with the following structure:

  https://api.telenor.io/analytics/reports/GRANTOR_ID/REPORT/DATE_BUCKET/FILENAME

The DATE_BUCKET is identifying the time period of association for the reports. A daily report will use the format YEAR/MONTH/DATE (example: 2012/12/31). A monthly report will use the format YEAR/MONTH (example: 2012/12).

Some reports (e.g. the events.rights_and_subscriptions) may still use the old structure (including VERSION) for a while: https://api.telenor.io/analytics/reports/GRANTOR_ID/REPORT/VERSION/YEAR/MONTH/DATE/REPORT.txt

The report hierarchy must be crawled as HTML, thus setting the Accept: HTTP header to include text/html. When fetching a directory, an HTML document will be returned. The links to either subdirectories or the actual report files will be found in <a> elements, with the URL to follow on the href attribute.

<html>
  <body>
    <pre><a href='/THE_PATH/THE_FILE.json'>THE_PATH/THE_FILE.json</a>
</pre>
  </body>
</html>

If the BU queue is configured to receive ReportCreated events, there is also a possibility to retrieve reports by directly following the link provided in that event object.

For details on the different types of reports, see the list below: