> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.islo.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.islo.dev/_mcp/server.

# Get Scoped Factory Line Run Debug

GET https://api.islo.dev/factories/{factory_id}/line-runs/{run_id}/debug

Reference: https://docs.islo.dev/api-reference/factories/get-scoped-factory-line-run-debug

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `factory_id` (string, required)
- `run_id` (string, required)

## Response

### 200

Successful Response

- `id` (string, required)
- `line_name` (string, required)
- `status` (string, required)
- `triggered_by` (string, required)
- `completed_at` (datetime, optional, nullable)
- `error_message` (string, optional, nullable)
- `failure_summary` (LineRunFailureSummary, optional, nullable) — The first failed step within the run's last failed stage attempt.
- `line_version_id` (string, optional, nullable)
- `region` (string, optional, nullable)
- `stages` (list of LineRunDebugStage, optional)
- `started_at` (datetime, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### LineRunFailureSummary

The first failed step within the run's last failed stage attempt.

- `compute_command_id` (string, optional, nullable)
- `error_code` (string, optional, nullable)
- `error_details` (map from string to any, optional, nullable)
- `error_message` (string, optional, nullable)
- `failure_class` (string, optional, nullable)
- `stage_name` (string, optional, nullable)
- `step_name` (string, optional, nullable)

### LineRunDebugStage

- `environment` (LineRunDebugEnvironment, optional)
- `iteration` (integer, optional, nullable)
- `job_run_id` (string, optional, nullable)
- `job_version_id` (string, optional, nullable)
- `outcome` (string, optional, nullable)
- `reason` (string, optional, nullable)
- `stage_name` (string, optional, nullable)
- `stage_order` (integer, optional, nullable)
- `status` (string, optional, nullable)
- `steps` (list of LineRunDebugStep, optional)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### LineRunDebugEnvironment

- `gateway_profile` (string, optional, nullable)
- `region` (string, optional, nullable)
- `sandbox_name` (string, optional, nullable)
- `snapshot_name` (string, optional, nullable)

### LineRunDebugStep

- `action` (string, optional, nullable)
- `agent_session_id` (string, optional, nullable)
- `completed_at` (datetime, optional, nullable)
- `compute_command_id` (string, optional, nullable)
- `error_code` (string, optional, nullable)
- `error_details` (map from string to any, optional, nullable)
- `error_message` (string, optional, nullable)
- `exit_code` (integer, optional, nullable)
- `failure_class` (string, optional, nullable)
- `name` (string, optional, nullable)
- `sandbox_name` (string, optional, nullable)
- `started_at` (datetime, optional, nullable)
- `status` (string, optional, nullable)
- `stderr_tail` (string, optional, nullable)
- `stdout_tail` (string, optional, nullable)
- `task_name` (string, optional, nullable)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "id": "string",
  "line_name": "string",
  "status": "string",
  "triggered_by": "string",
  "completed_at": "2024-01-15T09:30:00Z",
  "error_message": "string",
  "failure_summary": {
    "compute_command_id": "string",
    "error_code": "string",
    "error_details": {},
    "error_message": "string",
    "failure_class": "string",
    "stage_name": "string",
    "step_name": "string"
  },
  "line_version_id": "string",
  "region": "string",
  "stages": [
    {
      "environment": {
        "gateway_profile": "string",
        "region": "string",
        "sandbox_name": "string",
        "snapshot_name": "string"
      },
      "iteration": 1,
      "job_run_id": "string",
      "job_version_id": "string",
      "outcome": "string",
      "reason": "string",
      "stage_name": "string",
      "stage_order": 1,
      "status": "string",
      "steps": [
        {
          "action": "string",
          "agent_session_id": "string",
          "completed_at": "2024-01-15T09:30:00Z",
          "compute_command_id": "string",
          "error_code": "string",
          "error_details": {},
          "error_message": "string",
          "exit_code": 1,
          "failure_class": "string",
          "name": "string",
          "sandbox_name": "string",
          "started_at": "2024-01-15T09:30:00Z",
          "status": "string",
          "stderr_tail": "string",
          "stdout_tail": "string",
          "task_name": "string"
        }
      ]
    }
  ],
  "started_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.islo.dev/factories/factory_id/line-runs/run_id/debug"

headers = {
    "X-Islo-Api-Version": "X-Islo-Api-Version",
    "Authorization": "Bearer <api_key>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.islo.dev/factories/factory_id/line-runs/run_id/debug';
const options = {
  method: 'GET',
  headers: {'X-Islo-Api-Version': 'X-Islo-Api-Version', Authorization: 'Bearer <api_key>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.islo.dev/factories/factory_id/line-runs/run_id/debug"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Islo-Api-Version", "X-Islo-Api-Version")
	req.Header.Add("Authorization", "Bearer <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.islo.dev/factories/factory_id/line-runs/run_id/debug")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Islo-Api-Version"] = 'X-Islo-Api-Version'
request["Authorization"] = 'Bearer <api_key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.islo.dev/factories/factory_id/line-runs/run_id/debug")
  .header("X-Islo-Api-Version", "X-Islo-Api-Version")
  .header("Authorization", "Bearer <api_key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.islo.dev/factories/factory_id/line-runs/run_id/debug', [
  'headers' => [
    'Authorization' => 'Bearer <api_key>',
    'X-Islo-Api-Version' => 'X-Islo-Api-Version',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.islo.dev/factories/factory_id/line-runs/run_id/debug");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Islo-Api-Version", "X-Islo-Api-Version");
request.AddHeader("Authorization", "Bearer <api_key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Islo-Api-Version": "X-Islo-Api-Version",
  "Authorization": "Bearer <api_key>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.islo.dev/factories/factory_id/line-runs/run_id/debug")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```