Errors

Returns error data for a specific date range.

  1. Request format
  2. Response format
  3. Example

Request format

GET https://api.appmetrica.yandex.ru/logs/v1/export/errors.{csv | json}
 ? application_id=<int>
 & date_since=<string>
 & date_until=<string>
 & fields=<string>
 & [date_dimension=<string>]
 & [limit=<string>]
 & [use_utf8_bom=<bool>]
 & [<any field name>=<string>]
application_id *

Filtering by the app's numeric ID in AppMetrica

date_since *

Start of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

date_until *

End of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

fields *

A comma-separated list of fields for the sample.

A list that contains all available fields (for quick copy):

error,error_datetime,error_id,error_name,error_receive_datetime,error_receive_timestamp,error_timestamp,appmetrica_device_id,city,connection_type,country_iso_code,device_ipv6,device_locale,device_manufacturer,device_model,device_type,google_aid,ios_ifa,ios_ifv,mcc,mnc,operator_name,os_name,os_version,profile_id,windows_aid,app_package_name,app_version_name,application_id
Copied to clipboard
date_dimension
The parameter defines what date and time are used as a condition for getting into the data sample:
  • default — When the event occurred on the device;
  • receive — When the server received event information.
limit

Limit on the number of items in the list. Takes the maximum value by default. There is no guarantee that results will match from request to request (there may be differences in results sorting).

use_utf8_bom

Parameter that enables the use of byte order mark. The default value is false.

<any field name>

Filtering by the value of one of the available fields. Only the equality check operation is supported.

application_id *

Filtering by the app's numeric ID in AppMetrica

date_since *

Start of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

date_until *

End of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

fields *

A comma-separated list of fields for the sample.

A list that contains all available fields (for quick copy):

error,error_datetime,error_id,error_name,error_receive_datetime,error_receive_timestamp,error_timestamp,appmetrica_device_id,city,connection_type,country_iso_code,device_ipv6,device_locale,device_manufacturer,device_model,device_type,google_aid,ios_ifa,ios_ifv,mcc,mnc,operator_name,os_name,os_version,profile_id,windows_aid,app_package_name,app_version_name,application_id
Copied to clipboard
date_dimension
The parameter defines what date and time are used as a condition for getting into the data sample:
  • default — When the event occurred on the device;
  • receive — When the server received event information.
limit

Limit on the number of items in the list. Takes the maximum value by default. There is no guarantee that results will match from request to request (there may be differences in results sorting).

use_utf8_bom

Parameter that enables the use of byte order mark. The default value is false.

<any field name>

Filtering by the value of one of the available fields. Only the equality check operation is supported.

* Required

Response format

If all available fields are requested:
{
  "data": [
    {
      "error": "string",
      "error_datetime": "string",
      "error_id": "string",
      "error_name": "string",
      "error_receive_datetime": "string",
      "error_receive_timestamp": "integer",
      "error_timestamp": "integer",
      "appmetrica_device_id": "integer",
      "city": "string",
      "connection_type": "string",
      "country_iso_code": "string",
      "device_ipv6": "string",
      "device_locale": "string",
      "device_manufacturer": "string",
      "device_model": "string",
      "device_type": "string",
      "google_aid": "string",
      "ios_ifa": "string",
      "ios_ifv": "string",
      "mcc": "integer",
      "mnc": "integer",
      "operator_name": "string",
      "os_name": "string",
      "os_version": "string",
      "profile_id": "string",
      "windows_aid": "string",
      "app_package_name": "string",
      "app_version_name": "string",
      "application_id": "integer"
    },
    ...
  ]
}
Copied to clipboard
error
Error text.
error_datetime
Date and time of the error in the yyyy-mm-dd hh:mm:ss format.
error_id
Error ID.
error_name
Error name.
error_receive_datetime
The time when the server received the error message, in the yyyy-mm-dd hh:mm:ss format. It may differ from error_datetime due to network delays or problems with the user's internet connection.
error_receive_timestamp
Time when the error message was received on the server side, in Unix time format. It may differ from error_timestamp due to network delays or problems with the user's internet connection.
error_timestamp
Time of the error in Unix time format.
appmetrica_device_id
A unique device identifier detected by the AppMetrica service.
city
The name in English of the city where the click took place.
connection_type
Device connection type. Possible values: wifi | cell | unknown.
country_iso_code
ISO country code.
device_ipv6
The IP address at the time of event, in IPv6 format. For example, 2a02:6b8::40c:6676:baff:fea6:53d8, ::ffff:5.255.232.147
device_locale
The device language.
device_manufacturer
The device manufacturer as detected by the AppMetrica service (for example, Apple or Samsung).
device_model
The device model as detected by the AppMetrica service (for example, Galaxy S6).
device_type
The device type detected by the AppMetrica service. Possible values: phone | tablet | unknown.
google_aid
Google AID device in the format received from the device.
ios_ifa
IFA of the device in the format received from the device.
ios_ifv
IFV for the app in the format received from the device.
mcc
Mobile country code.
mnc
Mobile network code.
operator_name
Name of the mobile operator.
os_name
Operating system on the user's device: ios | android | windows.
os_version
Version of the operating system on the user's device.
profile_id
User profile ID.
windows_aid
Windows AID of the device in the format received from the device.
app_package_name
Package name for Android or Bundle ID for iOS (for example, ru.yandex.metro).
app_version_name
Version of the app as specified by the developer.
application_id
Unique numeric identifier for the application in AppMetrica.

