The API has several methods for getting statistics. They are listed below in order of increasing volume of returned data. The more data the method returns, the heavier the load on the API and the longer it takes to execute. We recommend using the simplest of the suitable methods.
- CreateNewReport (see instructions below)
Follow the steps below to get a detailed report.
The method returns the ID of the future report.
For a single user, no more than five reports are stored on the server. On an attempt to create a sixth report, an error message is returned with error code 31. Reports are stored on the server for five hours, then deleted automatically. Use the DeleteReport method to delete a report manually.
Periodically call the GetReportList method and check for the report's availability using its ID.
We recommend invoking the method no more than once every 10-20 seconds (it takes on average one to two minutes to generate a report). When the report is ready, the method returns a link for downloading the file from the server.
Download the report file from the link returned by the GetReportList method.