I setup a API in ITFlow to connect Tactical RMM to create/update assets. I used the API to delete an asset so I know the API key is working. Here is line line 112 that the error references and line 106 the line 112 references.
Line 106
$uri_read = $ITFlow_url + $read_module + "?api_key=" + $ITFlow_API + "&asset_mac=" + $asset_mac
Line 112
$exists = Invoke-RestMethod -Method GET -Uri $uri_read
I am getting the error below.
Invoke-RestMethod : Invalid URI: The hostname could not be parsed.
At C:\ProgramData\TacticalRMM\4221752697.ps1:112 char:11
+ $exists = Invoke-RestMethod -Method GET -Uri $uri_read
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], UriFormatException
+ FullyQualifiedErrorId : System.UriFormatException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand