Skip to content

Retrieves the report column hierarchy.

Method getobj.columns_tree
Description Retrieves the report column hierarchy.
Who has access Agents and clients
Required components Data API for configuration
Request weight 1 point

Request parameters

Name 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 agent) To 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 metric formula - 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

Example request

{
"jsonrpc":"2.0",
"id":"number",
"method":"getobj.columns_tree",
"params":{
"access_token":"string",
"user_id":"number",
"report_type": "enum"
}
}

Example response

{
"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"
}
]
}
}
}

Example response

{
"jsonrpc": "2.0",
"id": "number",
"result": {
"metadata": {
},
"data": {
"columns_groups": [
{
"id": 1,
"name": "Visits",
"description": "Session metrics",
"parent_group_id": null,
"sort": 100
},
{
"id": 2,
"name": "Costs",
"description": "Advertising cost metrics",
"parent_group_id": null,
"sort": 200
},
{
"id": 3,
"name": "My columns",
"description": "Custom columns",
"parent_group_id": null,
"sort": 300
}
],
"columns": [
{
"id": "cc_1",
"name": "Average page depth",
"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": "Bounces",
"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": "New visits",
"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": "Average time on site",
"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
}
]
}
}

}

Possible errors

See the "Errors for getobj methods" section.