TiersService :: GetCount
The POST method, is used to retrieve data.
The list of parameters is not mandatory to request:
- Criteria Criteria.
Returns count Contacts.
Input parameters:
{"criteria":
{
"__type":"CriteriaLogical:http://www.proconsult.lu/WebServices100",
"Operand1":
{
"__type":"CriteriaComparison:http://www.proconsult.lu/WebServices100",
"FieldName": "Pays",
"Operator": "0",
"Value": "Belgique"
},
"Operator":0
}
}
Example:
require (__DIR__ . '/service/Criteria.php');
use services\WebServices100;
use services\Criteria;
// add parameters
$response = new Criteria();
$response->setType('CriteriaLogical:http://www.proconsult.lu/WebServices100');
$response->setFieldName('Pays');
$response->setOperator("0");
$response->setValue("Belgique");
$response->setOperand(
[
'Operand1' => [
'__type' => 'CriteriaComparison:http://www.proconsult.lu/WebServices100',
'FieldName' => 'Pays',
'Operator' => '0',
'Value' => 'Belgique']
]
);
$data = $response->getResponse();
$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/TiersService/rest/GetCount';
// Send requests to receive data
$result = WebServices100::getData($url, $data)));
$countContact = json_decode($result);
Result:
58