getLastChangeAnalytics method¶
getLastChangeAnalytics¶
The method lets you get the date/time of the last change of analytics data broken down by date, as well as a list of the latest changes of analytics data broken down by date after the date specified in the filter. Method: GET URL: https://api.r7k12.com/{{TOKEN}}/getLastChangeAnalytics Input parameters Table 1
| Name | Value | Required | Description |
| date | string | No | Date or Date/Time after which the analytics data changed. Format YYYY-MM-DD. Examples: - 2017-10-17 - 2017-10-17 00:00:00 - 2017-10-17 10:01:53 |
Response format:
{
"result": [
{
"analyticsDate": "date",
"lastChange": "dateTime"
},
....
]
}
Response fields Table 2
| Name | Value | Description |
| error | string | If an error occurs, returns a description of the error. |
| result.analyticsDate | date (string) | Date of the analytics data. Format YYYY-MM-DD |
| result.lastChange | dateTime (string) | Date/time of the last change of analytics data for the specified date. Format: YYYY-MM-DD HH:MM:SS |
Method call example (PHP):¶
<?php
define('TOKEN','YOURTOKEN');
$get = [
'date' => '2017-10-17', //дата с которой смотреть изменения
];
$data = @file_get_contents('https://api.r7k12.com/'.TOKEN.'/getLastChangeAnalytics?'.http_build_query($get));
print_r($data);
Response:
{
"result": [
{
"analyticsDate": "2017-08-14",
"lastChange": "2017-10-19 08:47:15"
},
{
"analyticsDate": "2017-09-12",
"lastChange": "2017-10-19 08:47:27"
}
]
}