Skip to content

Retrieves aggregate data for a user report.

Method getobj.report_total
Description Retrieves aggregate data for a user report.
Who has access Agents and clients
Required components Data API for configuration
Request weight 1 point

Request parameters

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 and time of the reporting period. Maximum range: 366 days.
date_till iso8601 yes YYYY-MM-DD hh:mm:ss End date and time of the reporting period.
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. Comma-separated list of column IDs. To retrieve available columns, use getobj.columns_tree. Their order determines the order of fields in the response.
Filters used in the report
filters array yes An expression can contain both simple filters and a filter tree.
field string Field to filter by. The supported fields are predefined for this 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 Aggregate values for the requested metrics at the current hierarchy level.

Example request

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

}

Example request

{
"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":"Target"
},
{
"field":"tags",
"operator":"=",
"value":"Lead"
}
],
"condition":"or"
},
{
"filters":[
{
"field":"site_domain",
"operator":"=",
"value":"www.site1.ae"
},
{
"field":"site_domain",
"operator":"=",
"value":"www.site1.ae"
}
],
"condition":"or"
}
],
"condition":"and"
}
}
}

Example response

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

Filter nestring examples

Minimum nestring level

{
"filter":{
"field":"tags",
"operator":"=",
"value":"Target"
}
}

Maximum nestring level (nestring depth: 2)

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

Possible errors

See the "Errors for getobj methods" section.