User Tools


Back to JESS API

Download JESS Job Results


Use GET /job/file/<job_id> to download the result files (depending on the job type) of a job in a zipped archive.

Use GET /job/file/<job_id>?ext=all to download all the output files including subfolders of a job in a zipped archive.

Use GET /job/file/<job_id>?ext=csv,eso,htm to download the selected output files, including those in the subfolders, of a job in a zipped archive.

Use GET /job/file/<job_id>/<file name> to download a specific file in the results of a job. The content is returned in a file stream in the file's name.

Use GET /job/file/<job_id>/<folder name> to download the contents of a specific folder in the outputs of a job. A zipped archive is returned.


Synopsis

Return data

A successful GET /job/file/<job_id> transaction returns a zipped archive file named <job_id>.zip, which contains all the contents of the simulation output.

A successful GET /job/file/<job_id>/<file name> transaction returns the contents of the named file in the simulation results.

Example using curl://

Send the GET /job/file command to download all results using curl:

curl -b cookies --output 12249.zip https://api.ensims.com/jess_web/api/job/file/12249

On success, the job's simulation results will be packed and returned in a zip archive. If the job is not accessible or the existing JWT is invalid, an HTTP 401 Unauthorized code will be returned.

To download only one result file:

curl -b cookies https://api.ensims.com/jess_web/api/job/file/12249/eplusout.err

On success, the contents of the eplusout.err file will be returned. If the job is not accessible or the existing JWT is invalid, an HTTP 401 Unauthorized code will be returned.

Example using Python Requests

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/job/file/12249', cookies=cookies)

# Save returned zip file
open('12249.zip', 'wb').write(r.content)


# Existing cookies are expected to be stored in the variable 'cookies'
r = requests.get('https://api.ensims.com/jess_web/api/job/file/12249/eplusout.err', cookies=cookies)

# Save returned zip file
print(r.text)


Site Tools