Skip to content

Advanced search

Advanced search is activated when URI attribute advanced_search is set to 1, like:

/api/v2/calls.json?advanced_search=1

To support various comparison operators like "ends with", "is not empty", the URI parameters should be formatted as:

[PARAM_NAME]__[OPERATOR]=[VALUE]

Where:

  • [PARAM_NAME] is an attribute name, like "user_id", "from_number", etc.
  • [OPERATOR] is a comparison operator, like "is_empty", "lower_than", etc.
  • [VALUE] is the value to compare the attribute to. Note, the value is always required, even for operators like "is_empty". In this case, supply 1 or any other value, which will be ignored in the end.

Note, two underscore characters (__) are used as a separator between attribute name and operator.

Example of the advanced search URI query:

/api/v2/calls.json?advanced_search=1&phone_number__includes=1234&user_name__equal_to=J%20Smith

This is equivalent to:

("phone_number"  INCLUDES  "1234")  AND  ("user_name"  EQUAL_TO  "J Smith")

Note, a space character is encoded with %20 in URI

Table 1. Supported operators

Parameter Type (see Table 2) Description
date date Date of call recording
datetime datetime Date/Time of call recording
duration duration Duration of call recording
direction set Call Direction
voip_protocol set Voip Protocol
user_id set User ID
user_name string User Name
group_id set Group ID
tenant_id set Tenant ID
category_id set Category ID
client_id set Client ID
notes string Notes
notes_count number Notes Count
call_id string_exact Call ID
pbx_call_id string PBX Call ID
pbx_tracking_id string PBX Tracking ID
call_state set Call State
record_state set Recording State
phone_number string Phone Number
phone_number_from string Phone Number (FROM only)
phone_number_to string Phone Number (TO only)
phone_name string Phone Name
phone_name_from string Phone Name (FROM only)
phone_name_to string Phone Name (TO only)
phone_id string Phone ID
phone_id_from string Phone ID (FROM only)
phone_id_to string Phone ID (TO only)
orig_calling_number string Orig Calling Number
orig_dialed_number string Orig Dialed Number
acd_number string ACD Number
acd_name string ACD Name
acd_id string ACD ID
redirected_from_number string Redirected From Number
redirected_from_name string Redirected From Name
redirected_from_id string Redirected From ID
redirected_to_number string Redirected To Number
redirected_to_name string Redirected To Name
redirected_to_id string Redirected To ID
phone_ip_address string IP Address
phone_ip_address_from string IP Address (FROM only)
phone_ip_address_to string IP Address (TO only)
broadworks_sp_id string Broadworks SP ID
broadworks_group_id string Broadworks Group ID
broadworks_user_id string Broadworks User ID
cisco_phone_ip string Cisco Phone IP Address
cisco_refci string_exact Cisco xRefCi
cisco_ucce_agent_id set Cisco UCCE Agent
cisco_ucce_skill_group_id set Cisco UCCE Skill Group
cisco_ucce_recovery_key number Cisco UCCE Call ID
metaswitch_system string Metaswitch System Name
metaswitch_group string Metaswitch Group Name
metaswitch_user string Metaswitch User Name
metaswitch_extension string Metaswitch User Extension
agent_id string Avaya Agent ID
agent_name string Avaya Agent Name
evaluation_report_score number Evaluation Report Score
evaluation_report_status set Evaluation Report Status
evaluation_reports_count number Evaluation Reports Count
screen_recordings_count number Screen Recordings Count
file_path string File Path
encrypt_fingerprint string_exact Encrypt Fingerprint
confidential bool Confidential Flag

Table 2. Supported comparison operators

Parameter type Supported operators
string
  • equal_to - attribute's value matches exactly a text
  • not_equal_to - attribute's value doesn't match a text
  • starts_with - attribute's value starts with a text
  • ends_with - attribute's value ends with a text
  • includes - attribute's value includes a text
  • is_empty - attribute's value is an empty string or not specified
  • not_empty - attribute's value is not an empty string
  • pattern - attribute's value matches a simple pattern (similar to SQL LIKE) using _ symbol to match exactly one character and % symbol to match zero or more characters.
  • regex - attribute's value matches a Regular Expression pattern.
string_exact
  • is - attribute's value matches exactly a text
  • is_not - attribute's value doesn't match a text
  • is_empty - attribute's value is an empty string or not specified
  • not_empty - attribute's value is not an empty string
string_query
  • query - attribute's value matches to a query expression
  • is_empty - attribute's value is an empty string or not specified
  • not_empty - attribute's value is not an empty string
number
  • equal_to - attribute's value equals to a number
  • not_equal_to - attribute's value doesn't equal a number
  • greater_than - attribute's value is greater than a number
  • lower_than - attribute's value is lower than a number
  • between - attribute's value is between two numbers
  • is_empty - attribute's value is not available (NULL)
  • not_empty - attribute's value is available (NOT NULL)
date
  • equal_to - attribute's value equals to a date
  • older_than - attribute's value is before a date
  • newer_than - attribute's value is after a date
  • between - attribute's value is between dates, separated by " - "
  • older_than_days - attribute's value is older than a specified number of days (integer)
  • newer_than_days - attribute's value is newer than a specified number of days (integer)

Format of date is:

  • YYYY/MM/DD
  • YYYY/MM/DD - YYYY/MM/DD - a range of date values (note, the space characters around the separator '-' are not required)
datetime
  • older_than - attribute's value is before a date+time
  • newer_than - attribute's value is after a date+time
  • between - attribute's value is between two date+time values, separated by "/"
  • older_than_minutes - attribute's value is older than a specified number of minutes
  • newer_than_minutes - attribute's value is newer than a specified number of minutes

Format of datetime is ISO8601. Example values:

  • 2019-04-30T06:00:00.000Z
  • 2019-04-30T06:00:00.000Z/2019-04-30T06:30:00.000Z - a range of datetime values (note, a separator character is "/")
duration
  • greater_than - attribute's value is lower than a duration
  • lower_than - attribute's value is after a duration
  • between - attribute's value is between two duration values, separated by " - "

Format of duration is:

  • SS - a number of seconds
  • MM:SS - minutes + seconds
  • HH:MM:SS - hours + minutes + seconds
  • SS - SS or MM:SS - MM:SS or HH:MM:SS - HH:MM:SS - a range of duration values (note, the space characters around the separator '-' are not required)
set
  • is - attribute's value equals to a text
  • is_not - attribute's value doesn't equal to a text
bool
  • is_true - attribute's value is TRUE
  • is_false - attribute's value is FALSE or not specified (NULL)