How to get access to an OSESSIONID cookie for further REST calls

0
Hi there,   I am connecting to my graph database (OrientDB) via REST call in a Microflow - this works pretty well. When I connect the to the database with my credentials the first time an OSESSIONID-Cookie is generated. For all further interactions with the database this OSESSIONID must be send together with the request.   So far I didn't find a way to get access to this cookie respectively to the OSESSIONID. And if this is solved, how do I add the cookie to my HTTP calls?   Any ideas / solutions would be highly appreciated. Thank you!   Best regards, Marcus
asked
1 answers
0

From OrientDB manual:

On first call (or when the session is expired and a new authentication is required), OrientDB returns the OSESSIONID parameter in response's HTTP header. On further calls the client should pass this OSESSIONID header in the requests and OrientDB will skip the authentication because a session is alive.

You can retrieve the OSESSIONID parameter by retrieving the HTTPHeader list from the HTTPResponseObject and then apply list operation find where you search for the key (which might be OSESSIONID, but that you would have to doublecheck). 

You can set a new custom header when sending a follow up request in the Call REST service microflow activity.

answered