Method getobj.report_total
Description Receiving the resulting data in the user report
Available to Agent, Client
Necessary components for working with the method Data API for configuration
Method weight 1 point

Request parameters

method
Name Type Required Valid values 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. Currently only works for report type call_summary_uis. To get a list of user reports, you must use the "get.reports_list"
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Start date of main sample (limit 366 days)
date_till iso8601 yes YYYY-MM-DD hh:mm:ss End date of the main sample
columns array yes If transfer_dimension_value_id is filled in, then you need to specify only one column on which the click occurred to go. List of custom column identifiers, separated by comma. For a list of available columns, see "Getting Column Nesting" . The order affects the answer.
Filters used in the report
filter object no It is permissible to use no more than 2 уровней nesting. See examples below Filters applied in the report. The construction logic is similar to "Filtering criteria"
filters array yes An expression can contain both simple filters and a filter tree.
field string The field of the entity to which filtering will be applied (the list is predefined for the method
operator enum Filtering operator. A list of all operators can be obtained in the section "Filtering operators"
value string Value for the filtering operator. Optional field; if it is missing, it is considered empty.

Response parameters

Name Type Valid values Filtering Sorting Default response Description
totals array Summary data for the requested indicators in columns at the current level.

JSON request structure```json

{ "id": "number", "jsonrpc": "2.0", "method": "getobj.report_total", "params": { "access_token": "string", "user_id": "number", "report_type": "enum", "date_from": "iso8601", "date_till": "iso8601",
"columns": [ "column1", "columnN" ], "filter":{

    }
}

}

### JSON example request structure```json
{
    "id": "number",
    "jsonrpc": "2.0",
    "method": "getobj.report_total",
    "params": {
        "access_token": "string",
        "user_id": "number",
        "limit": "number",
        "offset": "number",
        "report_type": "call_summary_uis",
        "date_from": "2020-02-01 00:00:00",
        "date_till": "2020-02-01 23:59:59",
        "columns": [
            "cc_302"
        ],
        "filter":{
            "filters":[
              {
                "filters":[
                  {
                    "field":"tags",
                    "operator":"=",
                    "value":"Целевой"
                  },
                  {
                    "field":"tags",
                    "operator":"=",
                    "value":"Лид"
                  }
                ],
                "condition":"or"
              },
              {
                "filters":[
                  {
                    "field":"site_domain",
                    "operator":"=",
                    "value":"www.site1.ru"
                  },
                  {
                    "field":"site_domain",
                    "operator":"=",
                    "value":"www.site1.ru"
                  }
                ],
                "condition":"or"
              }
            ],
            "condition":"and"
        }
    }
}

JSON Example response```JSON

{ "id": "1", "jsonrpc": "2.0", "result": { "data": { "totals": [ 34.0 ] } } }

### JSON Examples of filter nesting
#### Minimum nesting level```JSON
{
    "filter":{
        "field":"tags",
        "operator":"=",
        "value":"Целевой"
    }
}

Maximum nesting level (Nesting level = 2)```JSON

{ "filter":{ "filters":[ { "filters":[ { "field":"string", "operator":"enum", "value":"string" } ], "condition":"or" }, { "filters":[ { "field":"string", "operator":"enum", "value":"string" } ], "condition":"or" } ], "condition":"and" } } ```

List of returned errors

Look at the section "List of errors for methods with the verb getobj"