Search the Community

Showing results for tags 'rest api'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • LogicModule Exchange
    • LM Exchange
    • LM Staff Contributions
  • Product Announcements
    • LogicMonitor Notices
  • LogicMonitor Product Q&A
    • Feature Requests
    • Ask the Community
    • From the Front

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 19 results

  1. For /device/devices the inheritedProperties objects should include a key-value pair that identifies the hostGroupId that object is inherited from Example { "status": 200, "errmsg": "OK", "data": { "total": 1, "items": [ { "name": "hostname", "inheritedProperties": [ { "name": "keyname1", "value": "value1", "inheritedFromHostGroupId": 2 } ] } ] } } I'm not super tied to the name of the proposed key 😉 Thanks!
  2. Hi, I need to retrieve alerts by a list of alert IDs. I thought maybe the includes ~ operator in the filter would be the way to do this, passing a comma separated list of alert IDs: /alert/alerts?needMessage=true&filter=internalId~LMD2316102,LMD1785737 But this only returns the first alert. Am I using the ~ operator correctly? https://www.logicmonitor.com/support/rest-api-developers-guide/v1/alerts/get-alerts/
  3. I would like the REST API to support Scheduling a collector version update Applying a one-time collector version update Working with the Collector Custom Properties (recently added I think, but don't see anything in the online documentation about support in REST API).
  4. I am trying to use two properties in REST API call ( size and fields). Following doesn't work. Coi;d someone help on the syntax? Thanks, Ye curl -u USER:PASSWORD https://NameOfPortal.logicmonitor.com/santaba/rest/service/services?size=1000&?fields=name,id
  5. Good to see customProperties in the Collector REST API. But properties that mask their values in the UI should respect that masking when fetching that information from the API.
  6. Priot to ersion 106 the Get Widget Data REST API worked using the following call: /dashboard/widgets/680/data?size=1000&fields=severity,acked,ackedEpoch,startEpoch,monitorObjectGroups&filter=type:alert It not longer works, we get an empty array back. Has anyone else seen this, or can LM confirm please. We are talking to support too. @Sarah Terry @Ali Holmes
  7. When we are downloading the collector file using https://www.logicmonitor.com/support/rest-api-developers-guide/collectors/downloading-a-collector-installer/ rest API we're getting corrupted file for few of our products, which is not consistent. We're getting this issue for random products and today we're not able to reproduce the issue for the same products. I would like to know in which scenarios we'll be able to reproduce the issue or is there an issue with API. Any quick update or heads up will be a great help!! Below is the powershell code we're using to download collector file. function downloadCollector { param( [parameter(mandatory = $true)] [string]$CollectorId, [parameter(mandatory = $true)] [string]$portal, [parameter(mandatory = $true)] [string]$AccessId, [parameter(mandatory = $true)] [string]$AccessKey) write-host "In the downloadCollector function.." $verb='GET' $baseLMUrl = 'https://{0}.logicmonitor.com/santaba/rest{1}' #$resourcePath = [string]::Format("/setting/collectors/{0}/installers/Win64?useEA=true", $CollectorId) $resourcePath = [string]::Format("/setting/collectors/{0}/installers/Win64", $CollectorId) $localFile = 'C:\inforbc\tmp\logicmonitoring.exe' <# Construct URL #> $url = [string]::Format($baseLMUrl, $portal, $resourcePath) $url = [string]::Format("{0}?useEA=true?collectorSize=small", $url) <# Get current time in milliseconds #> $epoch = [Math]::Round((New-TimeSpan -start (Get-Date -Date "1/1/1970") -end (Get-Date).ToUniversalTime()).TotalMilliseconds) <# Concatenate Request Details #> if ([String]::IsNullOrEmpty($data)) { $requestVars = $verb + $epoch + $resourcePath } else { $requestVars = $verb + $epoch + $data + $resourcePath } <# Construct Signature #> $hmac = New-Object System.Security.Cryptography.HMACSHA256 $hmac.Key = [Text.Encoding]::UTF8.GetBytes($accessKey) $signatureBytes = $hmac.ComputeHash([Text.Encoding]::UTF8.GetBytes($requestVars)) $signatureHex = [System.BitConverter]::ToString($signatureBytes) -replace '-' $signature = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($signatureHex.ToLower())) <# Construct Headers #> $auth = 'LMv1 ' + $accessId + ':' + $signature + ':' + $epoch $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Authorization",$auth) #$headers.Add("Content-Type",'application/json') #(New-Object System.Net.WebClient).DownloadFile($url, $installFile) Invoke-WebRequest -Uri $url -Headers $headers -ContentType 'application/json' -OutFile $localFile }
  8. Today, the audit log captures any changes that an API user makes, but doesn't record any activity if you are just making queries. It would be valuable to log all types of API calls to comprehensively monitor API user behavior. This could be done with one of the following: 1) A separate API-only audit log 2) Bundled with the existing audit log 3) The existing audit log could have an easy filter to hide API calls and reduce noise
  9. Hello, I had developed some powershell scripts in 3.0 to connect using Powershell Invoke-RestMethod cmdlets and was working fine. Today I upgraded my machine to Win 10 with Powershell 5.1 and all scripts stopped working with below error. Any changes we need to do in code ? ================================================== + ... $response = Invoke-RestMethod -Uri $url -Method Get -Header $headers + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebE xception + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
  10. Working with the /service/services api, the auth['password'] object should be masked when the website check is returned, especially for users that only have READ permissions to the website check/service.
  11. I have come across this issue a few times now, and feel it's worth bringing up. A major roadblock to making our integrations (with major platforms like ConnectWise) work the way we want them to is the limitation of only being able to make a single API request per event/status change/etc. One example - we want to be able to insert the "Acknowledged" notes when an alert (or several) are ack'ed in LogicMonitor as a service note to the corresponding tickets in ConnectWise AND update the status of the ConnectWise ticket to 'In progress'. That requires 2 API calls: one (which is the default for your builtin ConnectWise integration) to update the ticket priority/status/etc (HTTP PATCH -> https://{connectwiseSite}/v4_6_release/apis/3.0/service/tickets/{id}) and another to add a note to the ticket (HTTP POST -> https://{connectwiseSite}/v4_6_release/apis/3.0/service/tickets/{id}/notes). Another example - our RMM tool does not support the usual API Key method of authentication. It requires that one go through a slightly obtuse algorithm to send credentials, save a generated session token that is returned as part of the response body, and then submit that session token in the headers of future requests as a bearer token. I don't want to just leave these sessions open all the time, even though all traffic is submitted through HTTPS, the session token grants access as the API user from anywhere. So without going bonkers in complexity and asking for the world - it would be good enough to just be able to execute multiple API requests : 1 - Authenticate and save part of the response body, 2 - Submit one or more requests using the session token, 3 - Logout. We /really/ need the ability to get information from LM into ConnectWise and other platforms to make this solution shine.
  12. I'm on hour 17 of a run of a script that pulls down Service responseTime data for about 345 services so I can come up of an average across all of those services from the last quarter. I would love, LOVE a built-in option or parameter to aggregate this data in the API call.
  13. Hi, we were upgraded to v96 at around 2am GMT and since then the Get Widget Data API has broken. The returned JSON does contain any widget data. We have an alert widget for which we use he Get Widget Data API, it was working perfectly fine until the upgrade. I have logged a support ticket and requested to be taken back to v95. https://www.logicmonitor.com/support/rest-api-developers-guide/data/get-graph-data/ @Sarah Terry
  14. Hi, I am trying to use the LogicMonitor REST API get a list of allof the devices in a given device group, including all devices in all sub groups below in the hierarchy. I have tried using the /device/groups/{id}/devices API but it just seems to return the devices in that immediate device group. This behaviour seems contrary to the /device/groups/{id}/alerts and /device/groups/{id}/sdts methods which do work with any sub groups below. This was previously possible via the getHosts RPC API method. I believe it is still possible but we are looking to migrate away from the RPC API. Can someone please advise on a solution for this issue?
  15. We would like to build a nicer web UI for the debug commands so that we can enable our less technical staff to perform tests to verify things like SNMP comms. Please extend the REST API so that debug commands can be invoked and the response returned in the REST API call response.
  16. I am trying to use the REST API from Google Apps Script but having trouble getting the auth signature to match the expected values. The code executes but I get HTTP 403 back because the auth signature is not as expected. Here's my Google Apps Script code, hoping someone from LM can point me in the right direction. I know my accessKey etc. are okay as my PowerShell code works just fine. Thanks in advance. var httpVerb = "GET"; var epoch = (new Date).getTime(); var resourcePath = "/device/groups"; var queryParams = "?filter=fullPath~Business Services&fields=id,name"; // Construct signature var requestVars = httpVerb + epoch + resourcePath; var message = requestVars; var secret = accessKey; var signature = Utilities.computeHmacSha256Signature(message, secret, Utilities.Charset.UTF_8); var signatureHex = ""; for (var i = 0; i < signature.length; i++) { signatureHex += (signature[i]).toString(16); } signatureHex = signatureHex.split("-").join(""); signature = Utilities.base64Encode(signatureHex); Logger.log(signatureHex); Logger.log(signature); // Construct HTTP request headers var auth = "LMv1 " + accessId + ":" + signature + ":" + epoch; var options = { "Authorization" : auth, "method" : httpVerb, "contentType" : "application/json" }; var url = "https://" + accessCompany + ".logicmonitor.com/santaba/rest" + resourcePath + queryParams; var response = UrlFetchApp.fetch(url, options); Logger.log(response.getContentText());
  17. So I have had pretty good luck converting the Python examples to Powershell. The one thing I can not figure out how to do is return volume usage for a specific host. Anyone got any example powershell script using Rest API to pull volume usage on a host?
  18. Add endpoints to the REST API to manage Recipient Groups. It should be possible to make a single API call to remove all members of a recipient group, add a single member, add arbitrary email CCs, delete a single member, get a list of all members, get a list of arbitrary emails. (If it's already present then it needs to be documented so customers don't need to reverse engineer it from the UI which may not be a supported approach.)
  19. I'm attempting to create a report for our management that would show hostname, winvolume usage instances, capacity of volume, current usage of volume, percent used of volume, groups host belongs to, current effective threshold (global/group/host/instance), current severity of alert (if any), alert acked, instance in sdt, alerting disabled effectively (group/host/instance) Most of that is retrieved relatively easily, except for effective threshold. Can that be added to the api?