Skip to main content

Quick Search

This service is used to retrieve information for the quick search section.

Note: If you wish to use this service for retrieving contact information, only include the cuid field and remove the date fields.

Parameters

DescriptionDefined DataSample DataRequired[**]/Logical[*]Parameters
---conditions->from
---conditions->to
Contact ID--conditions->cuid
Retrieve reports from date-2020-06-15 15:16**date_range->from
Retrieve reports until date-2022-06-22 15:16**date_range->to
--0pagination->start
--20pagination->count
---pagination->sorting
Find similar casestrue/falsetrue**alike

Sample Invocation

*** (Search by time)***

Show Full Source Code PHP

	<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'http://192.168.51.20/api/v4/reports/quick/search',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"conditions":{"from": "", "to": "", "cuid":""},
"date_range":{"from":"2020-06-15 15:16","to":"2022-06-22 15:16"},
"pagination":{"start":0,"count":20,"sorting":{}},
"alike":"true"
}',
CURLOPT_HTTPHEADER => array(
'X-APIKEY: 9UV0BWKRL83PYIH9Gv1fI85d41lO4S932EeX3wHC47sHjMJOMG',
'Authorization: Basic c2FkcjpTYWRyQDEyMw==',
'Content-Type: application/json'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
?>

Example of search invocation based on cuid

(In this case, date_range must be empty)

Show Full Source Code PHP

	<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'http://192.168.51.20/api/v4/reports/cdr',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"conditions":{"from": "", "to": "", "cuid":"1677933940.72434"},
"date_range":{},
"pagination":{"start":0,"count":20,"sorting":{}},
"alike":"true"
}',
CURLOPT_HTTPHEADER => array(
'X-APIKEY: 9UV0BWKRL83PYIH9Gv1fI85d41lO4S932EeX3wHC47sHjMJOMG',
'Authorization: Basic c2FkcjpTYWRyQDEyMw==',
'Content-Type: application/json'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
?>