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: 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
{
  "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: 1

org_id

Type: integer

Min value: 1

Example
{
  "org_id": 1,
  "label_id": 1
}

Responses

200 OK

OK

Body

application/json
{
  "query": {
    "ids": [
      0
    ],
    "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
      ],
      "metrics_confidence_threshold": [
        0
      ],
      "metrics_confidence_flags": [
        true
      ],
      "expand": true,
      "extended_metrics": [
        {
          "value": 0.5,
          "error": 0.5,
          "coef_to_reference": 0.5
        }
      ]
    }
  ],
  "meta": {
    "dimensions": [
      {
        "id": "example",
        "dim": "example",
        "name": "example",
        "short_name": "example",
        "group_name": "example",
        "description": "example",
        "type": "example",
        "disallow_by_time": true,
        "allow_filters": true,
        "parameter": {
          "id": "example",
          "description": "example",
          "dim": "example"
        },
        "fields": {},
        "allow_sort": true,
        "default_sort": "example",
        "allow_null": true,
        "sub_table": "example",
        "permission_scope": "example",
        "since": "example",
        "advanced": true,
        "required_keys": [
          "example"
        ],
        "features": [
          "example"
        ],
        "chained_attributes_group_name": "example",
        "chained_attributes_group_index": 0,
        "secret": true,
        "exposes_secret_data": true,
        "disjoint": true,
        "relations": [
          "example"
        ]
      }
    ],
    "metrics": [
      {
        "dim": "example",
        "metric_string": "example",
        "name": "example",
        "description": "example",
        "allow_normalisation": true,
        "require_dynamic_correction": true,
        "allow_filters": true,
        "type": "example",
        "allow_sort": true,
        "default_sort": "example",
        "advanced": true,
        "support_confidence": true,
        "negative": true,
        "parameters": [
          null
        ],
        "sub_table": "example",
        "required_dimension": "example",
        "permission_scope": "example",
        "since": "example",
        "required_keys": [
          "example"
        ],
        "features": [
          "example"
        ],
        "secret": true,
        "exposes_secret_data": true
      }
    ]
  },
  "total_rows": 0,
  "total_rows_rounded": true,
  "with_confidence": true,
  "exclude_insignificant": true,
  "sampled": true,
  "sampleable": true,
  "contains_sensitive_data": true,
  "sample_share": 0.5,
  "max_sample_share": 0.5,
  "min_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 true, the response will not display such data if the sample is less than 10 users.
Possible values: true, false.

data

Type: DrillDownRow[]

Example
[
  {
    "dimension": {},
    "metrics": [
      0.5
    ],
    "metrics_confidence_threshold": [
      0
    ],
    "metrics_confidence_flags": [
      true
    ],
    "expand": true,
    "extended_metrics": [
      {
        "value": 0.5,
        "error": 0.5,
        "coef_to_reference": 0.5
      }
    ]
  }
]

data_lag

Type: integer

Delay in updating data, in seconds.

max

Type: number[]

Example
[
  0.5
]

meta

Type: Meta

Request metadata. Contains a description of request dimensions and metrics.

Example
{
  "dimensions": [
    {
      "id": "example",
      "dim": "example",
      "name": "example",
      "short_name": "example",
      "group_name": "example",
      "description": "example",
      "type": "example",
      "disallow_by_time": true,
      "allow_filters": true,
      "parameter": {
        "id": "example",
        "description": "example",
        "dim": "example"
      },
      "fields": {},
      "allow_sort": true,
      "default_sort": "example",
      "allow_null": true,
      "sub_table": "example",
      "permission_scope": "example",
      "since": "example",
      "advanced": true,
      "required_keys": [
        "example"
      ],
      "features": [
        "example"
      ],
      "chained_attributes_group_name": "example",
      "chained_attributes_group_index": 0,
      "secret": true,
      "exposes_secret_data": true,
      "disjoint": true,
      "relations": [
        "example"
      ]
    }
  ],
  "metrics": [
    {
      "dim": "example",
      "metric_string": "example",
      "name": "example",
      "description": "example",
      "allow_normalisation": true,
      "require_dynamic_correction": true,
      "allow_filters": true,
      "type": "example",
      "allow_sort": true,
      "default_sort": "example",
      "advanced": true,
      "support_confidence": true,
      "negative": true,
      "parameters": [
        null
      ],
      "sub_table": "example",
      "required_dimension": "example",
      "permission_scope": "example",
      "since": "example",
      "required_keys": [
        "example"
      ],
      "features": [
        "example"
      ],
      "secret": true,
      "exposes_secret_data": true
    }
  ]
}

min

Type: number[]

Example
[
  0.5
]

query

Type: QueryExternal

Original request. Contains the request parameters, including detailed parameters from the template and parameters for attribute parametrization.

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

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: true, false.

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

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: example

date2

Type: string

End date of the report period in the format YYYY-MM-DD.

Example: example

dimensions

Type: string[]

Example
[
  "example"
]

filters

Type: string

Segmentation filter.

Example: example

limit

Type: integer

