OCSInventory-NG / OCSInventory-Server

Communication server of OCS Inventory
http://www.ocsinventory-ng.org/
GNU General Public License v2.0
344 stars 139 forks source link

[REST API] Computers search endpoint not filtering #201

Closed GermanoGuerrini closed 4 years ago

GermanoGuerrini commented 4 years ago

General informations

Operating system : Centos 7

Server informations

Perl version : 5.16.3 Mysql / Mariadb / Percona version : Ver 15.1 Distrib 5.5.60-MariaDB

Server installation method ( Only one choice )

OCS Inventory informations

Ocs server version : 2.6.0

Problem's description

The endpoint to search computers by hardware table columns does not seem to work. It always returns the full list of monitored computers ids regardless of search columns or even the limit parameter. For example: /ocsapi/v1/computers/search?NAME=S6-OPELMCS02&start=0&limit=1 returns [["1"],["2"],["4"],["5"],["6"],["3"],["7"]]

In fact, even if a wrong search parameter is specified (that is, an invalid hardware table column name), the result won't change, even though in this case I would have expected an error.

etobella commented 4 years ago

We have the same issue on our installation. We are unable to filter using the search.

jarroyomorales commented 4 years ago

Hi, I am having the same problem. With this bug it is very hard for us to work with the API, it would be great to get an answer. Thank you!

jarroyomorales commented 4 years ago

Is anyone working on this? If not I may try it...

etobella commented 4 years ago

@gillesdubois Any news on this?

jarroyomorales commented 4 years ago

@charleneauger Could you please take a look? Thank you!

Draktann commented 4 years ago

Up Same problem here on debian 9.0.

gillesdubois commented 4 years ago

Hi,

This problem has been fixed, search endpoint will be working as intended now.

Regards, Gilles Dubois.

jarroyomorales commented 4 years ago

@gillesdubois Thank you!