Just an update for the archives, the REST API asmmetricity for widgets is
fixed in Graylog2 2.x, and now you will get a 500 error if you post the
pre-2.0 format instance of "timerange": { ... }.
On Tuesday, September 22, 2015 at 2:26:32 PM UTC+3, [email protected]
wrote:
>
>
>
> On Wednesday, July 1, 2015 at 11:20:10 AM UTC+3, [email protected]
> wrote:
>>
>> Thanks Dennis.
>>
>> Yes, there is a bit of confusion in this. It's unclear from the REST
>> api-browser documentation exactly what the widget config object consists
>> of. As the POST request input format also appears to differ from the output
>> of a GET request it's a bit uncertain what to send sometimes.
>>
>
> +1
>
> I just ended up looking at the source code to figure out why I was getting
> an "Invalid timerange parameters provided" when I was including them in '
> "timerange":{"type":"relative","range":86400 }' format just as the GET
> request sends them in. (So instead they use different field names and up
> one level of nesting.) In general using a REST API is easier when it is
> symmetric, and you can figure out what you should be POSTING/PUTTING by
> looking at a GET result.
>
>
--
You received this message because you are subscribed to the Google Groups
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/graylog2/50e250b0-73fd-45d3-af38-f052d57c0a0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.