Cumulocity-IoT / cumulocity-python-api

Python client for the Cumulocity REST API. Created by Global Competency Center IoT
Apache License 2.0
18 stars 13 forks source link

Query parameter c8y.inventory.select is not working #51

Closed ck-c8y closed 9 months ago

ck-c8y commented 10 months ago

I would like to send a query to the inventory api:

filter_01 = f"$filter=applicationId eq '{app_id}' and name eq '{APPLICATION_NAME}'"
managed_objects_app = c8y.inventory.select(query=filter_01)

When I debug the url I don't see that it is considered: DEBUG:urllib3.connectionpool:https://SOME_TENANT.cumulocity.com:443 "GET /inventory/managedObjects?pageSize=1000&currentPage=1 HTTP/1.1" 200 None

chisou commented 9 months ago

This was a bug in the query handling logic. Solved with version 1.10 Version 1.10 now also features an expression parameter which allows to describe the entire filter expression using the native syntax.