Use GET /usage
to retrieve the usage summaries of the JESS service.
A successful GET /usage
transaction returns an object containing the usage stats of the linked JESS account.
{ "ok": true, "status": "TestUser usage report available", "data": [ { "status": "NA", "username": "TestUser", "latest": 1607162712868, "upload": 39811760, "storage": 8523778833, "jobs": 603, "download": 1166582910, "submissions": 167, "cputime": 31177 } ] }
Send the GET /usage
command using curl:
curl -b cookies https://api.ensims.com/jess_web/api/usage
On success, the user's linked JESS account usage details will be returned in a JSON object. 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/usage', cookies=cookies) # Show returned object r.json()