Use GET /session
to verify the linked JESS session.
A successful GET /session
transaction returns an object containing an OK flag and a message.
{ "ok" : true, "status": "JESS session key is valid.", "data": null }
Send the GET /session
command using curl:
curl -b cookies https://api.ensims.com/jess_web/api/session
On success, a confirmation message will be returned in a JSON packet. If the existing JWT is invalid, an HTTP 401 Unauthorized code will be returned.
Make sure Requests is correctly installed in your Python environment, and run the following lines:
import requests # Existing cookies are expected to be stored in the variable 'cookies' r = requests.get('https://api.ensims.com/jess_web/api/session', cookies=cookies) # Show returned object r.json()