unistra / python-glpi-api

Python module for interacting with GLPI using the API.
GNU General Public License v3.0
18 stars 10 forks source link

Support 'searchText' parameter in get_all_items api call #17

Closed pniaps closed 1 year ago

pniaps commented 1 year ago

This change allows using the searchText parameter in Get all items api call.

You can use something like this

results = glpi.get_all_items(
            'Computer',
            get_hateoas=0,
            searchText = {'name':'server','comment':'critical'}
        )

Remember, the searchText parameter is used as LIKE condition on GLPI side, so the example before will return the computers whichs contains server in his name and critical in his comment.

pniaps commented 1 year ago

Thanks for your comments.

fmenabe commented 1 year ago

version 0.4.0 has been released on Pypi