Number of items on the results page.

metrics

Type: string[]

Example
[
  "example"
]

offset

Type: integer

Index of the first row of requested data, starting from 1.

preset

Type: string

Report preset.

Example: example

sort

Type: string[]

Example
[
  "example"
]

timezone

Type: string

The time zone of the selection period in the format ±hh:mm.

Example: 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

[additional]

Type: string

Dimension value for the specified level of the tree. For example, the second tree level is set (the parent_id array is one ID long). In this case, the field contains the value of the second dimension in the request.

Example: example

Dimension value for the specified level of the tree. For example, the second tree level is set (the parent_id array is one ID long). In this case, the field contains the value of the second dimension in the request.

Example
{}

expand

Type: boolean

Indicates whether to expand this row to the next level of the tree.

metrics

Type: number[]

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

ParamMetaExternal

List of metric parameters

Name

Description

description

Type: string

Parameter description

Example: example

dim

Type: string

Name of a dimension with values

Example: example

id

Type: string

Parameter ID

Example: example

Example
{
  "id": "example",
  "description": "example",
  "dim": "example"
}

DimensionMetaExternal

Name

Description

advanced

Type: boolean

Dimension for an advanced user

allow_filters

Type: boolean

Whether filters can be used

allow_null

Type: boolean

Whether "Undefined" can be shown for this dimension

allow_sort

Type: boolean

Whether sorting by this dimension is allowed

chained_attributes_group_index

Type: integer

Dimension order in a group of linked dimensions

chained_attributes_group_name

Type: string

Name of a group of linked dimensions

Example: example

default_sort

Type: string

Sorting method:

  • asc
  • desc

Example: example

description

Type: string

Metric description

Example: example

dim

Type: string

Grouping data

Example: example

disallow_by_time

Type: boolean

Whether this dimension is allowed along with grouping data by time.

features

Type: string[]

Tag characteristics required for dimension use

Unique items: true

Example
[
  "example"
]

fields

Type: object

[additional]

Type: DimensionMetaExternal

Example
{
  "id": "example",
  "dim": "example",
  "name": "example",
  "short_name": "example",
  "group_name": "example",
  "description": "example",
  "type": "example",
  "disallow_by_time": true,
  "allow_filters": true,
  "parameter": {
    "id": "example",
    "description": "example",
    "dim": "example"
  },
  "fields": {},
  "allow_sort": true,
  "default_sort": "example",
  "allow_null": true,
  "sub_table": "example",
  "permission_scope": "example",
  "since": "example",
  "advanced": true,
  "required_keys": [
    "example"
  ],
  "features": [
    "example"
  ],
  "chained_attributes_group_name": "example",
  "chained_attributes_group_index": 0,
  "secret": true,
  "exposes_secret_data": true,
  "disjoint": true,
  "relations": [
    "example"
  ]
}

Additional fields for the current dimension

Example
{}

group_name

Type: string

Names of dimensions when enumerating them

Example: example

id

Type: string

Dimension ID without any prefix or parameters

Example: example

name

Type: string

Dimension name

Example: example

parameter

Type: ParamMetaExternal

List of metric parameters

Example
{
  "id": "example",
  "description": "example",
  "dim": "example"
}

permission_scope

Type: string

Dimension access group

Example: example

required_keys

Type: string[]

Example
[
  "example"
]

short_name

Type: string

Dimension name

Example: example

since

Type: string

Date when dimension data appeared

Example: example

sub_table

Type: string

Subtable

Example: example

type

Type: string

Dimension interface type

Example: example

Example
{
  "id": "example",
  "dim": "example",
  "name": "example",
  "short_name": "example",
  "group_name": "example",
  "description": "example",
  "type": "example",
  "disallow_by_time": true,
  "allow_filters": true,
  "parameter": {
    "id": "example",
    "description": "example",
    "dim": "example"
  },
  "fields": {},
  "allow_sort": true,
  "default_sort": "example",
  "allow_null": true,
  "sub_table": "example",
  "permission_scope": "example",
  "since": "example",
  "advanced": true,
  "required_keys": [
    "example"
  ],
  "features": [
    "example"
  ],
  "chained_attributes_group_name": "example",
  "chained_attributes_group_index": 0
}

MetricMetaExternal

Array of request metric metadata.

Name

Description

advanced

Type: boolean

Metric for advanced users

allow_filters

Type: boolean

Whether filters can be used

allow_normalisation

Type: boolean

Whether values can be normalized

allow_sort

Type: boolean

Whether data can be sorted by this metric

default_sort

Type: string

Sorting method:

  • asc
  • desc

Example: example

description

Type: string

Metric description

Example: example

dim

Type: string

Metric

Example: example

exposes_secret_data

Type: boolean

Discloses sensitive data

features

Type: string[]

Tag characteristics required for metric use

Unique items: true

Example
[
  "example"
]

metric_string

Type: string

Metric with a parameter value

Example: example

name

Type: string

Metric name

Example: example

negative

Type: boolean

Whether the metric is a negative indicator in terms of data interpretation, for example, the bounce rate, robot percentage, and so on.

