I am trying to use the following php code to call the REST API:
<?php
$ch = curl_init();
$burl = "https://server2.novusprime.ai/Realm02/REST/SQLQuery?query=Select Timestamp,'JOB\Well 01\Operation Grid Type:zone' FROM History";
curl_setopt($ch, CURLOPT_URL, $burl);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, '<username>:<password>');
$resp = curl_exec($ch);
if($e = curl_error($ch)) {
echo $e;
}
else {
$decoded = json_decode($resp);
print_r($decoded);
}
curl_close($ch);
?>
I am getting the following error.
OpenSSL SSL_read: Connection was reset, errno 10054
Any help to resolve or an example REST API call script will help. Thanks.
I am trying to use the following php code to call the REST API:
<?php
$ch = curl_init();
$burl = "https://server2.novusprime.ai/Realm02/REST/SQLQuery?query=Select Timestamp,'JOB\Well 01\Operation Grid Type:zone' FROM History";
curl_setopt($ch, CURLOPT_URL, $burl);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, '<username>:<password>');
$resp = curl_exec($ch);
if($e = curl_error($ch)) {
echo $e;
}
else {
$decoded = json_decode($resp);
print_r($decoded);
}
curl_close($ch);
?>
I am getting the following error.
OpenSSL SSL_read: Connection was reset, errno 10054
Any help to resolve or an example REST API call script will help. Thanks.