获取按时间排序的数据
让您按时间段(例如按天、周或月)获取数据。 使用这种请求类型来绘制图表并跟踪随时间变化的统计数据。
Request
GET
https://api.appmetrica.yandex.net/stat/v1/data/bytime
Query parameters
|
Name |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
params |
Type: object
Example: `` |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
statGroupParams |
Type: object
Example: `` |
Responses
200 OK
OK
Body
application/json
{
"query": {
"timezone": "example",
"preset": "example",
"dimensions": [
"example"
],
"metrics": [
"example"
],
"sort": [
"example"
],
"date1": "example",
"date2": "example",
"filters": "example"
},
"data": [
{
"dimensions": [
{}
],
"metrics": [
[
0.5
]
]
}
],
"total_rows": 0,
"total_rows_rounded": true,
"sampled": true,
"contains_sensitive_data": true,
"sample_share": 0.5,
"sample_size": 0,
"sample_space": 0,
"data_lag": 0,
"totals": [
[
0.5
]
],
"annotations": [
[
{
"id": 0,
"date": "2025-01-01",
"time": "12:00:00",
"title": "example",
"message": "example",
"group": "example"
}
]
]
}
|
Name |
Description |
||||||||||||||||
|
annotations |
Type: object[][]
Comments. Example
|
||||||||||||||||
|
contains_sensitive_data |
Type: boolean 表示是否可以从响应中省略敏感数据。 这些数据包括由 Yandex 算法计算出的数据:人口统计数据(性别、年龄等)、登录页地址、搜索词语以及机器人信息。 如果值是 |
||||||||||||||||
|
data |
Type: object[]
Example
|
||||||||||||||||
|
data_lag |
Type: integer 数据更新延迟,以秒为单位。 |
||||||||||||||||
|
query |
Type: object
Original request. 包含请求参数,包括模板中的详细参数和属性参数化的参数。 Example
|
||||||||||||||||
|
sample_share |
Type: number 用于计算的数据百分比。 可用的值范围是 0 到 1。 |
||||||||||||||||
|
sample_size |
Type: integer 请求数据中的行数。 |
||||||||||||||||
|
sample_space |
Type: integer 数据行数。 |
||||||||||||||||
|
sampled |
Type: boolean Sampling flag. 表示是否应用了采样。 Possible values: |
||||||||||||||||
|
total_rows |
Type: integer 响应中整个数据集(过滤后)的总行数。 |
||||||||||||||||
|
total_rows_rounded |
Type: boolean 表示总行数已被四舍五入。 |
||||||||||||||||
|
totals |
Type: number[][] 整个数据集(经过过滤)的指标总结果。 Example
|