---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.4
alternate:
  - https://appmetrica.yandex.com/docs/en/mobile-api/logs/ref/profiles.md
  - https://appmetrica.yandex.com/docs/ru/mobile-api/logs/ref/profiles.md
  - https://appmetrica.yandex.com/docs/zh/mobile-api/logs/ref/profiles.md
  - href: https://appmetrica.yandex.com/docs/zh/mobile-api/logs/ref/profiles.md
    type: text/markdown
    title: Markdown version
  - href: https://appmetrica.yandex.com/docs/zh/llms.txt?revision=r21698989
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.com/docs/zh/llms.txt?revision=r21698989

# 个人资料

返回特定日期范围内更新的个人资料信息。

{% note info %}

最新的资源版本是`profiles_v2`. 资源 `profiles` 即将被删除。 Resource version `profiles_v2` 现在包含新的必需参数：`date_since` 和 `date_until`.

{% endnote %}

## 请求格式 {#request-format}

```
获取 https://api.appmetrica.yandex.com/logs/v1/export/profiles_v2.{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>]
  & [version=<string>]
  & [update_timestamp=<string>]
  & [skip_unavailable_shards=<bool>]
```

#|
|| `应用ID`* | 按应用在 AppMetrica 中的数字 ID 过滤。 ||
|| `date_since`* | 日期范围的开始，格式为 `yyyy-mm-dd hh:mm:ss`。 您还可以定义影响 `date_dimension` 查询参数中数据的日期和时间类型。 ||
|| `date_until`* | 日期范围的结束，格式为 `yyyy-mm-dd hh:mm:ss`。 您还可以定义影响 `date_dimension` 查询参数中数据的日期和时间类型。 ||
|| `fields`* | 用逗号分隔的[字段列表](https://appmetrica.yandex.com/docs/zh/mobile-api/logs/endpoints.md)，用于示例。

一个包含所有可用字段的列表（便于快速复制）：

```objectivec translate=no
profile_id,appmetrica_gender,appmetrica_birth_date,appmetrica_notifications_enabled,appmetrica_name,<any attribute name>,appmetrica_crashes,appmetrica_errors,appmetrica_first_session_date,appmetrica_last_start_date,appmetrica_push_opens,appmetrica_push_send_count,appmetrica_sdk_version,appmetrica_sessions,android_id,appmetrica_device_id,city,connection_type,country_iso_code,device_manufacturer,device_model,device_type,google_aid,ios_ifa,ios_ifv,mcc,mnc,operator_name,os_name,os_version,windows_aid,app_build_number,app_framework,app_package_name,app_version_name
```
||
|| `date_dimension` | 此参数定义计算日期范围的起点：
- `default`：事件在设备上发生时。
- `receive`：服务器收到事件信息时。
 ||
|| `限制` | 列表中项目数量的限制。 默认取最大值。 不保证请求之间的结果一致（结果排序可能存在差异）。 ||
|| `使用 UTF-8 BOM` | 启用字节顺序标记使用的参数。 默认值为 `false`。
 ||
|| `<any field name>` | 按可用字段之一的值过滤。 仅支持相等检查操作。 ||
|| `版本` | 个人资料版本。 ||
|| `update_timestamp` | 个人资料更新的时间，格式为 [Unix time](https://en.wikipedia.org/wiki/Unix_time)。 ||
|| `跳过不可用的分片` | 用于[提高数据可用性](https://appmetrica.yandex.com/docs/zh/mobile-api/logs/request-procedure.md#availability)。 默认值为 `false`。
 ||
|#

## 响应格式 {#response-format}

如果请求了所有可用的字段：

{% list tabs %}

- JSON

  ```json translate=no
  {
    "data": [
      {
        "profile_id": "string",
        "appmetrica_gender": "string",
        "appmetrica_birth_date": "string",
        "appmetrica_notifications_enabled": "boolean",
        "appmetrica_name": "string",
        "appmetrica_crashes": "integer",
        "appmetrica_errors": "integer",
        "appmetrica_first_session_date": "string",
        "appmetrica_last_start_date": "string",
        "appmetrica_push_opens": "integer",
        "appmetrica_push_send_count": "integer",
        "appmetrica_sdk_version": "integer",
        "appmetrica_sessions": "integer",
        "android_id": "string",
        "appmetrica_device_id": "integer",
        "city": "string",
        "connection_type": "string",
        "country_iso_code": "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",
        "windows_aid": "string",
        "app_build_number": "integer",
        "app_framework": "integer",
        "app_package_name": "string",
        "app_version_name": "string"
      },
      ...
    ]
  }
  ```

- CSV

  ```
  应用程序ID,ios_ifa,操作系统名称,...
  1111,024AE7EB-4128-4237-9803-D24950323D4D,ios,...
  1111,3A86D5E8-1985-4A23-B147-5A1C0CF8781E,ios,...
  1111,,android
  ...
  ```

{% endlist %}

#|
|| `profile_id` | 用户个人资料 ID。 ||
|| `appmetrica_gender` | 性别。 ||
|| `appmetrica_出生日期` | 年龄。 ||
|| `appmetrica_通知已启用` | 通知已启用。 ||
|| `appmetrica_name` | 名称。 ||
|| `appmetrica_crashes` | 崩溃次数。 ||
|| `appmetrica_errors` | 错误次数。 ||
|| `appmetrica_第一次会话日期` | 第一次会话的日期。 ||
|| `appmetrica_上次启动日期` | 应用最后一次启动的日期。 ||
|| `appmetrica 推送打开` | 打开的推送通知数量。 ||
|| `AppMetrica 推送发送计数` | 已发送的推送通知数量。 ||
|| `AppMetrica SDK 版本` | AppMetrica SDK 的版本。 ||
|| `appmetrica_sessions` | 会话次数。 ||
|| `android_id` | Android 设备 ID。 ||
|| `appmetrica 设备 ID` | AppMetrica 服务检测到的唯一设备标识符。 在 Android 中来自 [AppSetId](https://developer.android.com/identity/app-set-id)，在 iOS 中来自 [IFV](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)。 ||
|| `城市` | 城市名称（英文）。 ||
|| `连接类型` | 连接类型。 可能的值：`wifi` \| `cell` \| `unknown`。
 ||
|| `country_iso_code` | ISO 国家代码。 ||
|| `设备制造商` | AppMetrica 服务检测到的设备制造商（例如，Apple 或 Samsung）。 ||
|| `设备型号` | AppMetrica 服务检测到的设备型号（例如，Galaxy S6）。 ||
|| `device_type` | AppMetrica 服务检测到的设备类型。 可能的值：`phone` \| `tablet` \| `unknown`。
 ||
|| `google_aid` | 设备的 Google AID，格式为从设备接收的格式。 ||
|| `ios_ifa` | 设备的 IFA，格式为从设备接收的格式。 ||
|| `ios_ifv` | 应用的 IFV，格式为从设备接收的格式。 ||
|| `mcc` | 移动国家代码。 ||
|| `mnc` | 移动网络代码。 ||
|| `operator_name` | 移动运营商名称。 ||
|| `os_name` | 用户设备上的操作系统：`ios` \| `android` \| `windows`。
 ||
|| `os_version` | 用户设备上的操作系统版本。 ||
|| `windows_aid` | 设备的 Windows AID，格式为从设备接收的格式。 ||
|| `应用构建号` | 应用构建号。 ||
|| `app_framework` | 框架类型。

返回以下值之一：
- "0"：原生。
- "1"：Unity。
- "2"：Xamarin。
- "3"：React。
- "4"：Cordova。
 ||
|| `应用包名` | Android 的包名，或 iOS 的 Bundle ID（例如，ru.yandex.metro）。 ||
|| `应用版本名称` | 开发者指定的应用版本格式。 ||
|#

## Example {#example}

请求：

```bash translate=no
curl -X GET \
  'https://api.appmetrica.yandex.com/logs/v1/export/profiles_v2.json?application_id=1111&fields=profile_id,appmetrica_gender,appmetrica_birth_date,appmetrica_notifications_enabled,appmetrica_name,appmetrica_crashes,appmetrica_errors,appmetrica_first_session_date,appmetrica_last_start_date,appmetrica_push_opens,appmetrica_push_send_count,appmetrica_sdk_version,appmetrica_sessions,android_id,appmetrica_device_id,city,connection_type,country_iso_code,device_manufacturer,device_model,device_type,google_aid,ios_ifa,ios_ifv,mcc,mnc,operator_name,os_name,os_version,windows_aid,app_build_number,app_framework,app_package_name,app_version_name' \
  -H 'Authorization: OAuth oauth_token'
```

响应：

```json translate=no
{
  "data": [
    {
      "profile_id": "test",
      "appmetrica_gender": "M",
      "appmetrica_birth_date": "30",
      "appmetrica_notifications_enabled": "false",
      "appmetrica_name": "John",
      "appmetrica_crashes": "1",
      "appmetrica_errors": "3",
      "appmetrica_first_session_date": "yyyy-mm-dd",
      "appmetrica_last_start_date": "yyyy-mm-dd",
      "appmetrica_push_opens": "3",
      "appmetrica_push_send_count": "8",
      "appmetrica_sdk_version": "3001000",
      "appmetrica_sessions": "15",
      "android_id": "android_id__example",
      "appmetrica_device_id": "123456789012345678",
      "city": "Moscow",
      "connection_type": "wifi",
      "country_iso_code": "RU",
      "device_manufacturer": "Apple",
      "device_model": "iPhone X",
      "device_type": "phone",
      "google_aid": "google_aid__example",
      "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",
      "windows_aid": "windows_aid__example",
      "app_build_number": "1",
      "app_framework": "0",
      "app_package_name": "ru.yandex.metro",
      "app_version_name": "1.0"
    }
  ]
}
```

<!-- source: zh/_includes/feedback-button-3.md -->
如果您没有找到所需答案，可以通过反馈表单提交您的问题。 请尽可能详细地描述问题。 如果可能，请附上截图。

<a href="../troubleshooting/feedback-new">
  <span class="button">联系支持</span>
</a>

<a href="../troubleshooting/feedback-docs">
  <span class="button">为文档提出改进建议</span>
</a>
<!-- endsource: zh/_includes/feedback-button-3.md -->
