Search the Community

Showing results for tags 'REST'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • From LogicMonitor
    • Product Announcements
    • LM Staff Contributions
    • Community Events
  • LogicMonitor Product Discussion
    • Feature Requests
    • LM Exchange
    • Ask the Community

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 9 results

  1. Trying to schedule a new SDT for January 1, 2018 1:00 AM to 1:30 AM for a device group, but getting a Status:1007 and a blank response. <# account info #> $accessId = 'SHj6Hub8e63FUwkc5' $accessKey = 'xz37=(][{qb6ANLp}5$-S9Hvn6HV292P' $company = 'api' # stdTYpe (integer) # 1 - one time, 2 - Weekly SDT, 3 - Monthly SDT, 4 - Daily SDT # we have to use "one time" style values because LM has no concept of day of month $stdTYpe = 1 # type (string) # ServiceGroupSDT, DeviceGroupSDT, CollectorSDT $type = "DeviceGroupSDT" # deviceGroupId (string) # $deviceGroupId = 18 # dataSourceId (in
  2. I took a working groovy script datasource and am now trying to adjust it to some needs we have. This data will end up giving us alert totals for each month so we can build reports. Any ideas? Here is what I have so far. import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Hex; import groovy.json.JsonSlurper; //define credentials and url def accessId = hostProps.get(''); def accessKey = hostProps.get('lmaccess.key'); def account = hostProps.get('lmaccount'); def alertgroup = hostProps.get(''); def collectionF
  3. It would be nice to have a swagger doc to define all the rest endpoints. We are developing a graphql server internally and it would be useful to be able to programmatically define the LogicMonitor portion. I see that LM has a swagger project in github not quite sure the scope of that, but an example of a swagger doc that can be read and interpreted comes from connectwise manage:
  4. I am attempting to adjust an escalation chain via PowerShell and REST. I am currently getting back a 1007 and can't seem to figure out what is wrong. Below is what I am using, I have tried different forms of $data. Our main goal is to change CC. We have tried these two and then the 1 in the script below. Just not sure what is coming up wrong. $data = '"ccDestinations":[{"type":"arbitrary","method":"email","addr":""}]' $data = '"destinations":[{"type":"single","stages":[[{"type":"arbitrary","method":"email","addr":""}]]}]' <# Use TLS 1.2 #> [Ne
  5. I have created a Groovy script based PropertySource, that uses a REST call to contact an external site using the included HTTP helper methods in order to fill some information fields. This works fine in itself. The issue I have is the need to set the proxy details on the object after it is instantiated in the script. As far as I know, the collector properties/settings are not exposed in any way to a scripted PropertySource, despite the script running locally on the collector. Nor does the HTTP connection use the existing proxy as set on the collector. Unless I am missing somethi
  6. I have the below code which results in a 401. Any ideas? I am attempting to update the hostGroupIds. $status = $null $body = $null $response = $null <# Use TLS 1.2 #> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 <# account info #> $accessId = '*****' $accessKey = '*****' $company = '*****' <# request details #> $httpVerb = 'PATCH' $resourcePath = '/device/devices/1210' $queryParams = '?patchFields=hostGroupIds' $data = '{"hostGroupIds":"187,258"}' <# Construct URL #> $url = 'https://' + $company + '
  7. Hello all, I am trying to get updates on alerts that span multiple days. So, our normal code will grab new alert data for today, let's say. However, we need to go back to old alerts and see if they have been resolved yet, so we can do accurate reporting. What I want to do is provide a list of the IDs for a handful of alerts and get more than 1 row back. Any ideas on how I can formulate an alert query so that I can get 2 rows back for, say ID=DS1234567 and ID=1234568 in the same request? Here is my example call:
  8. I was testing the new rate limiting feature that was to be rolled out v99 and enacted in v100. Turns out Powershell throws out the headers when calling the invoke-restmethod commandlet unless an exception is thrown - this would mean I need to re-write all of my REST API scripts in another language or change to invoke-webrequest. It would make it to adapt to the rate limiting for us PowerShell users easier if this data was just included in the response content.
  9. Hi, Is there a way to get all instances for given data source, but without having to provide device IDs? The REST API offers the following URI: URI: /device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances What I need is the equivalent of something like this: URI: /datasource/datasources/{datasourceId}/instances Which would return all instances for the datasource from all devices that have the datasource. The returned data should include the "managedObjectName" property so that from the instance we can refer back to a device.