Closed antoinearrive closed 6 years ago
Hello,
The searchItem resource has not been implemented yet. It will be available for the next update or if you can develop it do a pull request to update the code.
@DIOHz0r Thx for your reply
@antoinearrive I lookup for your question and the current search method could be used as the following example....
$criteria[] = ['field' => 1, 'searchtype' => 'contains', 'value' => 'normal'];
$criteria[] = ['link' => 'OR', 'field' => 1, 'searchtype' => 'contains', 'value' => 'tech'];
$itemHandler->searchItems('Users',[
'criteria' => $criteria,
'order' => 'DESC',
'uid_cols' => 'true',
]);
As you can see the arguments given on the api documentation should send as a array[ key => value], the criteria and multicriteria keys would have the value as an array of search filters. The keys are in lowercase and for the first argument the itemtype is not necessary
Hi, I'm trying to make a query "searchItems" but I can not find the syntax in the documentation. Someone could give me an example of a simple query "search items"
Observed Results:
$response = $this->client->searchItems('Ticket', array( 'criteria' => array( 'itemtype' => 'Ticket', 'field' => 1, 'searchType' => 'contains', 'value' => 'aaa', ) ) );
Expected behavior:
Thx !