Drill down

用于生成多级(树形结构)报告。 每个级别对应一个维度。 对 drilldown 方法的请求会返回指定父级别的一个子级别。 父级别由 parent_id 参数指定。 要获取顶级数据,请发送不包含 parent_id 参数的请求。 要获取嵌套级别的数据,必须指定从根节点的路径。 路径由 id 字段的值和 dimension 参数形成。 如果省略了id字段,请指定name字段。 See 一个示例 with this request.

Request

GET

https://api.appmetrica.yandex.net/stat/v1/data/drilldown

Query parameters

Name

Description

params

Type: object

access_filter_id

Type: integer

accuracy

Type: string

Example: example

callback

Type: string

Example: example

confidence_level

Type: string

Default: 0.95

date_dimension

Type: string

Example: example

date1

Type: string

Default: 6daysAgo

date2

Type: string

Default: today

dimensions

Type: string

Example: example

direct_client_ids

Type: integer[]

Example
[
  0
]

direct_client_logins

Type: string[]

Example
[
  "example"
]

exclude_insignificant

Type: boolean

filters

Type: string

Example: example

ids

Type: integer[]

Example
[
  0
]

include_meta

Type: boolean

include_undefined

Type: boolean

lang

Type: string

Example: example

limit

Type: string

Default: 100

max_deviation

Type: string

Default: 0.1

metrics

Type: string

Example: example

offset

Type: string

Default: 1

only_expandable_undefined

Type: boolean

parent_id

Type: string[]

Example
[
  "example"
]

preset

Type: string

Example: example

pretty

Type: string

Default: false

proposed_accuracy

Type: boolean

reference_row_id

Type: string[]

Example
[
  "example"
]

request_domain

Type: string

Example: example

require_metric_values

Type: string

Default: false

sort

Type: string

Example: example

timezone

Type: string

Example: example

with_confidence

Type: boolean

Example: ``

statGroupParams

Type: object

label_id

Type: integer

Min value: 1

org_id

Type: integer

Min value: 1

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",
    "limit": 0,
    "offset": 0
  },
  "data": [
    {
      "dimension": {},
      "metrics": [
        0.5
      ],
      "expand": true
    }
  ],
  "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
  ],
  "min": [
    0.5
  ],
  "max": [
    0.5
  ]
}

Name

Description

contains_sensitive_data

Type: boolean

表示是否可以从响应中省略敏感数据。 这些数据包括由 Yandex 算法计算出的数据:人口统计数据(性别、年龄等)、登录页地址、搜索词语以及机器人信息。 如果值是true,当样本少于10个用户时,响应不会显示这些数据。 Possible values: 真, 假.

data

Type: object[]

dimension

Type: object

[additional]

Type: string

树级别指定的维度值。 例如,第二级树已设置(parent_id 数组长度为一个 ID)。 在这种情况下,字段包含请求中第二维度的值。

Example: example

树级别指定的维度值。 例如,第二级树已设置(parent_id 数组长度为一个 ID)。 在这种情况下,字段包含请求中第二个维度的值。

Example
{}

expand

Type: boolean

表示是否展开此行至树的下一级。

metrics

Type: number[]

Example
[
  0.5
]
Example
[
  {
    "dimension": {},
    "metrics": [
      0.5
    ],
    "expand": true
  }
]

data_lag

Type: integer

数据更新延迟,以秒为单位。

max

Type: number[]

Example
[
  0.5
]

min

Type: number[]

Example
[
  0.5
]

query

Type: object

date1

Type: string

报告期的开始日期,格式为 YYYY-MM-DD。

Example: example

date2

Type: string

报告期末日期,格式为YYYY-MM-DD。

Example: example

dimensions

Type: string[]

Example
[
  "example"
]

filters

Type: string

Segmentation filter.

Example: example

limit

Type: integer

结果页上的项目数量。

metrics

Type: string[]

Example
[
  "example"
]

offset

Type: integer

请求数据第一行的索引,从1开始。

preset

Type: string

报告预设。

Example: example

sort

Type: string[]

Example
[
  "example"
]

timezone

Type: string

选择期间的时区,格式为 ±hh:mm。

Example: example

Original request. 包含请求参数,包括模板中的详细参数和属性参数化的参数。

Example
{
  "timezone": "example",
  "preset": "example",
  "dimensions": [
    "example"
  ],
  "metrics": [
    "example"
  ],
  "sort": [
    "example"
  ],
  "date1": "example",
  "date2": "example",
  "filters": "example",
  "limit": 0,
  "offset": 0
}

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
[
  0.5
]