Drill down
Used to generate a multi-level (tree view) report. Each level corresponds to a single dimension.
A request to the drilldown method returns one sublevel for the specified parent level. The parent level is specified in the parent_id parameter. To get data for the top level, send a request without the parent_id parameter.
To get data for nested levels, you must specify the path from the root. The path is formed from values of the id field for the dimension parameter. If the id field is omitted, specify the name field.
See an example with this request.
Request
GET
https://api.appmetrica.yandex.net/stat/v1/data/drilldown
Query parameters
|
Name |
Description |
|
params |
Type: DrillDownParams Example: `` |
|
statGroupParams |
Type: StatGroupParams Example: `` |
DrillDownParams
|
Name |
Description |
|
access_filter_id |
Type: integer |
|
accuracy |
Type: string Example: |
|
callback |
Type: string Example: |
|
confidence_level |
Type: string Default: |
|
date_dimension |
Type: string Example: |
|
date1 |
Type: string Default: |
|
date2 |
Type: string Default: |
|
dimensions |
Type: string Example: |
|
direct_client_ids |
Type: integer[] Example
|
|
direct_client_logins |
Type: string[] Example
|
|
exclude_insignificant |
Type: boolean |
|
filters |
Type: string Example: |
|
ids |
Type: integer[] Example
|
|
include_meta |
Type: boolean |
|
include_undefined |
Type: boolean |
|
lang |
Type: string Example: |
|
limit |
Type: string Default: |
|
max_deviation |
Type: string Default: |
|
metrics |
Type: string Example: |
|
offset |
Type: string Default: |
|
only_expandable_undefined |
Type: boolean |
|
parent_id |
Type: string[] Example
|
|
preset |
Type: string Example: |
|
pretty |
Type: string Default: |
|
proposed_accuracy |
Type: boolean |
|
reference_row_id |
Type: string[] Example
|
|
request_domain |
Type: string Example: |
|
require_metric_values |
Type: string Default: |
|
sort |
Type: string Example: |
|
timezone |
Type: string Example: |
|
with_confidence |
Type: boolean |
Example
{
"ids": [
0
],
"direct_client_ids": [
0
],
"direct_client_logins": [
"example"
],
"date1": "6daysAgo",
"date2": "today",
"timezone": "example",
"preset": "example",
"metrics": "example",
"dimensions": "example",
"reference_row_id": [
"example"
],
"filters": "example",
"accuracy": "example",
"proposed_accuracy": true,
"include_undefined": true,
"include_meta": true,
"with_confidence": true,
"exclude_insignificant": true,
"confidence_level": "0.95",
"max_deviation": "0.1",
"pretty": "false",
"lang": "example",
"request_domain": "example",
"require_metric_values": "false",
"access_filter_id": 0,
"callback": "example",
"date_dimension": "example",
"sort": "example",
"limit": "100",
"offset": "1",
"parent_id": [
"example"
],
"only_expandable_undefined": true
}
StatGroupParams
|
Name |
Description |
|
label_id |
Type: integer Min value: |
|
org_id |
Type: integer Min value: |
Example
{
"org_id": 1,
"label_id": 1
}
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 Indicates whether sensitive data can be omitted from the response. Such data includes data calculated by Yandex algorithms: demographic data (gender, age, and other), login page addresses, search phrases, and robot information. If the value is |
|
data |
Type: DrillDownRow[] Example
|
|
data_lag |
Type: integer Delay in updating data, in seconds. |
|
max |
Type: number[] Example
|
|
min |
Type: number[] Example
|
|
query |
Type: QueryExternal Original request. Contains the request parameters, including detailed parameters from the template and parameters for attribute parametrization. Example
|
|
sample_share |
Type: number Percentage of data used for the calculation. Available values range from 0 to 1. |
|
sample_size |
Type: integer Number of rows in the requested data. |
|
sample_space |
Type: integer Number of data rows. |
|
sampled |
Type: boolean Sampling flag. Indicates whether sampling was applied. Possible values: |
|
total_rows |
Type: integer The total number of rows in the response for the entire dataset (after filtering). |
|
total_rows_rounded |
Type: boolean Indicates that the total number of rows was rounded. |
|
totals |
Type: number[] Example
|
QueryExternal
Original request. Contains the request parameters, including detailed parameters from the template and parameters for attribute parametrization.
|
Name |
Description |
|
date1 |
Type: string Start date of the report period in the format YYYY-MM-DD. Example: |
|
date2 |
Type: string End date of the report period in the format YYYY-MM-DD. Example: |
|
dimensions |
Type: string[] Example
|
|
filters |
Type: string Segmentation filter. Example: |
|
limit |
Type: integer Number of items on the results page. |
|
metrics |
Type: string[] Example
|
|
offset |
Type: integer Index of the first row of requested data, starting from 1. |
|
preset |
Type: string Report preset. Example: |
|
sort |
Type: string[] Example
|
|
timezone |
Type: string The time zone of the selection period in the format ±hh:mm. Example: |
Example
{
"timezone": "example",
"preset": "example",
"dimensions": [
"example"
],
"metrics": [
"example"
],
"sort": [
"example"
],
"date1": "example",
"date2": "example",
"filters": "example",
"limit": 0,
"offset": 0
}
DrillDownRow
Response rows. An array in which each item is a single row of the result.
|
Name |
Description |
||
|
dimension |
Type: object
Dimension value for the specified level of the tree. For example, the second tree level is set (the Example
|
||
|
expand |
Type: boolean Indicates whether to expand this row to the next level of the tree. |
||
|
metrics |
Type: number[] Example
|
Example
{
"dimension": {},
"metrics": [
0.5
],
"expand": true
}