> For the complete documentation index, see [llms.txt](https://devdocs.olisystems.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devdocs.olisystems.com/group2/api-call-blueprint-1.md).

# Get calculation status and results

## Result of computation \[Using returned result link from process-run call]

<mark style="color:blue;">`GET`</mark> `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       |

{% tabs %}
{% tab title="200 " %}

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

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
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
{% endhint %}

#### Example chain of request responses

```json
// 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"
}
```

{% hint style="warning" %}
If the **data.context = "solution"** and **data.flowsheetConvergence = true** signifies that results are available.&#x20;
{% endhint %}
