---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.4
alternate:
  - https://appmetrica.yandex.com/docs/en/mobile-api/datastream/ref/status.md
  - https://appmetrica.yandex.com/docs/ru/mobile-api/datastream/ref/status.md
  - https://appmetrica.yandex.com/docs/zh/mobile-api/datastream/ref/status.md
  - href: https://appmetrica.yandex.com/docs/zh/mobile-api/datastream/ref/status.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

# Stream status

返回每种事件类型的流列表。 每个流包含一个 5 分钟窗口列表，其中包含数据大小和导出字段的组成。

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

```
获取 https://api.appmetrica.yandex.com/datastream/v1/application/{id}/status
```

#|
|| `id` | App ID ||
|#

## 响应格式 {#output-structure}

```json translate=no
{
    "status": {
        "streams": [
            {
                "data_type": string,
                "stream_windows": [
                    {
                        "stream_window_timestamp": int,
                        "export_schema_id": int,
                        "payload_bytes": int,
                        "event_count": int,
                        "update_timestamp": int
                    },
                    ...
                ]
            },
            ...
        ],
        "export_fields": [
            {
                "export_schema_id": int,
                "field_names": [
                    "event_datetime",
                    "event_json",
                    "event_name",
                    "event_timestamp",
                    "session_id",
                    "installation_id",
                    "appmetrica_device_id",
                    "city",
                    "connection_type",
                    "country_iso_code",
                    ...
                ]
            },
            ...
        ]
    }
}
```

#|
|| `状态` | API 响应。 ||
|| `状态.流` | 包含导出数据的流列表。 ||
|| `状态.流[i].数据类型` | 构成流的数据类型。

可接受的值：
- `event`
- `installation`
- `session_start`
- `session_end`
- `push_token`
- `crash`
- `error`
- `click`
- `revenue`
- `ecommerce`
- `ad_revenue`
- `attributed_event`
- `deeplink`
 ||
|| `状态.流[i].流窗口` | 流窗口列表。 ||
|| `状态.流[i].流窗口[j].流窗口时间戳` | 指向数据窗口的 Unix 时间戳（以秒为单位）。 用于指定下载数据的窗口。 ||
|| `状态.流[i].流窗口[j].导出模式ID` | CSV 字段集的 ID。 ||
|| `状态.流[i].流窗口[j].负载字节` | CSV 文件的大小（以字节为单位），不包括 CSV 标头。 ||
|| `状态.流[i].流窗口[j].事件计数` | CSV 文件中的事件数量。 ||
|| `状态.流[i].流窗口[j].更新时间戳` | Unix 时间戳（以秒为单位）。 指示此窗口中最后一次数据更改的时间。 更改发生在当前正在追加数据的最后几个窗口中。 ||
|| `状态.导出字段` | 包含用于生成数据窗口的 CSV 字段集列表。 ||
|| `状态.导出字段[i].导出架构ID` | CSV 字段集的 ID。 ||
|| `状态.导出字段[i].字段名称` | 为导出选择的字段的字符串名称列表。 关于字段的更多信息，请参见[导出的数据类型](https://appmetrica.yandex.com/docs/zh/mobile-api/datastream/data-type-fields.md)。 ||
|#

## Example {#example}

请求：

```bash translate=no
curl -X GET 'https://api.appmetrica.yandex.com/datastream/v1/application/1111/status' \
-H 'Authorization: OAuth oauth_token'
```

响应:

```json translate=no
{
    "status": {
        "streams": [
            {
                "data_type": string,
                "stream_windows": [
                    {
                        "stream_window_timestamp": int,
                        "export_schema_id": int,
                        "payload_bytes": int,
                        "event_count": int,
                        "update_timestamp": int
                    },
                    ...
                ]
            },
            ...
        ],
        "export_fields": [
            {
                "export_schema_id": int,
                "field_names": [
                    "event_datetime",
                    "event_json",
                    "event_name",
                    "event_timestamp",
                    "session_id",
                    "installation_id",
                    "appmetrica_device_id",
                    "city",
                    "connection_type",
                    "country_iso_code",
                    ...
                ]
            },
            ...
        ]
    }
}
```

<!-- 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 -->
