User jfoley posted some PHP code for running a query in this thread:
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$endpoint = "https://localhost:17778/SolarWinds/InformationService/v3/Json/Query";
$post_data = array(
'query' => "SELECT TOP 1 DisplayName, DetailsUrl FROM Orion.Nodes"
);
$strdata = json_encode($post_data);
$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POSTFIELDS, $strdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "admin:");
//curl_setopt($ch, CURLOPT_HEADER, 1); // This will output response headers
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($strdata)
));
$result = curl_exec($ch);
exit("Result: {$result}");