Forum Discussion

kk_1's avatar
kk_1
Icon for Neophyte rankNeophyte
4 months ago

LogicMonitor.Api C# nuget limits size to 300?

Hi, We have just started using the LogicMonitor Api Nuget to collect data from LM. I have noticed when we call either the GetAllDeviceDataSourcesAsync or GetAllAsync we only get 300 back. I have upd...
  • David_Bond's avatar
    4 months ago

    Hello kk_1

    For clarity, the LogicMonitor.Api nuget package is NOT provided by LogicMonitor.  It's provided by my company Panoramic Data Limited (PDL).  It's MIT licensed, open source (https://github.com/panoramicdata/LogicMonitor.Api/) and so free to use.

    It is not possible for the client (library) to override REST service ("santaba")'s server-set maximum page sizes.  For example, if you ask for 10,000 the LogicMonitor will still only return the server-size maximum number of items.  There is nothing that we can do in the client Nuget to change the server's behaviour, so we reduce the requested page size back down to our understanding of the maximum in client-side code to ensure correct paging.

    Next issue - you state that the documentation claims a max page size of 1000 for the V3 API.  This is indeed news to me!  For years and years (V1 and V2), the maximum page size varied HUGELY between endpoints.  For some, the max size was 25, for most 300.  We had to put a lot of code in the library to adjust these based on the endpoint being called.

    However, like you, we value query performance!  So I have asked my developers to look at raising this to 1000 across the board.  Please be patient, as there is a LOT of production-critical code relying on successful paging, so it will take a while to validate the change before we can publish it.

    You can track the issue here: https://github.com/panoramicdata/LogicMonitor.Api/issues/10