Hello,
I am accesing the REST API of Graylog from java.
I want to use a sessionId to make the calls to the REST api without
username and password. I haven't found any documentation reading how this
should be set in order for graylog to accept it. I have tried the following
and all of them return 401 Unauthorized:
URLConnection graylogConnection = graylogUrl.openConnection();
graylogConnection.setRequestProperty("sessionid", sessionId);
graylogConnection.setRequestProperty("session-id", sessionId);
graylogConnection.setRequestProperty("session_id", sessionId);
graylogConnection.setRequestProperty("id", sessionId);
graylogConnection.setRequestProperty("authorization", "Bearer " +
sessionId);
graylogConnection.setRequestProperty("JSESSIONID", sessionId);
graylogConnection.setRequestProperty("Cookie", "JSESSIONID=" + sessionId);
I got the sessionId value from the system/sessions resource and has a valid
expiry date(it is not expired).
I also tried all of the above with sessionId Base64 encoded.
Could anyone suggest how I should set the sessionId in order for graylog to
accept it?
--
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.