User Tools


Back to JESS API

Get JESS Job Results Directory


Use GET /job/dir/<job_id> to retrieve the directory of the JESS job results.


Synopsis

Return object

A successful GET /job/dir transaction returns an object containing the directory of the given job's results folder.

{
    "ok": true,
    "status": "12249 status available",
    "data": {
        "name": "Result folder",
        "fileName": "Result folder",
        "open": true,
        "fileSize": 0,
        "nocheck": true,
        "children": [
            {
                "name": "eplusout.dxf (18.95 KB)",
                "fileName": "eplusout.dxf",
                "open": false,
                "fileSize": 18950,
                "nocheck": false,
                "children": []
            },
            {
                "name": "eplusout.eio (54.77 KB)",
                "fileName": "eplusout.eio",
                "open": false,
                "fileSize": 54768,
                "nocheck": false,
                "children": []
            },
            {
                "name": "eplusout.end (1.44 KB)",
                "fileName": "eplusout.end",
                "open": false,
                "fileSize": 1442,
                "nocheck": false,
                "children": []
            },
            {
                "name": "eplusout.err (18.49 KB)",
                "fileName": "eplusout.err",
                "open": false,
                "fileSize": 18492,
                "nocheck": false,
                "children": []
            },
            {
                "name": "eplusout.eso (10.72 MB)",
                "fileName": "eplusout.eso",
                "open": false,
                "fileSize": 10717312,
                "nocheck": false,
                "children": []
            },
            {
                "name": "eplusout.mdd (3.96 KB)",
                "fileName": "eplusout.mdd",
                "open": false,
                "fileSize": 3965,
                "nocheck": false,
                "children": []
            },
            {
                "name": "in.epw (1.55 MB)",
                "fileName": "in.epw",
                "open": false,
                "fileSize": 1547758,
                "nocheck": false,
                "children": []
            },
            {
                "name": "in.idf (45.13 KB)",
                "fileName": "in.idf",
                "open": false,
                "fileSize": 45127,
                "nocheck": false,
                "children": []
            },
            ...
        ]
    }
}

Not accessible

If the given job id does not exist or is not accessible to the user, a “not-accessible” response will be returned.

{
    "ok": false,
    "status": "Job 12250 is not accessible to user yi@jeplus.org",
    "data": null
}

Example using curl://

Send the /user command using curl:

curl -b cookies https://api.ensims.com/jess_web/api/job/dir/12249

On success, the contents of the job results folder will be returned in a JSON object. If 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/dir/12249', cookies=cookies)

# Show returned object  
r.json()


Site Tools