User Tools


JESS Web Service API

Version 1.0, ©2020 Energy Simulation Solutions Ltd

[This manual is under construction]


About JESS

API Overview



REST API

Summary

The REST API calls are summarized in the table below. Please note:

Group Command OP Base URL Header Data Return
General Version info inquiry GET A /info none none Version info
User Check in with existing keys POST B /checkin JWT none Auth return
Log on with credentials POST B /logon none User credential Auth return
List existing projects GET A /projects/{own/all} JWT or API key none List of project IDs
Upload File POST A /upload JWT or API key Multipart form data File Info
Download File GET A /download/<file ID> JWT or API key none file contents
Project Command Create command POST A /command JWT or API key Command object Engine Response
Update project POST A /command JWT or API key Command object Engine Response
Start project GET A /start/<project ID> JWT or API key none Engine Response
Pause project GET A /pause/<project ID> JWT or API key none Engine Response
Resume project GET A /resume/<project ID> JWT or API key none Engine Response
Terminate project GET A /terminate/<project ID> JWT or API key none Engine Response
Cancel project GET A /cancel/<project ID> JWT or API keys none Engine Response
Reset project GET A /reset/<project ID> JWT or API key none Engine Response
Delete project GET A /api/delete/<project ID> JWT or API key none Engine Response
Project Data Get status GET A /status/<project ID> JWT or API key none Project Status
Get project definition GET A /definition/<project ID> JWT or API key none Command Object
Get report GET A /report/<project ID> JWT or API key none Project Report
Get Data GET A /data/<project ID> JWT or API key none Data archive
Get partial Data GET A /data/<project ID>/<version>_<generation> JWT or API key none Data archive (partial)
Run Evaluation Get awaiting jobs GET A /jobs/<project ID> JWT or API key none Simulation jobs
Submit simulation results POST A /eval JWT or API key Simulation Results Engine Response

Access the API

The REST API is accessible with any HTTP client that allows you to assign data to the header and the body of each request. JEA uses only the GET and the POST methods. In general, when a data object is sent in the request's body, the POST method is used. To experiment and test the API commands, we recommend Postman. A Postman collection of transactions showing all the commands is available to download here.

Depending on the programming language you are using, there are numerous HTTP client to choose from. In this document, the examples of using curl and Requests for Python are provided in the descriptions of each transaction. Here is a quick example using the get version info command.

Browser

Since this command does not require authentication, you can try it in a web browser by typing in the following URL:

https://api.ensims.com/jess_web/api/info

If the service is accessible, you will receive a page containing the following text:

{
  "Title" : "JESS Web API",
  "Description" : "JESS online simulation services API provided by ENSIMS Ltd.",
  "Major" : 1,
  "Minor" : 0,
  "Revision" : 0,
  "Release" : "beta",
  "Update" : 1,
  "Notice" : "(C) 2020, Energy Simulation Solutions Ltd. All rights reserved."
}

curl

Send the same command using curl:

curl https://api.ensims.com/jess_web/api/info

The same text will be return with successful execution.

Requests

Make sure Requests is correctly installed in your Python environment, and run the following the lines:

>>> import requests
>>> r = requests.get('https://api.ensims.com/jess_web/api/info')
>>> r.json

The Technicals


Site Tools