GetEventsLog (Live)
Returns entries from the events log.
Yandex Direct automatically registers events related to shared accounts, campaigns and ads, such as moderation results, new credits to the account balance, and others. The events log is separate for each user. The GetEventsLog
method returns entries from the events log for the specified period of time.
New in the Live 4 version
The Currency input parameter is required.
Added the Currency input parameter and the Currency output parameter.
Added the AccountIDS input parameter and the AccountID output parameter.
Added the Limit and Offset input parameters.
Input data
The input data structure in JSON is shown below.
{
"method": "GetEventsLog",
"param": {
/* GetEventsLogRequest */
"TimestampFrom": (string),
"TimestampTo": (string),
"LastEventOnly": (string),
"WithTextDescription": (string),
"Currency": (string),
"Logins": [
(string)
...
],
"Filter": {
/* GetEventsLogFilter */
"CampaignIDS": [
(int)
...
],
"BannerIDS": [
(long)
...
],
"PhraseIDS": [
(long)
...
],
"AccountIDS": [
(int)
...
],
"EventType": [
(string)
...
]
},
"Limit": (int),
"Offset": (int)
}
}
Parameters are described below.
Parameter |
Description |
Required |
GetEventsLogRequest object |
||
|
The time at which to start recording events. Specified in ISO 8601 format, for example: |
Yes |
|
The time at which to stop recording events. Specified in ISO 8601 format, for example: If the parameter is omitted, all entries are returned up to the current time. |
No |
|
Get only the last entry for each type of event — Yes/No. If omitted, returns all entries for the specified time period. |
No |
|
Output event descriptions to the response — Yes/No. If the parameter is omitted, descriptions are not output. |
No |
|
The currency to use for monetary values (minimum price, remaining funds, amount credited) in the response. Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. |
Yes |
|
Array of usernames belonging to advertising agency clients. The method returns entries of events for the specified clients. If omitted, it returns entries of events for the user who made the request. |
Advertising agencies only |
|
The |
No |
|
The number of events to return (page size). You can combine this with the If omitted, all events are returned. |
No |
|
The number of events to skip when getting the selection. It is ignored if |
No |
GetEventsLogFilter object |
||
|
IDs of campaigns that you need to get event entries for. |
No |
|
IDs of ads that you need to get event entries for. |
No |
|
IDs of keywords that you want to get event entries for. |
No |
|
Identifiers of shared accounts that you need to get event entries for. |
No |
|
Types of events to get entries for. Acceptable values are shown below:
|
No |
Output data
The method returns an array of EventsLogItem
objects, each of which represents a single event entry. The output data structure in JSON is shown below.
{
"data": [
{ /* EventsLogItem */
"AccountID": (int),
"CampaignID": (int),
"BannerID": (long),
"PhraseID": (long),
"TextDescription": (string),
"EventType": (string),
"Timestamp": (string),
"EventName": (string),
"Attributes": {
/* EventsLogItemAttributes */
"ModerationResult": (string),
"MinPrice": (float),
"Rest": (float),
"Payed": (float),
"FinishDate": (date),
"OldPlace": (string),
"IsEditedByModerator": (string),
"StopTime": (string),
"Currency": (string)
}
}
...
]
}
Parameters are described below.
Parameter |
Description |
EventsLogItem object |
|
|
Identifier of the shared account that the event is related to. May be omitted. |
|
ID of the campaign that the event is associated with. May be omitted. |
|
ID of the ad that the event is associated with. May be omitted. |
|
ID of the keyword that the event is associated with. May be omitted. |
|
Description of the event. |
|
Type of event. One of these values:
|
|
Time when the event was registered (ISO 8601 format), for example: |
|
Brief description of the event. |
|
|
EventsLogItemAttributes object |
|
|
Moderation results. Output for the BannerModerated event. |
|
The actual minimum CPCminimum CPC. Output for the WarnMinPrice event. The value is converted to the currency specified in the |
|
Remaining funds on the campaign balance. Output for the MoneyWarning event. The value is converted to the currency specified in the If the value is expressed in a real currency, it does not include VAT. |
|
Amount of funds credited. Output for the MoneyIn event. The value is converted to the currency specified in the If the value is expressed in a real currency, it does not include VAT. |
|
Date when the campaign was stopped. Output for the CampaignFinished event. |
|
Previous display position of the ad. Output for the WarnPlace event. |
|
Indicates whether the ad was changed by the moderator (Yes/No). Output for the BannerModerated event. |
|
The date and time when the campaign was stopped. Output for the PausedByDayBudget event. |
|
The currency that monetary values are shown in. Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. |
Examples of input data
Python
{
'TimestampFrom': '2012-02-15T23:59:59Z',
'TimestampTo': '2012-02-18T23:59:59Z',
'Filter': {
'CampaignIDS': [3193279],
'EventType': ['MoneyIn', 'CampaignFinished']
}
}
PHP
array(
'TimestampFrom' => '2012-02-15T23:59:59Z',
'TimestampTo' => '2012-02-18T23:59:59Z',
'Filter' => array(
'CampaignIDS' => array(3193279),
'EventType' => array('MoneyIn', 'CampaignFinished')
)
)
Perl
{
'TimestampFrom' => '2012-02-15T23:59:59Z',
'TimestampTo' => '2012-02-18T23:59:59Z',
'Filter' ={
'CampaignIDS' => [3193279],
'EventType' => ['MoneyIn', 'CampaignFinished']
}
}