> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tess.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Run Output

> Returns the consolidated output of a completed run.

### **Code Examples**

<CodeGroup>
  ```http cURL theme={null}
  curl --request GET \
    --url 'https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'x-workspace-id: YOUR_WORKSPACE_ID'
  ```

  ```json Node.js theme={null}
  const axios = require('axios');

  const config = {
    method: 'get',
    url: 'https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'x-workspace-id': 'YOUR_WORKSPACE_ID'
    }
  };

  try {
    const response = await axios(config);
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "x-workspace-id": "YOUR_WORKSPACE_ID"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer YOUR_API_KEY",
      "x-workspace-id: YOUR_WORKSPACE_ID"
    ]
  ]);

  $response = curl_exec($curl);
  curl_close($curl);
  echo $response;
  ```

  ```java Java theme={null}
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

  HttpClient client = HttpClient.newHttpClient();
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output"))
      .header("Authorization", "Bearer YOUR_API_KEY")
      .header("x-workspace-id", "YOUR_WORKSPACE_ID")
      .GET()
      .build();

  HttpResponse<String> response = client.send(request,
      HttpResponse.BodyHandlers.ofString());
  System.out.println(response.body());
  ```

  ```go Go theme={null}
  package main

  import (
      "fmt"
      "io/ioutil"
      "net/http"
  )

  func main() {
      client := &http.Client{}
      req, _ := http.NewRequest("GET", "https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output", nil)
      req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Add("x-workspace-id", "YOUR_WORKSPACE_ID")
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      body, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```

  ```jsonnet .NET theme={null}
  using System.Net.Http;

  using var client = new HttpClient();
  client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
  client.DefaultRequestHeaders.Add("x-workspace-id", "YOUR_WORKSPACE_ID");
  var response = await client.GetAsync(
      "https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output");
  Console.WriteLine(await response.Content.ReadAsStringAsync());
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'

  uri = URI('https://api.tess.im/digital-employees/{employeeId}/runs/{runId}/output')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Get.new(uri)
  request['Authorization'] = 'Bearer YOUR_API_KEY'
  request['x-workspace-id'] = 'YOUR_WORKSPACE_ID'

  response = http.request(request)
  puts response.read_body
  ```
</CodeGroup>

### **Headers**

<Note>
  **Authorization:** Pass your API key as a Bearer token in the `Authorization` header: `Authorization: Bearer YOUR_API_KEY`.
</Note>

<ParamField header="x-workspace-id" type="integer" required>
  ID of the workspace. Required for all Digital Employees API requests.
</ParamField>

### **Path Parameters**

<ParamField path="employeeId" type="integer" required>
  The ID of the digital employee.
</ParamField>

<ParamField path="runId" type="integer" required>
  The ID of the completed run.
</ParamField>

### **Response**

```json theme={null}
{
  "data": {
    "output": "The financial report for Q2 is complete...",
    "rendered_output": "The financial report for Q2 is complete...",
    "input": "Generate Q2 financial report",
    "tool_call_count": 3,
    "generated_files": [],
    "workspace_files": [],
    "affected_documents": [],
    "tool_calls": [],
    "artifacts": [],
    "execution_id": 9001,
    "chat_id": 9001,
    "search_intelligence": null,
    "approval": null,
    "approvals": [],
    "user_input_request": null
  }
}
```

### **Response Fields**

| Field                | Description                                                        |
| :------------------- | :----------------------------------------------------------------- |
| `output`             | Raw text output produced by the run.                               |
| `rendered_output`    | Output with formatting markers applied.                            |
| `input`              | The prompt or input used for the run.                              |
| `tool_call_count`    | Total number of tool calls made during the run.                    |
| `generated_files`    | Files generated during the run.                                    |
| `workspace_files`    | Workspace files referenced or modified during the run.             |
| `artifacts`          | Structured artifacts produced by the run.                          |
| `approval`           | Approval request object if approval is required.                   |
| `user_input_request` | Pending user input request if the run is paused waiting for input. |
