You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a query is copied using the Edit / Copy Query As / Curl (Cmd) or Edit / Copy Query As / Curl (Bash), it does not contain surrounding quotes. This is necessary for any query that contains parenthesis. For this example, I've seen issues with functions like GETUTCDATE() or parenthetical clauses WHERE ( This AND THAT )
Query Used
SELECT TOP 10 Caption
, IP
, CONCAT(Caption,'"/"',IP) AS [ComboName]
, GETUTCDATE() AS [RightNow]
FROMOrion.NodesWHERE IP LIKE'192.168.%.%'
Surround the entire URI with single quotes (') or double-quotes (") so that the native parser reads it as a single element. This should not be an issue with the query converter because the query has already been URL enocoded which strips ' and ".
The text was updated successfully, but these errors were encountered:
When a query is copied using the Edit / Copy Query As / Curl (Cmd) or Edit / Copy Query As / Curl (Bash), it does not contain surrounding quotes. This is necessary for any query that contains parenthesis. For this example, I've seen issues with functions like
GETUTCDATE()
or parenthetical clausesWHERE ( This AND THAT )
Query Used
As Produced
Copy Query As / Curl (cmd)
curl.exe -k -u MyUsername:MyC0mpl3xP@ssw0rd https://solarwinds.domain.local:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+TOP+1+Caption%2c+IP%2c+CONCAT(Caption%2c+%27%22%2f%22%27%2c+IP)+AS+%5bComboName%5d%2c+GETUTCDATE()+AS+%5bRightNow%5d+FROM+Orion.Nodes+WHERE+IP+LIKE+%27192.168.%25.%25%27
Copy Query As / Curl (bash)
curl -k -u MyUsername:MyC0mpl3xP@ssw0rd curl -k -u MyUsername:MyC0mpl3xP@ssw0rd https://solarwinds.domain.local:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+TOP+1+Caption%2c+IP%2c+CONCAT(Caption%2c+%27%22%2f%22%27%2c+IP)+AS+%5bComboName%5d%2c+GETUTCDATE()+AS+%5bRightNow%5d+FROM+Orion.Nodes+WHERE+IP+LIKE+%27192.168.%25.%25%27
Results when executed in selected shell
Copy Query As / Curl (cmd)
Using Command Prompt as Shell (cmd.exe)
Returns results as expected.
Using Windows PowerShell as Shell (powershell.exe)
Generates a parsing error.
Using PowerShell as Shell (
pwsh.exe
on Windows) and (pwsh
on *NIX)Generates a parsing error.
Copy Query As / Curl (bash)
Generates a parsing error.
Possible Solution
Surround the entire URI with single quotes (
'
) or double-quotes ("
) so that the native parser reads it as a single element. This should not be an issue with the query converter because the query has already been URL enocoded which strips'
and"
.The text was updated successfully, but these errors were encountered: