Cumulocity-IoT / cumulocityr

R client for the Cumulocity API
https://softwareag.github.io/cumulocityr/
3 stars 3 forks source link

Invalid statistics when filtered #2

Closed iasai1 closed 4 years ago

iasai1 commented 4 years ago

I've noticed an issue when applying filters to inventory requests

For example, if i go to {{url}}/inventory/managedObjects , statistics will be like this:

"statistics": {
        "totalPages":11,
        "currentPage": 1,
        "pageSize": 5
    },

Which is how it should be.

However, if apply a filter, like {{url}}/inventory/managedObjects?fragmentType=c8y_IsDevice , the statistics would look like this:

"statistics": {
        "currentPage": 1,
        "pageSize": 5
    },

Same would happen to any other filter. To be clear, there are actually multiple pages in the response I'm getting.

Also, if I query a device measurements, statistics would always look like this:

"statistics": {
        "totalPages": null,
        "currentPage": 1,
        "pageSize": 5
    },

In the documentation it's the same issue, with no explanation.

Is there any work around for now to know how many pages there are? It is extremely inconvenient

dbolotov commented 4 years ago

Hi,

Thank you for raising this issue, we see what you mean. While this does happen in the R package, the behavior seems to exist in the Cumulocity API itself, outside of R.

Can you please request support with Cumulocity directly, through your tenant?