LogicMonitor.Api C# API nuget 1.191 Released
All that strongly-typed goodness can be found in the usual place: Web:https://www.nuget.org/packages/LogicMonitor.Api/ Visual Studio / VS Code: manage nuget packages for your project/solution and search for "LogicMonitor" Adding LogicMonitor.Api to your project It's THIS easy to print an inventory of all regular Resources (paging is handled automatically): Taking inventory in 25 lines or fewer We will answer your questions on this forum! Please include the word "C#" or "nuget" in your subject line.66Views17likes4CommentsLogicMonitor.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 updated the code to pass in a filter with Take=1000, but the dependency logs still show the size as 300. I have noticed that 300 appears to be hardcoded deep inside the code at https://github.com/panoramicdata/LogicMonitor.Api/blob/main/LogicMonitor.Api/LogicMonitorClient.cs#L218 and was wondering if anyone knew the reason for this hardcoding? The issue is that with a size of 300 it means we are using 3x the calls that are possible (the max should be 1000) and this will mean we hit the https://www.logicmonitor.com/support/rest-api-developers-guide/overview/rest-api-rate-limit a lot quicker when we are querying for a lot of information. Reading the guidance on https://www.logicmonitor.com/support/v3-swagger-documentation#:~:text=LogicMonitor%20REST%20API%20v3%20supports%20maximum%20size%20of%201000%20records. says that a size of 1000 is supported and no where does it mention any reason we should be limited to 300. Can I please have some help with either an understanding or a workaround?Solved43Views2likes3CommentsLogicMonitor.Api nuget package for .NET developers - full v3 API support
For those developers who have chosen the C# / .NET software development path… Our“LogicMonitor.Api” nuget package is open source (MIT license), free (as in beer) and tried and tested in many, many software projects (680,000+ downloads and counting!) Find it here: Source:https://github.com/panoramicdata/LogicMonitor.Api/ Nuget:https://www.nuget.org/packages/LogicMonitor.Api/ Some advantages to using this library: Never worry about paging ever again. It’s all built in: var devices = await logicMonitorClient .GetAllAsync<Device>(cancellationToken) .ConfigureAwait(false); Ignore back off responses. It’s all handled for you. All requests and responses are strongly typed Is it an integer, a byte or a long? We’ve found out and implemented it We use .NET best naming practices. No moreconfusion between hostname, displayname, name, host group, device group, resource group and hstgrp etc. Is it numOfX, numberOfX, xNum or… It’s XCount. As it should be, and consistently throughout. What about CreationDtos? Yep, we’ve done them. LogicMonitor has an undocumentedAPI feature whereby… Yes, we know. It’s in there. Why does the documentation not tell me…? We’ve had to work it out. It’s in there. Can I…? Yes, and if not, let us know and we’ll add it. Pull requests gratefully received!36Views4likes0Comments