Receiving summary data

Summary data are single final metric values for a specific period, for example, a number of website visits within the last week. Such data can be used in widgets, indicators, counters, etc.

Request format #

To get summary data, execute the GET request:

GET https://content.mql5.com/api/v1/reports/website/{WEBSITE_ID}/total
 ?metrics=<string>
 &date_from=<unixtime>
 &date_to=<unixtime>

Set the website ID as {WEBSITE_ID}. It can be obtained in the website settings (ID field) of the Finteza panel.

Request parameters #

Parameter

Type

Description

metrics *

string

List of metrics (comma-separated), for example, metrics=visits,events.

date_from *

unixtime

Data request initial date. Specified in seconds since 1970.01.01, for example, date_from=1549027860.

date_to *

unixtime

Data request end date. Specified in seconds since 1970.01.01, for example, date_from=1549027860.

* ― required parameters.

Sample request #

GET https://content.mql5.com/v1/reports/website/dxnnhxrwpcwsgwowveipxmslrznjfhzarp/total
 ?metrics=webvisits,events
 &date_from=1549027860
 &date_to=1549632660

Sample response #

{
    data: {
        "date_from": 1549027860,
        "date_to": 1549632660,
        "webvisits": 10542,
        "events": 523
    }
}