Example

Request:
curl -X GET \
  'https://api.appmetrica.yandex.ru/logs/v1/export/errors.json?application_id=1111&date_since=2018-10-10&date_until=2018-10-11&fields=error,error_datetime,error_id,error_name,error_receive_datetime,error_receive_timestamp,error_timestamp,appmetrica_device_id,city,connection_type,country_iso_code,device_ipv6,device_locale,device_manufacturer,device_model,device_type,google_aid,ios_ifa,ios_ifv,mcc,mnc,operator_name,os_name,os_version,profile_id,windows_aid,app_package_name,app_version_name,application_id' \
  -H 'Authorization: OAuth oauth_token'
Copied to clipboard

Response:

{
  "data": [
    {
      "error": "Incident Identifier: 0D315FB9-E548-4DB4-A740-CE99C44D8CEC\nCrashReporter Key: (null)\nHardware Model: iPhone10,3\nProcess: (null) [(null)]\nPath: (null)\nIdentifier: (null)\nVersion: (null) ((null))\nCode Type: ARM-64\nParent Process: ? [(null)]\n\nDate/Time: yyyy-mm-dd hh:mm:ss +0300\nOS Version: (null) (null) ((null))\nReport Version: 104\n\nException Type: Custom Exception\n\nName: API request error after 2 retries: AjaxError, ajax error [/api/v3/launcher/similar]. Actions: FEED_ITEM_SHOW,FEED_ITEM_IS_VIEWABLE,FEED_ITEM_CLICK,FEED_ITEM_IS_VIEWABLE,FEED_ITEM_SHOW,FEED_ITEM_CLICK,FEED_ITEM_IS_VIEWABLE,FEED_ITEM_SHOW. \nReason: \nUserInfo: {\n \"js_stack\" = \"\";\n}\n\n\n",
      "error_datetime": "yyyy-mm-dd hh:mm:ss",
      "error_id": "8553967143270641335",
      "error_name": "",
      "error_receive_datetime": "yyyy-mm-dd hh:mm:ss",
      "error_receive_timestamp": "1556258667",
      "error_timestamp": "1556258660",
      "appmetrica_device_id": "123456789012345678",
      "city": "Moscow",
      "connection_type": "wifi",
      "country_iso_code": "RU",
      "device_ipv6": "::ffff:5.255.232.147",
      "device_locale": "ru_RU",
      "device_manufacturer": "Apple",
      "device_model": "iPhone X",
      "device_type": "phone",
      "google_aid": "",
      "ios_ifa": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "ios_ifv": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "mcc": "250",
      "mnc": "1",
      "operator_name": "MTS RUS",
      "os_name": "ios",
      "os_version": "12.2",
      "profile_id": "test",
      "windows_aid": "",
      "app_package_name": "ru.yandex.metro",
      "app_version_name": "1.0",
      "application_id": "1111"
    }
  ]
}
Copied to clipboard