Skip to content

REST Report API

Content
Access Use of views Error messages REST Report API Reference

The REST Report API enables access to etracker analysis data from third-party systems – such as BI solutions or dynamic Excel spreadsheets. All data that can be seen in the reports in etracker analytics can be accessed. The connection to Looker Studio (formerly Google Data Studio) is also based on the REST Report API.

In this tutorial, we will introduce you to the possibilities and functionality of the web service API so that you can quickly access the queries you need for your further processing.

Deep Dive etracker REST Report API

The easiest way to access the API query is to select the desired report, adjust the key figures, sorting, etc. and then click on API query in the top right-hand menu.

The API query associated with the report is displayed and can be copied with a click in order to paste it into the third-party system.

Access

The REST Report API is available in the etracker Analytics Enterprise Edition. You need an access token to use it. You can access this as an administrator/(main) user in the etracker account under Integration → Access token create.

Developer Token
Hinweis

To protect your privacy and to prevent unauthorized use of the etracker Web Services API, the access token should always be kept secret.

Use of views

In the etracker application, it is possible to interactively define and save views on certain reports. The data for these views can also be accessed via the REST API. In the following query, the data for the view with ID ‘4’ is called up in the ‘Devices’ report

html
https://ws.etracker.com/api/v6/report/EADeviceType/data?viewid=4
ParameterViewid
BeschreibungEs werden nur die Daten zurückgegeben, die zu der angegebenen voreingestellten Ansicht gehören
Zulässige WerteGültige Ansicht-Ids. Die Ansichten zu einem Report erscheinen in den Report-Informationen, die mit der Abfrage /info abgerufen werden können.
Beispiel4 oder 32

The parameter viewid can also be combined with all other parameters to limit the return.

Error messages

Detailed error messages are returned instead of data in the event of incorrect queries. The error messages always have the following format:

{
    "errorCode":170,
    "msg":"Webservice authentication failed [code:170]"
}

The return is a JSON object with two properties:

  • An error number (errorCode), which can be used for any queries to etracker, and
  • a message (msg) containing information on the cause of the error.

In certain cases, no error messages are returned for technical reasons, only an empty JSON array. This usually occurs when the transferred parameter values are problematic. In these cases, it is helpful to first check the following sources of error:

  • Are all attribute and key figure IDs spelled correctly?
  • Is the key figure ID for sortColumn written correctly?
  • Is the value of sortOrder ‘1’ or ‘2’?

REST Report API Reference

Click here for the REST Report API Reference.