7 hours ago, Dominique said:
# $url = "https://$company.logicmonitor.com/santaba/rest$path$queryParams"
This is the URL that should be used, however, it has to be in the proper format. So, let's look at $path and $queryParams to make sure they contain what they should so that the path is a properly formed URI.
$path would need to start with a forward slash (/). $queryParams would need to start with a question mark and be a list of ampersand separated key value pairs (e.g. ?size=1&page=3). It looks like both of those are good, but commented out currently.
FYI, you can't change the display name if you're doing a GET. You'll have to do PATCH. More info here. It would be something like this:
#Request Info
httpVerb ='PATCH'
resourcePath = '/device/devices/435'
queryParams = '?patchFields=enableNetflow,netflowCollectorId'
data = '{"enableNetflow":true,"netflowCollectorId":85}'
#Request Info
httpVerb ='PATCH'
resourcePath = '/device/devices/435'
queryParams = '?patchFields=displayName'
data = '{"displayName":"newName"}'