parameters

Type: ParamMetaExternal[]

List of metric parameters

Example
[
  {
    "id": "example",
    "description": "example",
    "dim": "example"
  }
]

permission_scope

Type: string

Metric access group

Example: example

require_dynamic_correction

Type: boolean

Whether values require adjustments in the time report

required_dimension

Type: string

Dimension required for the metric

Example: example

required_keys

Type: string[]

Example
[
  "example"
]

secret

Type: boolean

Contains sensitive data

since

Type: string

Date when metric data appeared

Example: example

sub_table

Type: string

Subtable

Example: example

support_confidence

Type: boolean

Whether confidence can be estimated by this metric

type

Type: string

Metric type.

  • int
  • double
  • second
  • millisecond
  • affinity
  • percents
  • currency

Example: example

Example
{
  "dim": "example",
  "metric_string": "example",
  "name": "example",
  "description": "example",
  "allow_normalisation": true,
  "require_dynamic_correction": true,
  "allow_filters": true,
  "type": "example",
  "allow_sort": true,
  "default_sort": "example",
  "advanced": true,
  "support_confidence": true,
  "negative": true,
  "parameters": [
    {
      "id": "example",
      "description": "example",
      "dim": "example"
    }
  ],
  "sub_table": "example",
  "required_dimension": "example",
  "permission_scope": "example",
  "since": "example",
  "required_keys": [
    "example"
  ],
  "features": [
    "example"
  ],
  "secret": true,
  "exposes_secret_data": true
}

Meta

Request metadata. Contains a description of request dimensions and metrics.

Name

Description

dimensions

Type: DimensionMetaExternal[]

Example
[
  {
    "id": "example",
    "dim": "example",
    "name": "example",
    "short_name": "example",
    "group_name": "example",
    "description": "example",
    "type": "example",
    "disallow_by_time": true,
    "allow_filters": true,
    "parameter": {
      "id": "example",
      "description": "example",
      "dim": "example"
    },
    "fields": {},
    "allow_sort": true,
    "default_sort": "example",
    "allow_null": true,
    "sub_table": "example",
    "permission_scope": "example",
    "since": "example",
    "advanced": true,
    "required_keys": [
      "example"
    ],
    "features": [
      "example"
    ],
    "chained_attributes_group_name": "example",
    "chained_attributes_group_index": 0,
    "secret": true,
    "exposes_secret_data": true,
    "disjoint": true,
    "relations": [
      "example"
    ]
  }
]

metrics

Type: MetricMetaExternal[]

Example
[
  {
    "dim": "example",
    "metric_string": "example",
    "name": "example",
    "description": "example",
    "allow_normalisation": true,
    "require_dynamic_correction": true,
    "allow_filters": true,
    "type": "example",
    "allow_sort": true,
    "default_sort": "example",
    "advanced": true,
    "support_confidence": true,
    "negative": true,
    "parameters": [
      {
        "id": "example",
        "description": "example",
        "dim": "example"
      }
    ],
    "sub_table": "example",
    "required_dimension": "example",
    "permission_scope": "example",
    "since": "example",
    "required_keys": [
      "example"
    ],
    "features": [
      "example"
    ],
    "secret": true,
    "exposes_secret_data": true
  }
]
Example
{
  "dimensions": [
    {
      "id": "example",
      "dim": "example",
      "name": "example",
      "short_name": "example",
      "group_name": "example",
      "description": "example",
      "type": "example",
      "disallow_by_time": true,
      "allow_filters": true,
      "parameter": {
        "id": "example",
        "description": "example",
        "dim": "example"
      },
      "fields": {},
      "allow_sort": true,
      "default_sort": "example",
      "allow_null": true,
      "sub_table": "example",
      "permission_scope": "example",
      "since": "example",
      "advanced": true,
      "required_keys": [
        "example"
      ],
      "features": [
        "example"
      ],
      "chained_attributes_group_name": "example",
      "chained_attributes_group_index": 0,
      "secret": true,
      "exposes_secret_data": true,
      "disjoint": true,
      "relations": [
        "example"
      ]
    }
  ],
  "metrics": [
    {
      "dim": "example",
      "metric_string": "example",
      "name": "example",
      "description": "example",
      "allow_normalisation": true,
      "require_dynamic_correction": true,
      "allow_filters": true,
      "type": "example",
      "allow_sort": true,
      "default_sort": "example",
      "advanced": true,
      "support_confidence": true,
      "negative": true,
      "parameters": [
        null
      ],
      "sub_table": "example",
      "required_dimension": "example",
      "permission_scope": "example",
      "since": "example",
      "required_keys": [
        "example"
      ],
      "features": [
        "example"
      ],
      "secret": true,
      "exposes_secret_data": true
    }
  ]
}

ExtendedMetrics

Name

Description

coef_to_reference

Type: number

error

Type: number

value

Type: number

Example
{
  "value": 0.5,
  "error": 0.5,
  "coef_to_reference": 0.5
}

No longer supported, please use an alternative and newer version.