Hello,

What I have now is only for testing, I have:

<?php

$restUrl = 
"http://{graylog2ip}:12900/search/universal/keyword?query=cluster%3Abugatti&keyword=1%20week%20ago";;
$restApiUser = "username";
$restApiPass = "password";

$url = $restUrl;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-type: 
application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "$restApiUser:$restApiPass");
curl_setopt($ch, CURLOPT_SSLVERSION, 3);

$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

print_r($result);

?>

As you can see we use Content type application/json. Things to note: 
{graylog2ip} just the IP address for graylog2 server, bugatti is the name 
of the cluster.



On Thursday, October 9, 2014 5:38:26 AM UTC-5, Jochen Schalanda wrote:
>
> Hi,
>
> Am Mittwoch, 8. Oktober 2014 23:15:21 UTC+2 schrieb Mave Zero:
>>
>> I set up my query correctly with the correct range keyword for my needs 
>> and press the "Try it out!" button to receive some response info. It gives 
>> a valid 200 response code with a response body, along with the request URL 
>> needed to get that information (this I would use for my PHP script).
>>
>> The problem, however, is when I attempt to go to that URL I get a blank 
>> page that says "Uncaught exception! HTTP 500 Internal Server Error".
>>
>
> Unfortunately I couldn't reproduce the error you've mentioned with 
> Graylog2 0.90.0, 0.91.0-rc.1, or the current development version 
> (0.92.0-SNAPSHOT).
>
> Please provide the actual query (ideally the HTTP request) you are running 
> against your Graylog2 0.90.0 server so that we can try to fix this.
>
>
> Cheers,
> Jochen
>

-- 
You received this message because you are subscribed to the Google Groups 
"graylog2" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to