| Method | getobj.columns_tree |
|---|---|
| Description | Getting column nesting |
| Available to | Agent, Client |
| Necessary components for working with the method | Data API for configuration |
| Method weight | 1 point |
Request parameters
| Title | Type | Required | Description |
|---|---|---|---|
access_token |
string | yes | Authentication session key |
user_id |
number | no | Unique user identifier of the agent client on behalf of which the request is made Is required for the agentTo obtain a list of client users, you must use the method "get.customer_users" |
report_type |
enum | yes | User report type. To get a list of user reports, you must use the method "get.reports_list" |
Response parameters
| Name | Type | Valid values | Default response | Description | ||
|---|---|---|---|---|---|---|
| Column groups | ||||||
columns_groups |
array | yes | List of column groups | |||
id |
number | Column group identifier | ||||
name |
string | Column group name | ||||
description |
string | Description of the column group. Displayed in tooltip | ||||
parent_group_id |
number | Identifier of the column group in which this column group is nested | ||||
sort |
number | End-to-end identifier used for sorting in the column tree. | ||||
| Columns | ||||||
columns |
array | yes | List of columns available to the user in the report | |||
id |
string | Column mnemonic | ||||
name |
string | Column name | ||||
description |
string | Description of the column. Displayed in tooltip | ||||
group_id |
number | Identifier of the column group in which this column is nested | ||||
sort |
number | End-to-end identifier used for sorting in the dimension tree. | ||||
is_custom |
boolean | Whether the column is custom. | ||||
type |
enum | metric - Column based on metricformula - Formula-based column | Column type. Depending on the column type, you need to use the appropriate methods to edit and get settings. | |||
expression |
string | The filter conditions used on the column or the formula to calculate the column. Displayed in tooltip | ||||
data_type |
enum | yes | Data format | |||
multichannel_model |
enum | yes | Multichannel analysis method used | |||
is_transferable |
boolean | yes | Is it possible to navigate to other reports using this column? | |||
is_pie_chart_available |
boolean | Availability of a column for display in a graphical form of a pie chart | ||||
is_available_dash_widgets |
boolean | Availability of columns for dashboard widgets | ||||
is_available_interactive_dash_widgets |
boolean | Availability of columns for interactivity in dashboard widgets | ||||
JSON request structure```json
{ "jsonrpc":"2.0", "id":"number", "method":"getobj.columns_tree", "params":{ "access_token":"string", "user_id":"number", "report_type": "enum" } }
### JSON response structure```JSON
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"metadata": {
},
"data": {
"columns_groups": [
{
"id": "number",
"name": "string",
"description": "string",
"parent_group_id": "number",
"sort": "number"
}
],
"columns": [
{
"id": "string",
"name": "string",
"description": "string",
"group_id": "number",
"sort": "number",
"is_custom": "boolean",
"type": "enum",
"expression": "string",
"data_type": "enum",
"multichannel_model": "enum",
"is_pie_chart_available": "boolean",
"is_transferable": "boolean"
}
]
}
}
}
JSON Example response```JSON
{ "jsonrpc": "2.0", "id": "number", "result": { "metadata": {
},
"data": {
"columns_groups": [
{
"id": 1,
"name": "Посещения",
"description": "Показатели сессии",
"parent_group_id": null,
"sort": 100
},
{
"id": 2,
"name": "Расходы",
"description": "Показатели связанные с расходами на рекламу",
"parent_group_id": null,
"sort": 200
}
{
"id": 3,
"name": "Мои столбцы",
"description": "Пользовательские столбцы",
"parent_group_id": null,
"sort": 300
}
],
"columns": [
{
"id": "cc_1",
"name": "Глубина просмотра, среднее",
"sort": 110,
"type": "metric",
"group_id": 1,
"data_type": "float",
"is_custom": false,
"expression": null,
"description": null,
"multichannel_model": null,
"is_transferable": false,
"is_pie_chart_available": false
},
{
"id": "cc_2",
"name": "Отказы, количество",
"sort": 111,
"type": "metric",
"group_id": 1,
"data_type": "integer",
"is_custom": false,
"expression": null,
"description": null,
"multichannel_model": null,
"is_transferable": false,
"is_pie_chart_available": true
},
{
"id": "cc_3",
"name": "Новые посещения, количество",
"sort": 112,
"type": "metric",
"group_id": 1,
"data_type": "integer",
"is_custom": false,
"expression": null,
"description": null,
"multichannel_model": null,
"is_transferable": false,
"is_pie_chart_available": true
},
{
"id": "cc_4",
"name": "Время на сайте, среднее",
"sort": 113,
"type": "metric",
"group_id": 1,
"data_type": "time",
"is_custom": false,
"expression": null,
"description": null,
"multichannel_model": null,
"is_transferable": false,
"is_pie_chart_available": false
}
]
}
}
} ```
List of returned errors
Look at the section "List of errors for methods with the verb getobj"