Get calculation status and results

GET https://api.olisystems.com/result/{jobId}?final-solution=true

URL contains the result of the computation if status is processed

Headers

Name
Type
Description

Authorization

string

Bearer {access_token}

Content-Type

string

application/json

{
    "code": 200, 
    "data": {
        "result": {
          ...
          }
    }, 
    "message": "Results returned successfully", 
    "resultsLink": "https://api.olisystems.com/result/flash/fbce59ee-f31e-447b-b450-ba5b0d0a1a99?context=engine", 
    "status": "PROCESSED"
}

status can be IN QUEUE, IN PROGRESS, PROCESSED, FAILED or ERROR

if status = IN QUEUE/IN PROGRESS, keep polling the endpoint in resultsLink

if status = PROCESSED, result should be in data.result

if status = FAILED, computation failure. error will be be in data.error

if status = ERROR, a system error occurred

Example chain of request responses

// 1st response on GET resultsLink
{
    "data": {
        "processInfo": [
            {"context": "currentBlockInfo",
             "data": {"blockName": "MIX-1"}},
            {"context": "currentBlockInfo",
             "data": {"blockName": "HX - AB"}},
            {"context": "currentBlockInfo",
             "data": {"blockName": "HX - CD"}}
        ]
    },
    "message": "Results returned successfully",
    "resultsLink": "https://api.olisystems.com/result/20978bbb-5555-4ecd-ae90-582953afdedf?context=process&start=3&count=21",
    "status": "IN PROGRESS"
}

// 2nd request on GET resultsLink 
"data": {
        "context": "solution",
        "flowsheetConvergence": true,
        "metadata": {"executionTime": {"unit": "ms","value": 7030.0},
            "versionInfo": {"fullVersion": "11.5.1.7"}
        },
        "output": {
        "blockOutput": { 
        ...
        }
        "streamOutput": {
        ...
        }
        }
    },
    "message": "Results returned successfully",
    "status": "COMPLETED"
}

If the data.context = "solution" and data.flowsheetConvergence = true signifies that results are available.

Last updated