Skip to content

Basic search

Basic search is activated when URI attribute advanced_search is missing or set to 0, like:

/api/v2/users.json?advanced_search=0

Example of basic search using daterange and search_term attributes (note, multiple filtering parameters can be specified at the same time):

/api/v2/calls.json?daterange=2014/11/01-2014/12/01&search_term=12345

The following table lists the attributes available for basic search.

Parameter Description
daterange

Filter by date range. Format of daterange is either YYYY/MM/DD-YYYY/MM/DD or YYYY/MM/DD

For example, the following query will return all recordings from 2014/11/01 00:00:00 to 2014/12/01 24:00:00:

/api/v2/calls.json?daterange=2014/11/01-2014/12/01

The following query will return all recordings from 00:00:00 to 24:00:00 of 2014/11/01

/api/v2/calls.json?daterange=2014/11/01

Note, the query will be executed with REST API user's timezone. If user's timezone is not configured, then groups, tenants or system default timezone will be used.

user_id

Filter by user.

The following query will return all recordings associated with the user identified by ID. user_id is a unique ID of user created in MiaRec:

/api/v2/calls.json?user_id=546340bf-7b47-11e4-85a4-e03f497dbdff
user_login

Filter by user login.

The following query will return all recordings associated with the user identified by login:

/api/v2/calls.json?user_login=john.smith
group_id

Filter by group.

The following query will return all recordings associated with the specified group:

/api/v2/calls.json?group_id=d1d83c40-eec7-11e4-8558-e03f497dbdff
tenant_id

Filter by tenant.

The following query will return all recordings associated with the specified tenant:

/api/v2/calls.json?tenant_id=d1d83c40-eec7-11e4-8558-e03f497dbdff
search_term

Search a text in the phone number, phone name and notes.

Example:

/api/v2/calls.json?search_term=1234
category_id

Filter recordings by category.

Example:

/api/v2/calls.json?category_id=de8440f6-f291-11e4-9476-e03f497dbdff
broadworks_user_id

Filter recordings by Broadworks User ID.

Example:

/api/v2/calls.json?broadworks_user_id=user@broadworks.com
broadworks_group_id

Filter recordings by Broadworks Group ID.

Example:

/api/v2/calls.json?broadworks_group_id=GroupA
active_only

Return active calls only.

Example:

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